Report viewer display different from printing or report designer in VB

10 posts, 0 answers
  1. Wimpie Schoeman
    Wimpie Schoeman avatar
    7 posts
    Member since:
    Jun 2010

    Posted 29 Jun 2010 Link to this post

    We have a Silverlight web based application and we use the Telerik reporting tool.

    My problem is that the formatting of the report as displayed in the report viewer when running the app differs from what I see at design time and also from what I see when I preview in design mode or print the report from the app.

    In the attached example, the formatting of the numbers are right aligned (see payslip printed version), but on the report viewer, they show left aligned.

    I have also encountered other problems such as the headers of the report just being cut off when I use a bigger font - in summary, it seems that the report viewer disregards a lot of the design formatting.

    Can anybody please help me with this issue.

    Kind regards
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 30 Jun 2010 Link to this post

    Hi Wimpie,

    We were not able to reproduce the alignment issues you've mentioned. In fact you can review our online Silverlight demo (specifically the Invoice report), and export to PDF to see that the alignment of the "Quantity", "Unit Price" etc. columns is respected in PDF.
    As for the second issue you've reported - can you elaborate. What do you mean by cut off? If an item in the page sections grows at runtime for some reason, it would be cut off and this is expected. Page headers and footers are not related to the report itself, but are relative to the margins of the report's media, i.e. to the paper or screen and in this line of thoughts, their height remains a constant as defined in the report definition.

    Sincerely yours,
    Steve
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Wimpie Schoeman
    Wimpie Schoeman avatar
    7 posts
    Member since:
    Jun 2010

    Posted 01 Jul 2010 Link to this post

    Hi Steve

    Thanks for the reply.

    I have had a look at your invoice demo and as you say, the formatting is respected when printing to PDF. In your case, however, the amount columns are left aligned and shows as left aligned on the both the report viewer and the PDF.

    In my case, the amounts are right aligned in order to keep the decimal points in line. (Textbox properties, Style, TextAlign = Right)

    My problem is with the display in the report viewer and not when printing (to PDF or printer). Printing respects my formatting as set in the design of the report but report viewer does not.

    As for the other problem I mentioned, I attach two screen dumps for you.

    The one (EmpDetail_Design) is the formatting as in the design - The font of the textbox containing the words 'EMPLOYEE DETAIL' is set to 24pt.

    The second screen dump (EmpDetail_App) is how it is displayed in the report viewer. As you can see, it differs completely from my design as most of the wording is not displayed.

    Once again, if I print this report to printer or PDF, the formatting as in my design is respected.

    It really seems as if the report viewer disregards certain design format settings.

    Regards

    Wimpie

    PS: Just to set things straight - 'designer in VB' should read 'designer in Visual Studio' 
  5. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 02 Jul 2010 Link to this post

    Hi Wimpie,

    The demo reports are installed locally on your machine along with the product, so you can open the Visual Studio examples, change the TextAlign to right and you would once again observe correct behavior. We've tested on several different reports as well to make sure there is no such glitch.
    Thank you for elaborating on the second problem as well. Unfortunately we had no success in replicating this behavior in our local tests either.
    That is why we kindly ask you to provide us with sample runnable report/project, which shows the problems you've encountered. Once we review it, we would be able to provide more information.

    Sincerely yours,
    Steve
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Jeremy
    Jeremy avatar
    1 posts
    Member since:
    Sep 2010

    Posted 02 Dec 2010 Link to this post

    I am having a similar issue to the second issue mentioned here.   In design time, I have set the reports up very specifically for rendering a printable document.   When viewed on our test server, or on other team members systems, the formatting is getting cut off / overlapped.   I have discovered where the problem is coming from and it is in the display settings of the computer it is being viewed on.   Windows 7 has a default display setting to increase font sizes to 125% of normal size.  

    I have mine set to 100% because I prefer the smaller text, however because of this, all of my formatting from design time is messed up when viewed on a system with the default setting.   Basically what is happening is that my 10pt fonts are being scaled up to 12.5pt and causing textboxes to grow and overlap with other items.  

    Here is my main question now that I have figured out that aspect of it?  

    Is there a way of overriding that system setting so that it ignores that scaling that is occuring?   Because with the way that it is scaling only the text and not everything else in the report, it completely messes up the formatting.
  7. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 03 Dec 2010 Link to this post

    Hello Jeremy,

    What you state is a default Windows behavior is not true. The default font size setting is 100% (marked as Smaller in Windows).
    For the actual inquiry - altering the font size actually changes the resolution i.e. dots/inch, so what you observe is expected behavior and is applied to the whole system e.g. viewing pages on yahoo.com on 100% and Medium 125% differs based on the font size, so why the reports rendered in the viewer should be different?
    To answer your question directly - there is no way to control this behavior as it is the browser that picks up the system settings. You can use the PDF plug-in custom resolution settings as kind of workaround i.e. you can remove the web report viewer and show the report directly in the browser as PDF. This approach is described in the How do I display a PDF directly in the browser without exporting first help article. To avoid the browser asking you whether to open or save, remove the Response.AddHeader line and it would be opened directly in the browser (if you have Acrobat plug-in installed).

    Kind regards,
    Steve
    the Telerik team
    Get started with Telerik Reporting with numerous videos and detailed documentation.
  8. Oghenez
    Oghenez avatar
    1 posts
    Member since:
    Nov 2014

    Posted 23 Apr in reply to Wimpie Schoeman Link to this post

    Hello,

     can you help with your payslip solution, i need a way to print multiple pay slips from a data set like the sample you displayed

  9. Stef
    Admin
    Stef avatar
    3047 posts

    Posted 27 Apr Link to this post

    Hello Oghenez,

    You can achieve the same layout by:
    1. Getting all data and binding it to a report created by the Band Report Wizard. Add groups in the report based on a field which will surround records in GroupeHeader/Footer sections, which has properties like PrintOnEveryPage, PrintAtBottom and etc. allowing you to design separate groups as separate documents.
      The report can be displayed in a viewer, or processed in code.
    2. Create a report that will visualize a single payslip. then combine multiple instances of the same report in a ReportBook. The ReportBook will be processed and exported as a single document, where each report in it starts on e new page.


    Regards,
    Stef
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  10. Wade Ballance
    Wade Ballance avatar
    2 posts
    Member since:
    Feb 2010

    Posted 08 Sep in reply to Jeremy Link to this post

    I have the same behavior on Windows Forms application, if the application runs at 100% the reports looks good, but when the users change the Font Scalling to 125% or bigger the Report Viewer is creating a blank space on the right side. Even if I send to print the report it's the same behavior.

    Is there a workaround to fix this issue?

    I'm working on Telerik Reporting 2015 SP1

  11. Stef
    Admin
    Stef avatar
    3047 posts

    Posted 09 Sep Link to this post

    Hello Wade,

    This is a known issue logged in our system for improvement - High DPI settings are causing the report to be shrunken in Print Preview (related to WinForms ReportViewer). The unexpected result is that the report is shrunk and it is displayed in the top left corner of the actual page in print preview.


    The task is not assigned to a developer yet. If it is suitable, please test exporting the report programmatically without the preview - Exporting Report Programmatically.

    You may find helpful WinForms Scaling at Large DPI Settings–Is It Even Possible?

    Regards,
    Stef
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
DevCraft banner