When previewing the print a blank space is added

1 Answer 138 Views
General Discussions Report Viewer - WinForms
Jhavi
Top achievements
Rank 1
Jhavi asked on 22 Jun 2023, 12:37 AM

[ENGLISH]

Greetings, I'm a newbie, I'm testing telerik while learning c# with visual studio and WinForms. The issue is that I have made a report that is later displayed in a reportviewer, the problem is that clicking on the print icon of the reportviewer adds a blank space to the right side of the sheet to be printed, it is worth mentioning that the sheet is set to A4 (margins 0.5mm, + width 20cm = 21cm =>A4).

Image 01 - The report design is seen,
Screenshot 02 - The reportviewer added in the windowsform is seen,
Image 03 - It is seen when the report is loaded, so far so good.
Image 04 - It is seen when I click on the print or preview icon (any of the two) and the blank space on the sheet is displayed. Even when printing a physical document, the additional space is shown.
Image 05 - This image shows the code that I use to pass data to the reportviewer and the table.

By code I have not added any configuration, only the filling of data to the table.

What am I doing wrong, do I need to configure any additional parameters? Please help.

 

[ESPAÑOL]

Saludos, soy novato, estoy probando telerik mientras aprendo c# con visual studio y WinForms. El asunto es que tengo realizado un informe que posteriormente se muestra en un reportviewer, el problema es que al hacer clic en el icono de imprimir del reportviewer se agrega un espacio en blanco al lado derecho de la hoja a imprimir, cabe mencionar que la hoja está configurada en A4 (margins 0.5mm, + width 20cm = 21cm =>A4).

Imagen 01 - Se ve el diseño de reporte, 
Imagen 02 - Se ve el reportviewer agregado en el windowsform,  
Imagen 03 - Se ve cuando se carga el reporte, hasta ahí todo bien. 
Imagen 04 - Se ve cuando doy clic en el icono de imprimir o previsualizar (cualquiera de los dos) y se muestra el espacio en blanco en la hoja. Inclusive al imprimir un documento físico se muestra el espacio adicional.
Imagen 05 - En esta imagen se ve el codigo que utlizo para pasar datos al reportviewer y a la tabla.

Por código no tengo agregado ninguna configuración, solamente el llenado de datos a la tabla.

¿Qué estaré haciendo mal, necesito configurar algún parámetro adicional? Ayuda por favor.

1 Answer, 1 is accepted

Sort by
0
Momchil
Telerik team
answered on 26 Jun 2023, 03:38 PM

Hello Javier,

Based on the images you shared and your description of the page settings, everything appears to be configured correctly.

Considering that the only part of the report you are modifying programmatically is its data source, I would assume that there is a Binding that changes the PageSettings.PaperSize property of the report. Could you check whether there are any bindings that could interfere with the aforementioned property? 

And if the above does not help, you can strip your report of any sensitive information and send it to me. I will try to reproduce the issue and, hopefully, be able to find the culprit.

Best Regards,
Momchil
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at https://learn.telerik.com/.
Jhavi
Top achievements
Rank 1
commented on 07 Jul 2023, 07:58 PM | edited

Greetings, thanks for answering. I have found what the problem is. It turns out that my monitor is of high PPI, therefore, it rescales the windows forms. When running the application with automatic rescaling disabled, everything works correctly, but when automatic rescaling is active, the aforementioned problem occurs. Particularly, I need the app to have automatic rescaling. How can I do so that the rescaling does not affect the telerik reportviewer? Or is it not possible to make the rescaling not affect only the reportviewer?

Momchil
Telerik team
commented on 12 Jul 2023, 01:45 PM

Hello Javier,

I am glad to hear you managed to find the actual source of the issue.

Although I am not sure how the automatic scaling option you mentioned works, generally, making the application DPI-aware tends to resolve most scaling issues.

Take a look at the "Report Does Not Render Correctly on Higher Resolution" Knowledge Base article for the exact steps necessary to make the application DPI-aware.

I hope this helps resolve the rescaling issue.

Tags
General Discussions Report Viewer - WinForms
Asked by
Jhavi
Top achievements
Rank 1
Answers by
Momchil
Telerik team
Share this question
or