cancel
Showing results for 
Search instead for 
Did you mean: 

Help in combining two reports into one

Former Member
0 Kudos

Dear all,

I have created two reports for our end users, both reports are getting their information from different databases however the field names are same.

I have been asked if I can produce one report combining the two reports together. I took up a challenge however I did not realize that how am I going to run two reports in one when the date ranges for both are two different ones.

here is the setup of the reports. See if you can help me finding out a solution to this.

Report 1 - Database 1

Filtration - Order Status <> 0 and FOC ="Y"

Grouped by - Reason Code (From Lab Reasons under Database 1)

Date Range - Lab Orders Date Entered

Code Range - Reason Code

Total Count - Distinct count Order Number and Sum of Order lines qty

==========================================================

Report 2 - Database 2

Filtration - Lab Status = 2 and Line Num < 3 Line Type = "S"

Grouped by - Reason Code (From Lab Reasons under Database 2)

Date Range - Lab Credits Date Entered

Code Range - Reason Code

Total Count - Distinct count Oetrn2 Ordernum and Sum of Lab Credits Qty

Now this is how I started it, I created a report with Grouped by Reason code from Database 1 and then added tables from database 2. I left Report Section Record empty and used the date range within Total Count for each along with their filtration.

However when I ran the report it did not produce the right results. So I thought I might use Sub report to over come this issue however due to grouping the sub report did not fit into the right place. Then I used group 3 and tried it however that didn't work either.

Any ideas how to go about it?

Many thanks

Regards

Jehanzeb

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

i would use the sub report, i dont think you can join tables from different databases in crystal. You can if they are seperate reports. i would create the main report with db 1 add you parameters, you dont have to join the sub to the main if yuo dont want to.

place the sub in the report footer and create that as a stand alone report, with its on grouping and parameters. when it is run the user will be prompted to enter both sets of parameter values and the data should be retrieved from both reports.

Former Member
0 Kudos

Sharon what I have done, I created two sub reports and placed them into the main report and run them from there. The only problem with main report and then having one sub report was that both databases were conflicting, conflicting in a sense that both were not working properly and I was keep on getting 0 results on the report.

This has been fixed now.

Regards

Jehanzeb

Answers (2)

Answers (2)

Former Member
0 Kudos

This has been answered. I have used two sub reports in one report.

Former Member
0 Kudos

Hi Jehanzeb

Try creating one report based on the tables from Database1 and 2. Link the tables on the common field (the data type should be the same).

You can also try inserting a subreport and link that to the main report based on the common field.

Hope this helps!!!

Regards

Sourashree

Former Member
0 Kudos

Thanks Sourashree,

I have used two sub reports and placed them in one report.

This has worked )

Many thanks

Regards

Jehanzeb