on 10-09-2008 11:09 AM
Hi
I'm sure that this is a stupid question But If I have carried out a selection query in my main report which returns say 1000 postcodes how can I pass these to t a subreport to select the same 1000 postcodes? By linking the fields that contains the postcodes the parameter created only contains the first postcode.
Thanks
Hi James,
Try creating a formula like
@Initialize:
WhilePrintingRecords;
stringVar str:="0";
Place this formula in report header
Now create another formula like
@Evaluate:
WhilePrintingRecords;
stringVar str;
str:=str+","+totext({PostCode});
Now create a command in the subreport like
select * from table where postcode in ({?StringParameter})
Now place the subreport in report footer and link the command level parameter from subreport ({?StringParameter}) with formula @Evaluate
Now the subreport results uses all the passcodes from main report.
Regards,
Raghavendra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Cheers that worked perfectly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So if you have a postal code in each row (each one different) and your sub-report is also in the Details section simply do a sub-report link on postal code and it will display the sub-report for each.
(don't really recommend putting sub-reports into a details section - detrimental to report efficiency)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if your subreport is dependant on varying poscode values then it'll have to be included at the same level as your main report postcode value (ie detail level) and it'll run once for every value (that'll be 1000 times!)
it make take time to run but if that's what your report requires so be it!
cheers,
dom
is the subreport in the details section?
so if each postcode in the main report is held in the details section a corresponding subreport held in that detail row should do the trick!
Dom
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.