Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Combining data from several subreports into one Post Reply Post New Topic
Author Message
E-T-M
Newbie
Newbie


Joined: 29 Mar 2010
Location: Ukraine
Online Status: Offline
Posts: 16
Quote E-T-M Replybullet Topic: Combining data from several subreports into one
    Posted: 30 Mar 2010 at 12:02am
Hello!

I want to create a report that would combine data from several subreports.

Say I have 2 subreports as follows:

Subreport 1              Subreport 2
----------------         ----------------
| A1 | B1 | C1 |         | A1 | B2 | C2 |
----------------         ----------------
| X1 | Y1 | Z1 |         | M1 | N1 | O1 |
| X2 | Y2 | Z2 |         | M2 | N2 | O2 |
| X3 | Y3 | Z3 |         | M3 | N3 | O3 |
| X4 | Y4 | Z4 |         | M4 | N4 | O4 |
| X5 | Y5 | Z5 |         | M5 | N5 | O5 |
| X6 | Y6 | Z6 |         | M6 | N6 | O6 |
----------------         ----------------

Summarising report (what I want to achieve)
---------------- 
| A3 | B3 | C3 |
---------------- 
| X1 | Y1 | Z1 |
| X2 | Y2 | Z2 |
| X3 | Y3 | Z3 |
| X4 | Y4 | Z4 |
| X5 | Y5 | Z5 |
| X6 | Y6 | Z6 |
| M1 | N1 | O1 |
| M2 | N2 | O2 |
| M3 | N3 | O3 |
| M4 | N4 | O4 |
| M5 | N5 | O5 |
| M6 | N6 | O6 |
----------------


Is there an elegant way to achieve that?
BTW I plan to use the summarising report as a source for a cross tab, so having two subreports visually bind together won't do the trick.

Thanks in advance!


Edited by E-T-M - 30 Mar 2010 at 2:12am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 30 Mar 2010 at 4:28am
depends on how the data for the subreport is gathered.  Since I always use stored procedures, I have much more flexibility.
 
since you want additional rows, and not multiple columns, the only option that I can think of is to use a stored proc, then you can take your 2 tables from the subreport data and combine the rows in the manner that you desire.
IP IP Logged
E-T-M
Newbie
Newbie


Joined: 29 Mar 2010
Location: Ukraine
Online Status: Offline
Posts: 16
Quote E-T-M Replybullet Posted: 30 Mar 2010 at 5:25am
Originally posted by lockwelle

depends on how the data for the subreport is gathered.  Since I always use stored procedures, I have much more flexibility.
 
since you want additional rows, and not multiple columns, the only option that I can think of is to use a stored proc, then you can take your 2 tables from the subreport data and combine the rows in the manner that you desire.


Hi,
Are you referring to DB stored procedures?
If so unfortunately I'm not allowed to create stored procedures for the DB.
Maybe there are other ways to achieve that?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 30 Mar 2010 at 10:29am

yes, I was referring to a stored procedure on the database.

I can see how you might create 1 table with the 2 columns that you want, and you display them, but the order won't be as described in the beginning...this is supposing that you can join the tables needed together to create a 'bigger' subreport, if there is duplication in the data, I can't think of any way to accomplish what you are after.
 
Perhaps someone else has an idea...
IP IP Logged
E-T-M
Newbie
Newbie


Joined: 29 Mar 2010
Location: Ukraine
Online Status: Offline
Posts: 16
Quote E-T-M Replybullet Posted: 31 Mar 2010 at 6:01am
UP!
Any ideas?
IP IP Logged
E-T-M
Newbie
Newbie


Joined: 29 Mar 2010
Location: Ukraine
Online Status: Offline
Posts: 16
Quote E-T-M Replybullet Posted: 03 Apr 2010 at 4:45am
UP!
still need a solution :)
IP IP Logged
E-T-M
Newbie
Newbie


Joined: 29 Mar 2010
Location: Ukraine
Online Status: Offline
Posts: 16
Quote E-T-M Replybullet Posted: 19 Apr 2010 at 5:01am
UP!
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.