Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Tips and Tricks
Message Icon Topic: printing twice the same data Post Reply Post New Topic
Author Message
kaosvader
Newbie
Newbie
Avatar

Joined: 31 Mar 2008
Location: Mexico
Online Status: Offline
Posts: 5
Quote kaosvader Replybullet Topic: printing twice the same data
    Posted: 09 Apr 2008 at 2:21pm
Hi, someone knows what I need to do to print tywice the information in the same sheet??, let me be clear, my report has the info about delivery money, but I need to have a "copy" of this info in the same report, but I dont know how to do it, please help me...
 
In advance, thanks
MCCC ALEX
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 09 Apr 2008 at 5:33pm
This can only be done using subreports. Put the same subreport on the main report twice to trick it into printing the data twice. I cover many tips and tricks about subreports in Chapter 9 of my Encyclopedia book. You can find out more about my books at Amazon.com or reading the Crystal Reports eBooks online.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
paulwpark
Newbie
Newbie


Joined: 19 Apr 2008
Location: United States
Online Status: Offline
Posts: 2
Quote paulwpark Replybullet Posted: 19 Apr 2008 at 11:24pm
I try to avoid subreports whenever possible.  I learned this tip from this one developer.  Instead of using subreports, try using a cartesean join by joining your data with a table with 2 records.  This way, your report will go through the data twice and you can use that data to show the data differently on the same report.

Edited by paulwpark - 22 Apr 2008 at 9:40am
IP IP Logged
theBlueFrog
Newbie
Newbie
Avatar

Joined: 22 Apr 2008
Online Status: Offline
Posts: 8
Quote theBlueFrog Replybullet Posted: 22 Apr 2008 at 4:33am
Alternatively (and more or less the same solution as paul's, only neater ;-) ), you could create an SQL view that joins 2 identical SELECT statements together in a UNION join, and add a field to the end with a 0 for rows in the first SELECT statement, and a 1 for rows in the second SELECT.
 
Then group by the 0 or 1 field in the report.
 
Then you've created no extra table to 'fudge' your report - just a view that does the job and contains the correct data for the report (and will probably run a little quicker than the table join, too).
 
 
Like Paul, I always try to avoid using sub-reports.  They add a level of complexity to your report design and have an undesirable performance-hit.  In short, they're ugly!  You can get around the need for them in almost all situations by creating an SQL view.


Edited by theBlueFrog - 22 Apr 2008 at 4:37am
IP IP Logged
paulwpark
Newbie
Newbie


Joined: 19 Apr 2008
Location: United States
Online Status: Offline
Posts: 2
Quote paulwpark Replybullet Posted: 22 Apr 2008 at 9:36am
THe only issue with what Blue Frog mentioned is that you would have to create a custom view every time you want to see data duplicated in two ways.  What I did was create a stored procedure with a parameter to enter the number of times I want to see the records duplicated and then use this stored procedure with any report I want to see the same data more than once. 
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.017 seconds.