I have used 2 sub reports in my crystal report. Both these reports are from separate tables having no connection between them…I have inserted these reports in the details section….I have used dataset to pass source data to these reports…But when i view the report, the sub reports’ data isn’t filtered according to the dataset rather all the rows are shown in the reports.. How can i get rid of this problem….i just want to view the data like if user wants to view a report for 2011 then it should only show information from the database records having 2011 as the Year part…Can anyone help me on this
Share
The solution to your problem is dependent on how your user specifies the criteria for the report and where in your application they enter that criteria.
For example, if you provide a prompt for the user within your application to get the year for the report, then retrieve the datasource and pass it to crystal, then you should filter the data in the datasource before passing the datasource to crystal. You could also set parameters in crystal to filter the data, but my rule of thumb is to retrieve as little data as necessary to provide the required information.
However, if the user is prompted from within crystal reports for the criteria, then you need to use standard crystal functionality to filter the data. This involves adding record selection formulas using the user entered parameters.