在同一页面上显示两个不同的Reports.rpt [英] Showing two different Reports(.rpt) on Same Page

查看:107
本文介绍了在同一页面上显示两个不同的Reports.rpt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用Crystal Report.对于帐单收据,我已经生成了一份报告,并将其发送给打印机进行打印.同时,我在新打开的窗口中显示了与演示打印"(仅用于显示用户)页面相同的报告.



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.

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);



直到一切正常,
现在我需要使用不同的.RPT文件生成另一个报告(令牌报告),并需要将其显示在我上面提到的上一个报告的同一页面上.(两个报告的大小都相同)我需要在一个报告中同时显示两者并排或并排.
怎么做?(我不需要打开另一个新窗口来显示此令牌报告.)

请分享您的想法....



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....

推荐答案

接受此报告和您刚想创建的报告,作为两个单独的报告.
创建另一个报告,并将前两个报告作为子报告放置在此新报告中.
然后我们可以将这两个报告可视化.
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.


OP写道:

我需要同时显示两个一个或一个并排.

I need to show both on one by one or side by side.


在这种情况下,请在页面中放置2个crystalreportviewers,然后为crystalreportviewer加载report即可.


In this case put 2 crystalreportviewers in your page, load a report for a crystalreportviewer, that''s all.

<cr:crystalreportviewer id="rptviewer1" runat="server" xmlns:cr="#unknown" />
<cr:crystalreportviewer id="rptviewer2" runat="server" xmlns:cr="#unknown" />


示例代码


Sample code

//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();


这篇关于在同一页面上显示两个不同的Reports.rpt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆