Crystal Reports SubReport parameter has multiple values - crystal-reports

I have a report where I have created a subreport that uses a parameter from the main report but that value in the main report returns multiple of the parameter. Is there a way to specify in the parameter to only pull a distinct value into the parameter?

You could write a Formula to filter out the parameters you don't want, then pass that entire Formula as a parameter to the subreport.

Related

how to pass query resultset from main report to sub report

I have a main report which executes a query.I want that result set values to pass into the sub report.How to do in ireport.
Please give me the suggestions.
The query in the main report will generate some fields. Create a subreport parameter (for the sub-report from the main report) called "paramA" and pass it the value you wish by setting the report expression as needed using $F{myField} as the expression.
Then in the sub-report create a parameter called "paramA" to receive the value from the main report. See this

Ssrs run only one of the subreports based on parameter

I have a report, and the report has 5 subreports. There is a parameter named "SubreportNumber". I want to run one of the subreports, based on that parameter. Just one of them should run. Effectivity is important in my case. Is this possible?
I'm using an IIF statement to hide (using visibility) my reports based on a parameter value, as described above.
Then I take the same approach when specifying the sub-report parameters.
This can basically be done on any one of the parameters, if the report should be showing then pass the parameter, else pass nothing. (If you pass NOTHING as a parameter to the report, it won't run the report, ie. performance increase...)
Example for Year parameter below:
=IIF(Parameters!SubreportNumber.Value = "1","YEAR(NOW)", Nothing)
You can hide the reports you dont want based on your parameter.
To do this: Go the Report's property, under visibility section. Set Show or hide report based on expression. You can write an expression to hide report depending upon your parameter.
This will just hide the reports. Make sure there are no stored procedure or they will be execute irrespective or whether the report is visible or not.

My parameters on my main report won't add to my subreport in crystal reports

I have done this before, where the main report's parameters are passed on to the subreport. Currently, there are 2 parameters from the main report being passed to my subreport, but I need to add 2 more. When I go through the "Change Subreport Links" option and select and add the needed parameters, it simply doesn't save. I am not sure how else to add these.
Steps:
create desired parameters in sub-report
create corresponding parameters in main report
link with 'linking expert'
The datatypes of the parameters fields did not match, so the two were not correlating.

How can I pass parent's column value as parameter to child report in SSRS?

I have created master/details report from SSRS. Is it possible to pass as a parameter from parent's column value to child report. For e.g.
If I have a master report A and detail report B. From the following picture, how can I pass value of col_1 of Master_Report_A as a parameter for Details_Report_A
Any input will be appreciated.

Crystal Reports: How do I allow "set to null" when prompting for values to pass to subreports?

I have created a report which links into subreports. I created parameter fields to feed into the parameters of the subreports using subreport links.
If I do not add a subreport link and therefore the subreport is prompting for the value directly it will allow the set to null option. However, if the enter value prompt is being generated from the parameter field I inserted then the set to null option is not displayed.
I have 12 subreports so I can't prompt for the same values 12 times.
I am using Crystal Reports XI designer and not .net
set up formulas with nothing in them (null values) to pass to the subreports
In XI, I've only seen the 'Set to Null' option when the report uses a stored procedure as its data source. Is this the case for your subreport?
Usually, subreports are linked to fields in the main report so that the user isn't prompted repeatedly (once for each time the section that contains the subreport is rendered). If they are linked, the only prompting that will be encountered it that of main report.
Crystal Reports XI parameter fields (created in the UI, not the result of a SP) do not have a 'Set to Null' option. As a result, each parameter will need to have some value.
You may want to have a look at my Crystal Reports: Optional-Multi-Select Parameters posting on how you can add some optional values to your parameters.