Click here to Skip to main content
15,905,614 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

I'm working with Crystal Report. For Billing receipt, i have generated an report and sent it to printer for Printing. Simultaneously i have shown that same report on an new open window as "Demo Print"(just for showing user) page.

C#
Session["rpt"] = rpt;

string url = "Billview.aspx";
string fullURL = "window.open('" + url + "', '_blank', 'height=350,width=475,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,titlebar=no' );";
                ScriptManager.RegisterStartupScript(this, typeof(string), "OPEN_WINDOW", fullURL, true);


Till this works fine,
Now i need to generate an another report(Token report) using different .RPT file and need to show it on the same page of the previous report as i mentioned above.(both reports are in same size) I need to show both on one by one or side by side.
How to do that?(I don't need to open another new window for showing this Token report.)

Please share your thoughts....
Posted
Updated 16-Aug-11 23:11pm
v2

Take this report and the one you just wanted to create as two separate reports.
Create another report and place previous two reports as sub reports in this new report.
Then we can visualize both the reports.
 
Share this answer
 
v2
Comments
Prerak Patel 17-Aug-11 6:00am    
Is there something wrong with your Shift key?
J.Karthick 17-Aug-11 6:16am    
So, i need to create 3rd report to view both....

Thanks for your reply..
OP wrote:
I need to show both on one by one or side by side.

In this case put 2 crystalreportviewers in your page, load a report for a crystalreportviewer, that's all.
ASP.NET
<cr:crystalreportviewer id="rptviewer1" runat="server" xmlns:cr="#unknown" />
<cr:crystalreportviewer id="rptviewer2" runat="server" xmlns:cr="#unknown" />

Sample code
C#
//Report 1
ReportDocument cryRpt1 = new ReportDocument();
cryRpt1.Load("CrystalReport1.rpt");
crystalReportViewer1.ReportSource = cryRpt1;
crystalReportViewer1.Refresh();
//Report 2
ReportDocument cryRpt2 = new ReportDocument();
cryRpt1.Load("CrystalReport2.rpt");
crystalReportViewer2.ReportSource = cryRpt2;
crystalReportViewer2.Refresh();
 
Share this answer
 
Comments
J.Karthick 18-Aug-11 9:45am    
yes...I don't know why, this idea not comes into my mind...

Thanks a lot...
thatraja 18-Aug-11 9:49am    
:) Welcome

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900