telerik report print error

1 Answer 65 Views
Report Viewer - WinForms
arbam
Top achievements
Rank 1
Iron
arbam asked on 03 Oct 2022, 09:01 AM

I am developing in the environment of c# winforms.

 

1.

It is a method of previewing by sending parameters to the report file (trdp) from the source code.

in the pop-up preview, the value is displayed normally, but if i click the print button for printing, an error occurs.

I also attached the error image.

 

2.

In the report.png picture, my report sends parameters like that on each page.
If there are more than seven parameters, the first preview is set and the report viewer object is recreated to send the new parameters. (Two previews are set)
I hope the preview will turn on naturally as much as I send the parameters.

 

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 06 Oct 2022, 07:00 AM

Hi Abram,

Regarding the first issue, note that for technical reasons, the class Telerik.Reporting.Processing.PrintDialogHelper resides in different assemblies for the different frameworks:

  • for .NET Core/5/6 in  Telerik.ReportViewer.WinForms.dll
  • for .NET Framework in Telerik.Reporting.dll

That's why I suspect that you have referenced Telerik.Reporting assembly for .NET Standard 2.0 in a .NET Framework project. If so, you need to reference the assembly targeting the .NET Framework.

When it comes to the second issue, I'm afraid I don't understand it completely. Do you use Multi-Value parameters? Or do you need to have two viewers if there are more than 6 parameters in the report?

You may also open a support ticket and send us a sample project demonstrating the requirement.

Regards,
Todor
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
arbam
Top achievements
Rank 1
Iron
commented on 06 Oct 2022, 12:27 PM | edited

Hi Todor, thank you !

Gets the value of the parameter in each row of the grid.
And now all the panels in the report are coming out.
But I want to show only panels with parameters.

Todor
Telerik team
commented on 11 Oct 2022, 07:33 AM

Hello Abram,

I noticed that you add parameters to the ReportSource > Parameters collection. Note that parameters with the same names should already exist in the report definition. Otherwise, the parameter values would be ignored.

Have you hardcoded all the Panels on the page? If so, consider using Bindings or Conditional Formatting to hide those of them you don't want to be visible. You may use the Report Function Parameters(parameterName) to check whether the parameter exists.

Can you send us the Report definition? Now it is not very clear to me how you have configured the Panels in the report.

Tags
Report Viewer - WinForms
Asked by
arbam
Top achievements
Rank 1
Iron
Answers by
Todor
Telerik team
Share this question
or