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

Special Formatting

Status
Not open for further replies.

Sambo8

Programmer
May 10, 2005
78
NZ
Hi all,

I'm using Crystal 8.5. And would like to know if anyone knows a way of doing some sneaky formatting to return 1 row where multiple rows exist. e.g. my data looks like this

ID Name @ @ @ @
8 Sam Y N N N
8 Sam N Y N N

What I'd like to see is

ID Name @ @ @ @

8 Sam Y Y N N

My report is grouped on ID. But I don't know a way of makign this appear in the footer. Any ideas?

Many thanks

Sam

 
Depending on the number of variables/values for @ you could set up formulas that set the value to Y and are reset in the group header.

Code:
Shared Stringvar Flag1;
Shared Stringvar Flag2;
If {Mytable.myfield1}='Y' then Flag1:='Y' else Flag1;
If {Mytable.myfield2}='Y' then Flag2:='Y' else Flag2;

Then a place the above formula in the group footer. To ensure that the values are defaulted back to 'N' place the following formula in the group header:

Code:
Shared Stringvar Flag1:='N';
Shared Stringvar Flag2:='N';

Hope this helps.
ShortyA
 
If you are trying to detect the presence of a "Y" in each column, you could insert a maximum on each field, which would return a "Y" if present. Then you could suppress the details.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top