How use subreport formula in main report in Crystal report?

One way to do this is to insert a section below the section containing the subreport, and place @MainFormula in this new sub-section:

  1. Go to Report > Section (in Crystal XI) or Format > Section (in Crystal 8.5)
  2. On the Sections list, highlight the section containing the subreport.
  3. Click Insert (at top of dialog box).

How do you pass a parameter field from the main report to a subreport in Crystal report?

Crystal Report : Passing Parameter to Sub Report

  1. Make sure your subquery report is correct and there’s no other parameter needed to be setup.
  2. Return to main report , and then right click in subreport area and choose “Change Subreport Link”.
  3. In the left box, find “Command”

What is subreport in Crystal report?

Crystal Subreports – Overview 1 It is used as an element in the main report and cannot be used as single report. 2 A Subreport cannot contain other subreports. 3 It can be placed in any report section and the entire subreport will print in that section. 4 It doesn’t have page header or page footers sections.

How do I do calculations in a subreport?

In the subreport, do all your necessary calculations in a Formula Field, which should be added into the Report Footer. Add the following code into the Formula Field: The Shared qualifier allows you to pass the data through a declared variable.

How do I edit a subreport in a report?

Right click on the subreport frame and click Format Subreport. The Format dialog box appears → Edit the values. For example, you can change the name of the subreport, edit the font, size, color, etc. Click Close.

How do I calculate the fuel usage of a subreport?

In the subreport, create a formula similar to the one below: Shared NumberVar FuelUsage := Sum ( {TableName.FieldName}) // Or Your Calculation 2. Place this formula in your subreport.