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

combining information from 2 separate reports

Status
Not open for further replies.

mjmiller24

Programmer
Aug 29, 2001
17
US
My current situation is the following:

I have multiple documents for one ID number. I have several other fields that are displayed in the reports also. However, the reports look exactly the same, they almost look like duplicates, except for the different documents. It should be noted that the ID is the common link between tables.

The select statement, generically, looks like:

SELECT
MAIN.ID, TABLE.ID, TABLE.DOCUMENT
FROM
MAIN MAIN, TABLE TABLE
WHERE
MAIN.ID = TABLE.ID;


example output:

ID Document
343 Test1
343 Test2

Is there a way to get Crystal reports to put all of the documents in the same report so that the IDs are not duplicated?

This is what I want to see:

ID Document
343 Test1 Test2


Thanks
 
Do you mean combining 2 separate reports, or 2 separate records in one report? Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
You an group on ID number and place the report names into the detail (which, by the way, is the quickest way to view stuff in development). This will give each document its own 'line' in the detail - but won't put the combination of docs for a given ID on one record line.

Alternatively, you could design a formula which concatenates the document names as the record is read - then prints the resulting concatenated variable at the group footer level... a little bit more work, but, depending on your requirements, might do the trick...

ECS DataSystems, Inc.
A Crystal Partner
 
To answer the first set of questions, I am attempting to deal with two separate entries (documents) that have the same ID within the same report.

I am not sure if that is the best method. I still can't get it to work. I guess I am not implementing the suggestions, from EarlGray, quite right. I am not sure how to set up the formulas as per the last suggestion.

I may want to consider stored procedures.
 
You can create a 'running total' that appends the string from one record to the rest and accumulates them for display at the end of a group. The structure of the formulas is exaclty like the 3-formula technique in the FAQ on running totals. Except you are using a StringVar instead of a NumberVar.

Your string can't accumulate over 254 characters though, or it will crash. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top