0
votes

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.

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

What can I do to get my ssrs report design into CRM and asp.net report viewer.

Any comment would be valuable.

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.

Mathee

2

2 Answers

1
votes

Reporting Services could have problems rendering overlapped objects (see rsOverlappingReportItems warnings when compiling solution).

But usually everything is rendered correctly in print layout or exporting to PDF.

So in Windows Forms you can open your ReportViewer using PrintLayout as default: 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

I use a modified version of this function to show PDF in a popup window. 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.

0
votes

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.