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

Listing Details?

Status
Not open for further replies.

mjbosko

Programmer
Jun 26, 2002
248
US
Using the latest version of CR. Driven by VB/SQLserver using ADO/ttx.

Supposing the following recordset is passed to a given report:
1234|Mike|Red
1234|Mike|Blue
1234|Mike|Green

I need to generate a report that prints a single folder label for this information like the following:

1234 Mike
Red, Blue, Green

Where the static information would print on a single report page and the dynamic info (red/blue/green) displays in a list separated by commas.

I know, ideally it would be better to have the passed a recordset to accomodate the data appropriately. Such as,
1234|Mike|Red,Blue,Green.

But thats another group's job to build the sprocs, and it takes time for approval and then development. We need this label quickly and can't wait for that timely process.

Can this be done in CR? If so, can you recommend the needed functions, and where to place what in the given report components (rpt header, pg header, detail, etc)?

Thanks!!
 
I'll assume that this is 3 fields, and not a concatenated field of 3 values:

1234|Mike|Red
1234|Mike|Blue
1234|Mike|Green

Try something like:

Group on the first two fields

Create a formula akin to this for the group header:
whileprintingrecords;
global stringvar MyNewString:="";

In the details:
whileprintingrecords;
global stringvar MyNewString;
MyNewString := MyNewString+", "+{MyTable.MyColor}

Place the first two fields in the group footer

Create a second Group Footer section (right click the group footer and select insert section below) and create a formula akin to this for the second group footer:
whileprintingrecords;
global stringvar MyNewString;
MyNewString

Should do it.

-k kai@informeddatadecisions.com
 
Thanks k! Your assumption was correct on the field separator I used. I'll give your recommendation a try and post back. Thanks!! -m
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top