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

conditionally diplaying groups 1

Status
Not open for further replies.

yehong

Programmer
Sep 22, 2003
291
US
Cr8.5 sql server.
Can I conditionally display groups starting with letter 'Z' on a report?
E.g:
Group values are:
23-EX
34-YYZ
123-NYZ
Z-34
Z-234
I want following layout:
***Regular Groups*** Emp Cnt
23-EX 200
34-YYZ 99
123-NYZ 12

***Z Groups***
z-34 23
z-234 500
--------------------------
Total for all groups 834

Basically just want to display 'z' groups separately from others but total them together.
Thanks


 
Based on what you have posted, create a formula and check if the {table.value} starts with Z

//@ZGroup
if {table.value} startswith "Z" or
{table.value} startswith "z" then
"***Z Groups***"
else
"***Regular Groups***"

Create group on {@ZGroup} in descending order if you want to see the Z Group first, else ascending order.

Also create a 2nd group on {table.value}

Your output would then have the following. For sake of simplicity, I have suppressed the sections not applicable to the problem

Report Header (Suppressed)
Page Header (This section formatted to underlay following section)
EMP Cnt
Group 1 Header
***Z Group***
Group 2 Header suppressed
23-EX 200
34-YYZ 99
123-NYZ 12
(If using running totals, place in Group 2 Footer)
Details (Suppressed)
Group 2 Footer (Suppressed)
Group 1 Footer (Suppressed
Page Footer (Suppressed)
Report Footer
(Place your grand total here)

The result should look exactly as you have posted.

Cheers,

-LW
 
Thanks. So far it worked like a charm. I will let you know how it goes till the end.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top