Crystal Report passing Main Report Parameter to sub-Report parameter without sub-Report linking option

18 Views Asked by At

Can anyone please confirm is it possible pass the main report parameter in sub report parameter.

I have a sub report which designed to show only the bar chart where it has different conditions to generate the chart. only option to link the main report to sub report is through sub report linking but, in my case, below are the challenges.

  1. Main report is having different filter condition to show the data
  2. we can't use the sub report linking option as the sub report is only having the chart with different fields.
  3. When we do link with Primary key IDs of Main report to sub report, while generating the report it is taking the main report filter condition. make this sentence better.

I have tired Shared variable, but shared variable is having limitation to use it in a sub report parameter.

Can someone assist on this will be very much helpful.

1

There are 1 best solutions below

0
MilletSoftware On

It is NOT true the linked subreports inherit the main report filter condition.

The 2 mechanisms to pass info to subreports are a) Link, b) shared variables.

With a Link, you are free to indicate you do NOT want to filter the subreport data based on the linked value. In that case, the linked value would feed into the subreport parameter, but that parameter will not be used in the subreport record selection formula. You are free to manually use it there. For example, instead of the default = condition, you can use it with a > condition.