Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pulling data from a subreport

Status
Not open for further replies.

slickp007

MIS
Feb 18, 2008
46
GB
Crystal 11

I have a sub report in my report and would like to pull the premium field from this report to get the percentage difference to the premium field in my main report. But i'm not sure how to do this. I've looked on the help about shared variables, would i have to use one of these?
 
Yes. Create a formula in your subreport like:

whileprintingrecords;
shared numbervar prem := {table.premium};//or whatever summary you are using.

Add this formula to the sub report footer. Then in the main report, in a section below the one in which the sub is located, e.g., in GFb if the sub is in GFa, you can reference the variable in a formula something like this:

whileprintingrecords;
shared numbervar prem;
({table.prem}-prem)%{table.prem}

-LB
 
Cheers thank you very much for the quick response. i should have really searched for it because i found my answer in another thread, but thanks all the same!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top