Hi I want to store sub report fields per page into an array and print that array inside the report footer in main report. Any clue guys ?
If you're talking about only a few fields, then I'd recommend a shared variable taking the data back to the main report.
If it's alot of data, then you should make another subreport in the main report's footer and calculate all your data there.
Edit
Well, you asked, so here's how:
In your main report's footer, create a formula (call it FooMain) with this code:
whileprintingrecords;
shared stringvar MyLittleVar;In your subreport, create a formula (call it FooSub) with this code:
whileprintingrecords;
Shared stringvar MyLittleVar:="This is from the subreport";Preview your report. In the footer, the FooMain formula should display "This is from the subreport". Use FooMain in whatever calculations in the main report. Due to fundamental design aspects of Crystal, this will only work if FooMain (and any formulas that reference it) is below the subreport it is getting data from.