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

How to join two rows of data into one & populate diff. fields

Status
Not open for further replies.

BLKDAWG

Technical User
Aug 24, 2001
10
US
I have a report that is summarized by deptid and the first number of the account (I've concatenated the field). I'm only pulling two types of accounts (4000 series and 5000 series). Therefore, each deptid has two rows of data-one for acct "4" and one for acct "5". I would like to only have one row of data for each deptid. For the row ending in "4", I only want to populate the first 3 fields (Rev bud, Acct and Bal columns). For the row ending in "5", I want to populate the remaining fields (Exp, Actuals Bud, Encum, Commit, and YTD% columns). Any ideas how to do this? I'm using Crystal 6.

Here is what my current report looks like:

( 4000 acct) |( 5000 acct )
Deptid Rev Act Bal | Exp Actuals Encum Commit YTD%
bud bud

58304 281 552 271 | 281 552 0.00 0.00 0.00
58305 281 229 51 | 281 229 17 247 88%
 
There are ways to use variables and conditional suppression to get your summaries in one line, but it might be easiest if you just did a subreport for the second set of fields. You could group on {table.deptid} in both main and subreport, and then in each, limit the records to those with the concatenated field ending with the appropriate number. Then link the subreport to the main on {table.deptid}. I think this would work, although I couldn't really test it...

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top