简体   繁体   English

SSRS报表设计不会与CRM报表和ASP.net报表查看器一起继续

[英]SSRS report design doesn't continue with CRM reporting and ASP.net report viewer

I am working on Microsoft Dynamics CRM reports and designed my report in SSRS vs2010 and imported into CRM reporting and then view them through asp.net report viewer vs2012. 我正在研究Microsoft Dynamics CRM报表,并在SSRS vs2010中设计了报表,然后将其导入CRM报表中,然后通过asp.net报表查看器vs2012进行查看。

I have used several text box controls in front of a background large text box which shows a dynamic text depend on the user. 我在背景大文本框前面使用了几个文本框控件,该框显示取决于用户的动态文本。 Basically I have two layers at my report. 基本上,我的报告有两层。 and all two layers contain text boxes with dynamic values. 并且所有两层都包含带有动态值的文本框。

But when I view the report from CRM or report viewer both of them doesn't support my design. 但是,当我从CRM或报表查看器查看报表时,它们都不支持我的设计。 It shows the front layer text boxes at the bottom of the page after the large background text box. 它在大背景文本框之后的页面底部显示顶层文本框。

But when I save the pdf from report viewer it has the correct design. 但是,当我从报表查看器中保存pdf时,它具有正确的设计。 !!!! !!!!

What can I do to get my ssrs report design into CRM and asp.net report viewer. 我该怎么做才能将我的ssrs报表设计集成到CRM和asp.net报表查看器中。

Any comment would be valuable. 任何评论都是有价值的。

Mathee Mathee

//////////////////////////////////////////////// What can I do to set the byte array of the report to report viewer //////////////////////////////////////////////// 什么可以我确实将报表的字节数组设置为报表查看器

byte[] reportByte = Singleton<ReportGenerationFacade>.Instance.createReport(service, param, paramVal, reportName);
        Response.Clear();
        MemoryStream ms = new MemoryStream(reportByte);
        Response.ContentType = "application/pdf";

consider my reportviewer as, 认为我的报表查看器是

Microsoft.Reporting.WebForms.ReportViewer MyReportViewer;

How should I proceed with MyReportViewer. 我应该如何进行MyReportViewer。

Mathee Mathee

Reporting Services could have problems rendering overlapped objects (see rsOverlappingReportItems warnings when compiling solution). Reporting Services 可能无法呈现重叠的对象(编译解决方案时,请参阅rsOverlappingReportItems警告)。

But usually everything is rendered correctly in print layout or exporting to PDF. 但是通常所有内容都可以在打印布局中正确显示或导出为PDF。

So in Windows Forms you can open your ReportViewer using PrintLayout as default: rdlViewer.SetDisplayMode(DisplayMode.PrintLayout) 因此,在Windows窗体中,您可以使用默认的rdlViewer.SetDisplayMode(DisplayMode.PrintLayout)打开ReportViewer: rdlViewer.SetDisplayMode(DisplayMode.PrintLayout)

In ASP.NET you can print your report directly to PDF using a function like this: How to render client report definition files (.rdlc) directly to the Response stream without preview ASP.NET中,您可以使用以下功能将报告直接打印为PDF: 如何在不预览的情况下直接将客户端报告定义文件(.rdlc)呈现为响应流

I use a modified version of this function to show PDF in a popup window. 我使用此功能的修改版以在弹出窗口中显示PDF。 Some hints: render your report using LocalReport.Render Method on MyReportViewer.LocalReport and store it in a Session.Item as Byte(), call an empty popup window using javascript window.open, display report using Response.OutputStream.Write in Page_Load event. 一些提示:使用MyReportViewer.LocalReport上的LocalReport.Render方法呈现报告,并将其存储为Session.Item作为Byte(),使用javascript window.open调用一个空的弹出窗口,使用Page_Load事件中的Response.OutputStream.Write显示报告。

finally I found the answer to my question. 终于我找到了问题的答案。 I rendered report into image format and then loaded into the system. 我将报告渲染为图像格式,然后加载到系统中。 and then pdf generation was conducted as a separate function. 然后将pdf生成作为单独的功能进行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM