This is a migrated thread and some comments may be shown as answers.

Blank Pages in Export to PDF

3 Answers 718 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Deependra
Top achievements
Rank 1
Deependra asked on 05 Apr 2013, 09:37 AM
Hi,

We are using telerik report version 'Telerik_Reporting_Q2_2010_v4_1_10_714_dev.msi'.

Previously, we have problem of having first page blank in the report viewer. So, to correct this problem, we added following code in the vb file and its working properly.

Public Sub New()
        InitializeComponent()
        detail.Height = Unit.Pixel(10)
    End Sub


But while exporting same report to PDF we are seeing first page blank in PDF. Here is the code how we are exporting report to PDF,

  Protected Sub ExportToPDF(ByVal reportToExport As Telerik.Reporting.Report)

        Dim deviceInfo As Hashtable = New Hashtable()
        deviceInfo("FontEmbedding") = "Subset"
        Dim reportProcessor As New ReportProcessor()
        Dim result As RenderingResult = reportProcessor.RenderReport("pdf", reportToExport, deviceInfo)

        Dim fileName As String = result.DocumentName + ".pdf"
        Response.Clear()
        Response.ContentType = result.MimeType
        Response.Cache.SetCacheability(HttpCacheability.Private)
        Response.Expires = -1
        Response.Buffer = True

        Response.AddHeader("Content-Disposition", String.Format("{0};FileName=""{1}""", "attachment", fileName))
        Response.BinaryWrite(result.DocumentBytes)
        Response.End()

    End Sub


Do you have any idea how to resolve this?

Also, please see the attachment file which is the format of PDF we are getting.

Thanks

3 Answers, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 08 Apr 2013, 02:36 PM
Hello Deependra,

Please check and apply the suggestions from the "Problem: Telerik Reporting renders blank pages" KB article. 
From the screenshot it looks like you have a table with a very long row which cannot be broken and starts on a new page. This issue usually occurs when you have a nested table which is inside a cell of another table. With such a layout (nested tables) this cannot be avoided.
We would suggest to change the layout of the application so it doesn't use nested tables. Instead, use nested groups (you can keep the most inner table) and transform the outer table into group. 

Kind regards,
Petio Petkov
the Telerik team

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

0
Deependra
Top achievements
Rank 1
answered on 25 Apr 2013, 01:34 PM
Hi,

The problem of blank page is not in the telerik report itself but the problem is in PDF file which is exported from the report. For those cases with large body contain, report becomes large in size(length) but the size of PDF page is fixed. So while exporting report to PDF , first blank page is showing in PDF file. Is there any solution for this?

Also, for some cases report header and footer are printing in same line(overlapping). For header section, we set property PrintOnEveryPage='True'. Can you suggest what is the problem?

Thanks,
Deependra
0
Peter
Telerik team
answered on 29 Apr 2013, 12:03 PM
Hello Deependra,

Check out the Problem: Telerik Reporting renders blank pages KB article that elaborates on the topic.

If you still experience any difficulties we will appreciate if you open a support thread and send us the problematic report definition to review on our end. 

Kind regards,
Peter
the Telerik team

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

Tags
General Discussions
Asked by
Deependra
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Deependra
Top achievements
Rank 1
Peter
Telerik team
Share this question
or