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

Report viewer display different from printing or report designer in VB

9 Answers 2104 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Wimpie Schoeman
Top achievements
Rank 1
Wimpie Schoeman asked on 29 Jun 2010, 12:33 PM
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

9 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 30 Jun 2010, 04:07 PM
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
0
Wimpie Schoeman
Top achievements
Rank 1
answered on 01 Jul 2010, 09:40 AM
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' 
0
Steve
Telerik team
answered on 02 Jul 2010, 04:46 PM
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
0
Jeremy
Top achievements
Rank 1
answered on 02 Dec 2010, 05:01 PM
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.
0
Steve
Telerik team
answered on 03 Dec 2010, 06:39 PM
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.
0
Oghenez
Top achievements
Rank 1
answered on 23 Apr 2016, 07:14 PM

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

0
Stef
Telerik team
answered on 27 Apr 2016, 02:46 PM
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
0
Wade Ballance
Top achievements
Rank 1
answered on 08 Sep 2016, 07:44 PM

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

0
Stef
Telerik team
answered on 09 Sep 2016, 03:54 PM
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
Tags
General Discussions
Asked by
Wimpie Schoeman
Top achievements
Rank 1
Answers by
Steve
Telerik team
Wimpie Schoeman
Top achievements
Rank 1
Jeremy
Top achievements
Rank 1
Oghenez
Top achievements
Rank 1
Stef
Telerik team
Wade Ballance
Top achievements
Rank 1
Share this question
or