Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Append ReportDocuments Post Reply Post New Topic
Author Message
Crystalbeginner
Newbie
Newbie


Joined: 18 Jun 2008
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote Crystalbeginner Replybullet Topic: Append ReportDocuments
    Posted: 18 Jun 2008 at 5:43am
Hi all,
I have a question regarding appending the report documents.
I have a requirement where the user can select any number of customers at a time and print or export the data, i am using crystal reports for the same.
At the moment, i am passing each of the selected customerid as a parameter to the tableadapter and retrieving the data.There is a single report desinged which contains the field layout fixed.
 
Now, what i want to do is create a new document each time i loop thorugh the count of the customer rows selected and append each document one after one.Is it possible to do this way?
 
Or can anyone please suggest any better approach for the same.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 18 Jun 2008 at 9:53am
What do you mean to append each document? Do you mean that you want to have separate reports print one after the other? If so, you could group on the CustomerId and use the Group Header and Group Footer as the page header and footer. Set the New Page After property for the group footer and this will make each customer print on its own page.
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
Crystalbeginner
Newbie
Newbie


Joined: 18 Jun 2008
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote Crystalbeginner Replybullet Posted: 19 Jun 2008 at 3:37am

What I meant with append the documents is whether an object of Class ReportDocument type has any function named append or add so that we can get a final document?

For example let rptdoc1 , rptdoc2 ,rptdoc3 be three  ReportDocument objects.
Can we do something like..
 
rptdoc3 = rptdoc1 + rptdoc2..
 
i want an expression which shall help me in doing this...
 
And your answer it partially helps me to proceed further because i just got to know as to how we can group fields together from the database.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 19 Jun 2008 at 2:33pm

No, there's no way to append one run of a report to the end of another.  You'll have to set up the grouping and your interface so that the users can select all of the customers that they want at the same time.  You pass this information into the report in a parameter and then run the report for all of them at one time, using Brian's information about setting page breaks between each customer.  If you're including page numbers on the report, you'll also want to turn on "Reset Page Number After" in the Customer group footer section.

-Dell

IP IP Logged
Crystalbeginner
Newbie
Newbie


Joined: 18 Jun 2008
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote Crystalbeginner Replybullet Posted: 20 Jun 2008 at 12:55am
Thanks a lot...!!!
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.