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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using a shared variable to summarize data

Status
Not open for further replies.

kims212

Programmer
Dec 17, 2007
103
CA
I am relatively new to CR but required to create some reports. I have an existing report that works which I am using as a starting place.

The formula for one field on the report is:

WhilePrintingRecords;
Shared NumberVar SummaryPercentGMP ;
SummaryPercentGMP

but this give me nothing on the report.

I read about shared variables in the help file and see that it is a way to create summary amounts but I don't see where the variable is declard and what it's putting in the variable.

any help would be appreciated.

Thanks
 
Shared" Variables are primarily used to pass data from a sub- report to main report. "SummaryPercentGMP" is the name of the variable. I would check for a sub-report, open it and look for that variable. It should show you the calculation.
 
Thanks for your prompt reply.

I've looked in all of the sub reports that the report calls and can't see the variable anywhere.

The report itself is "called" by a database application; the db app passes a parameter (called sessionid) to the report which determines the client and audit session that is to be reported. I'm wondering if the SummaryPercentGMP is also passed to the report when it's called by the database. Is that possible? is a shared variable ever used in this way?

Thanks again
 
Shared variables work perfectly well if they are just used within the main report, though it's a shade wasteful.

I suggest you use File > Export > Report Definition to get details of what the formulas do mean.

It may also be a left-over that no longer does anything. You get a lot of those in maintenance work.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Alas, I don't have the Report Definition option on the File -> Export sub-menu so can't check that way.

The field is definitely still used as it's printed on the report; it's just that it shows a value of 0. When the source report is run from the report menu of the database, the value is correct which is what makes me wonder if a shared variable is something that can be passed from the calling application as is done with the session id that is also needed in the report.

Is it possible that the shared variable is passed from the iAppraise db for use on the report?

Thanks again.

 
I don't know iAppraise db. Can anyone else help?

If no one answers, it might be worth posting in the 'Integrate' forum giving the software name.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thank you for your response; may I ask where I find the 'Integrate' forum?

Thanks
 
Madawc is referring to forum768.

When you looked inside the subreports, did you open each formula to see if it contained the shared variable?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top