Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Print 2 or more reports in one click Post Reply Post New Topic
Author Message
botete
Newbie
Newbie
Avatar

Joined: 16 Sep 2007
Location: United States
Online Status: Offline
Posts: 15
Quote botete Replybullet Topic: Print 2 or more reports in one click
    Posted: 21 Oct 2007 at 8:50pm
Hi and Good Day!
 
I have an .aspx page that I would like to generate 2 reports, e.g., Offer.rpt (details) and Letter.rpt (covering letter), which I want to be printed simultaneously in just one click of a button. I tried inserting the second part just next from the first, but only the first page was called and only the Offer.rpt was printed.
 
// for Offer.rpt
 
                Session["codate"] = forfiltering;
                Session["brokercode1"] = DropDownList1.Text;
                Response.Redirect("Offer.aspx"); 
 
// for Letter.rpt
 
                Session["brokercode2"] = DropDownList1.Text;
                Response.Redirect("Letter.aspx");
 
Could anyone give me a sample procedure or the correct way of coding these? Thank you!
 
 
Bo Smile


Edited by botete - 22 Oct 2007 at 1:04am
IP IP Logged
botete
Newbie
Newbie
Avatar

Joined: 16 Sep 2007
Location: United States
Online Status: Offline
Posts: 15
Quote botete Replybullet Posted: 23 Oct 2007 at 7:09pm

help please!

IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 23 Oct 2007 at 11:00pm
You can call the PrintToPrinter() method of the ReportDocument class for each report. I never tried printing out two reports in the same page, but it will probably work.
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
botete
Newbie
Newbie
Avatar

Joined: 16 Sep 2007
Location: United States
Online Status: Offline
Posts: 15
Quote botete Replybullet Posted: 25 Oct 2007 at 12:58am
Thanks Sir. Yes I already used the PrintToPrinter() method for each page, but only the first is printed.
 
If I may ask, this just came into mind, since if called the first page, doesn't the control goes back to the calling page to call the next? Is there a need to call another command for the control to go back to the calling page?
 
Is this is so with ASP.net?
 
Thanks,
Bo Smile
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 25 Oct 2007 at 8:01am
Yes, this is so for ASP.NET. However, I don't know why it wouldn't be working for your reports. Must be how the viewer interacts with the web 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
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.016 seconds.