Print Page | Close Window

Record Selection Formula and Sub Reports

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=14101
Printed Date: 04 May 2024 at 3:08pm


Topic: Record Selection Formula and Sub Reports
Posted By: azeem
Subject: Record Selection Formula and Sub Reports
Date Posted: 16 Aug 2011 at 7:18pm
How can I use Record Selection Formula of Main report in Sub Report?



Replies:
Posted By: lockwelle
Date Posted: 17 Aug 2011 at 2:04am
cut and paste....
 
then link the parameters from the main report to the sub report.
 
HTH


Posted By: azeem
Date Posted: 18 Aug 2011 at 9:36am
i dynamically wanted that whatever record selection formula is in my main report without copy paste i somehow could use it on my subreport. i used a shared variable in main report and assign Recordselection to it and then assign that val to a global variable in subreport and then place that variable in RecordSelection Formula editor but it did'nt work. It Says Result of record selection must be Boolean.
so how could i achieve it.


Posted By: lockwelle
Date Posted: 18 Aug 2011 at 10:09am
I haven't found the reporting system yet that is that 'friendly'.
 
Record selection formula is whether you keep the record or skip it...it is a filter on the recordset, not how to get the records for the recordset.
 
CR doesn't support dynamic recordsets...the recordset that any report is going to use has to be defined at design time and is stored with the report (I suspect).  Since a subreport is a complete report onto itself, you can't have 1 report set the dataset of the next report...CR doesn't write to anything.  It reads data, once, and then acts on the data it read.
 
I am a little confused as to why you don't want to cut and paste, since you wold need to set the datasource for the subreport and would need to set up the variables for your dynamic selection...
 
I would think that it is the same amount of work.



Print Page | Close Window