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

Display group listing in report header

Status
Not open for further replies.

skries

MIS
Jul 23, 2004
21
0
0
US
Crystal 8.5

I am creating a report that I want to have display a coverpage that lists all the groups that result from the select statement. It is undetermined which groups will be displayed and there will never be more than 10 groups overall.

In order to capture it I created a formula that would fill a variable based on a counter (see below). I placed it in the group header to make sure the variable was capturing the way I wanted but it is not displaying the data in the group header, however. Not sure why.

Any help is appreciated.

stringvar group1;
stringvar group2;
stringvar group3;
stringvar group4;
stringvar group5;
stringvar group6;
stringvar group7;
stringvar group8;
stringvar group9;
stringvar group10;

numbervar counter := 0;

counter := counter + 1;

if counter = 1 then group1 = {AE_P_PHS_E.SHOP}
else
if counter = 2 then group2 = {AE_P_PHS_E.SHOP}
else
if counter = 3 then group4 = {AE_P_PHS_E.SHOP}
else
if counter = 5 then group5 = {AE_P_PHS_E.SHOP}
else
if counter = 6 then group6 = {AE_P_PHS_E.SHOP}
else
if counter = 7 then group7 = {AE_P_PHS_E.SHOP}
else
if counter = 8 then group8 = {AE_P_PHS_E.SHOP}
else
if counter = 9 then group9 = {AE_P_PHS_E.SHOP}
else
if counter = 10 then group10 = {AE_P_PHS_E.SHOP};

group1;
group2;
group3;
group4;
group5;
group6;
group7;
group8;
group9;
group10;

 
Nevermind, I found my error. Using the = sign instead of the := sign.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top