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!

Remembering a variable in a group footer

Status
Not open for further replies.

wesGP

Programmer
May 5, 2003
3
US
I cannot get my report to remember the value of an array element in a group footer.

Test Formula in group header for "@NoteAHeader" is:
Global StringVar Array Notes := ["One","Two","Three","Four","Five"];

Notes[2] := "Two";

Notes[2];

Test Formula in details for "@NoteADetails" is:
Global StringVar Array Notes;

if {SV00200.ADRSCODE} = "MAIN" then
Notes[2] := "TwoYes"

Notes[2];

Test Formula in group footer for "@NoteAFooter" is:
Global StringVar Array Notes;

Notes[2];

The data might be something like this within a group:

1. ADRSCODE = "123"
2. ADRSCODE = "MAIN"
3. ADRSCODE = "456"

When record #2 is processed, the Notes array element 2 is changed to "TwoYes", but the group footer still shows "Two"

I don't understand the way Crystal references global memvars so they can be accessed in group footers.

Please help.

Thanks.
 
Test Formula in details for "@NoteADetails" is:
Global StringVar Array Notes;

if {SV00200.ADRSCODE} = "MAIN" then
Notes[2] := "TwoYes"

Notes[2];
**************************

You are missing a semicolin in your formula

shud be:

Global StringVar Array Notes;

if {SV00200.ADRSCODE} = "MAIN" then
Notes[2] := "TwoYes";

Notes[2];


the semicolon in Crystal syntax is the end if...not sure what happens in this case....maybe the formula just bombs and nothing is changed {shrug}


Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top