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

Displaying a predeclared global variable in another formula in Crytal9

Status
Not open for further replies.

writchotte

IS-IT--Management
Dec 18, 2003
8
US
Here is the declaration in formula:

global numbervar RecCountTot;
RecCountTot := count({gsa_proc_tlib_list;1.alias});

This is where I am trying to use it in another formula:

global numbervar RecCountTot;
local numbervar iRecCount;
iRecCount := RecCountTot;
'Tape Library' & '(' & iRecCount & ')';
 
Describe where these formulas exist in the report. Also let us know if you are receiving an error or if you are getting the wrong result.
 
The formula is used in a custom group. I know I get the correct value from the global variable in the declaring formula because I placed it in the report header and can see the number 2 (IE: for 2 records)

But when I try to show that value in the group formula it says 0.00
 
If a global variable is set in the report header, it should maintain it's value throughout the whole report. I suspect that you are resetting the value somewhere.

Also, the local variable in your example is useless. You can use the global variable in it's place.

global numbervar RecCountTot;
'Tape Library' & '(' & RecCountTot & ')';
 
Your suspicions are incorrect. These are the only two places the global is used.

Can someone please tell me why it is not showing the data.
 
Why are you even using variables? It looks like you just want a count to use in a string formula. You would be better off explaining what you are trying to do, I think. Are you trying to create a string that uses a count within groups or a count for the entire report? Why do you want it placed in a group header?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top