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

grouping trouble

Status
Not open for further replies.

unknownly

Programmer
Jul 7, 2003
181
US
I am having trouble getting all the dat aon a single line.
This want Iam doing

@ prod

if {table.type} = 'PROD' then
{table.target}


@ Geo
if {table.type} = 'GEO' then
{table.target}

and report looks like which is not on single row

unit descri oldentity newentity descrip prod geo

1000 myunit 65432 65432 myentity
P02301
xx


for some units it prints geo on top and prod in below

I have tried the underlay section in format section but it didn't help.

It should look like this:


unit descr oldentity newentity descr prod geo

1000 myunit 65432 65432 myentity P02301 xx

As always, your help is appreciated!



thanks,

Sweetie
 
Using CR version 8
and grouping by the


group1 unit
group2 newentity ///mostly the oldentity and newentity will be same so just grouping by one entity

group3 type
group4 target
 
Try grouping on the Unit, and then use the 3 formula method for each, as in:

Unit group header formula:
whileprintingrecords;
stringvar prod:="";
stringvar geo:="";

Details level formulas:
whileprintingrecords;
stringvar prod;
stringvar geo;
If {table.type} = "PROD" then
prod := {table.target}
else
If {table.type} = "GEO" then
geo := {table.target}


Now these variables are available for display at the Unit Group footer, where you'll place all fields, as well as:

//prod
whileprintingrecords;
stringvar prod

//geo
whileprintingrecords;
stringvar geo

This assumes that you want them displayed per unit, if it's another field, group on that.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top