Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Multiple subreports linking to one main report Post Reply Post New Topic
Author Message
johnformby
Newbie
Newbie


Joined: 16 Jul 2014
Online Status: Offline
Posts: 4
Quote johnformby Replybullet Topic: Multiple subreports linking to one main report
    Posted: 24 Jul 2014 at 5:43am
Hello,

I really hope someone can help me with this question. I have a table with transactions for items received from a supplier. One supplier can deliver many items and I want to group the items into 3 columns, based on their parent category. I also wan't to group by row for each date the delivery was made. The sum of the total items received under each parent category should be displayed.

For example:

Date        Parent 1      Parent 2      Parent 3
-------------------------------------------------
16/04/14    100           0             0
17/04/14    50            0             0
20/04/14    0             0             75
22/04/14    0             20            40
......

I tried to create a blank report using formulas to group the parents together and display the sum, but it does not show all the data. Some rows in Parent 2 where I know there is data does not display the sum.

I am now trying to create subreports to extract the data which is returning the correct results, but the dates are all on different rows. Is there a way to keep the Date above in the original report and link 3 subreports (one for each of the parent categories) whilst maintaining the spacing? What I have at the moment with the subreports is:

Date        Parent 1      Parent 2      Parent 3
-------------------------------------------------
16/04/14    100           20            75
            50                          40

17/04/14    100           20            75
            50                          40

20/04/14    100           20            75
            50                          40

22/04/14    100           20            75
            50                          40
......

Can anyone help me understand how to link the subreports successfully?

Kind Regards,

John
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 25 Jul 2014 at 5:02am
I would assume that you would need to pass the date to the subreport as well so that you get the result you are looking for.

I would think that the subreport could be the same report for all columns, you just link for the parent, the date, and the item...the the subreport goes off and finds the answers.

A better strategy would be link the subreport by item and date and have it populate for parents (this will cut the calls to the database by 2/3, as subreports can bog a report down)

HTH
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.