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

Export to PDF moves placement of detail section

3 Answers 251 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 19 Feb 2009, 07:06 AM
Hi I have a report that attaches to a business object data source and renders one object per page in the detail section.  There is a static page header and page footer.  In design time I design against a single business object.  At run time I bind to a list of these objects.  Everything works fine and looks good in th report viewer until I try and export to PDF.  If I run the report against a single object the export to PDF works fine.  If I bind to a list the detail section appears progressively lower and lower o the page as one progresses through the pages, however the header and footer appear where expected.  I thought it might have been one of the fields that has a cangrow attribute set to true, but that did not seem to be the problem.  I can send a copy of the exported PDF for you to get an accurate picture.

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 19 Feb 2009, 11:33 AM
Hi Jonathan,

We believe to have grasped the erroneous behavior from your description, however we can only guess what is going on, without looking at your report. Generally the HTML format used when shown in the web Report viewer is different from the PDF format, which shares the same high-level layout engine with the Image format. Page Header/Footer are not relative to the exported media, so it is understandable that their positions are static.
You might want to review our online cars example that is bound to a List and see if you can modify it to replicate the problem you describe. You can very easily alter it by running the Visual Studio examples and directly make the changes there. If you're unable to reproduce the issue, please prepare a sample runnable project, that we can use to replicate the problem locally and we will get back to you with more info.

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jonathan
Top achievements
Rank 1
answered on 19 Feb 2009, 06:05 PM
Hi Steve,

OK looks like I got it, the detail seciont was 10.5 inches and I guess the PDF rendering requires a certain amount of extra space for margins.  I did have another question though.  Is it possible to combine a "cangrow" and a maximum height for a textbox?  I would like it to grow up until the point it makes the page wrap and pushes textboxes below onto the next page.  Also is it possible to select the export to PDF as the default value in the export dropdown making the export link active in the process?  Any extra steps I can eliminate for the user are golden.

Thanks
Jonathan
0
Steve
Telerik team
answered on 20 Feb 2009, 01:28 PM
Hello Jonathan,

We're glad that the previous issue is resolved. Up to your current questions:

  •     generally this is done automatically by our rendering engine - it would push other report items down when an upper item grows. However we are not sure of your exact case - do you need a page break after a certain item, so that all others move on to the next page? PageBreaks are only available for a section and cannot be applied per items. However you can still extend a textbox to a certain height that you would know for sure that there would be no space for others on the current page.
  • Currently it is not possible to have a predefined/preselected export format, which however makes sense and I've logged it as a feature request. You have two options for the time being:
    1. Hide all the other formats so that only PDF is left. This can be achieved through the device settings like so:
           
<configSections> 
                <section name="Telerik.Reporting" type="Telerik.Reporting.Processing.Config.ReportingConfigurationSection, Telerik.Reporting.Processing, Version=2.9.9.202, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" allowLocation="true" allowDefinition="Everywhere" /> 
              </configSections> 
              <Telerik.Reporting> 
                <Extensions> 
                  <Render> 
                    <Extension name="IMAGE" visible="true"
                      <Parameters> 
                        <Parameter name="ViewerPrintScaling" value="None" /> 
                      </Parameters> 
                    </Extension> 
                    <Extension name="MHTML" visible="false"
                    </Extension> 
                    <Extension name="XLS" visible="false"
                    </Extension> 
                    <Extension name="CSV" visible="false"
                    </Extension> 
                    <Extension name="RTF" visible="false"
                    </Extension> 
                    <Extension name="IMAGE" visible="false"
                    </Extension> 
                    <Extension name="PDF" visible="true"
                      <Parameters> 
                        <Parameter name="DocumentAuthor" value="Steve" /> 
                        <Parameter name="ViewerPrintScaling" value="None" /> 
                      </Parameters> 
                    </Extension> 
                  </Render> 
                </Extensions> 
              </Telerik.Reporting>

  • Hide the export combobox and button by setting the viewer's ShowExportGroup property to false. You can then handle the export by yourself through external UI, which would allow only export to PDF (more info here).

  • Greetings,
    Steve
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
    Tags
    General Discussions
    Asked by
    Jonathan
    Top achievements
    Rank 1
    Answers by
    Steve
    Telerik team
    Jonathan
    Top achievements
    Rank 1
    Share this question
    or