Change the zoom level of the viewer in CrystalReportsRunner #55
Unanswered
edsoncorreia
asked this question in
Q&A
Replies: 2 comments 2 replies
|
Hi, thanks for bringing this up. Yes, this could be implemented in a future version. We might only need to add another parameter. |
1 reply
|
Hi, I updated repo to work with net10 and some nuget dependencies and then I added this parameter for ZoomLevel. You can check this commit it's quite simple to add configurations -> 0f0066a The only issue I'm having is that first time dialog is opened it's not setting the zoom. Afterwards it works every time. I tried in Form_Load, tried Refresh, etc. If you want to run this updates samples and see if you can find a way to fix this while testing, you are more than welcome! |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
How can I change the zoom level of the Crystal Reports viewer at runtime? I want to set it to level 1, as described below:
The crystalReportViewer1.Zoom() method is used to programmatically change the magnification level of the Crystal Reports viewer control. The method accepts an integer parameter, zoomfactor, which dictates the desired zoom level.
Usage and Parameters
You can set the zoom level using specific integer values or a percentage magnification:
1: Fits the width of the entire page to the viewer window.
2: Fits the entire page (both height and width) within the viewer window (Full Page view).
25 to 400: Sets a specific percentage magnification level (e.g., 50 for 50%, 100 for 100%, 200 for 200%).
Example (C#):
private void Form1_Load(object sender, EventArgs e)
{
// Load the report
ReportDocument rptDoc = new ReportDocument();
rptDoc.Load(@"C:\YourReportPath\CrystalReport.rpt");
crystalReportViewer1.ReportSource = rptDoc;
}
Could this be implemented in a future version of CrystalReportsRunner?
Thank you!
Sincerely,
Edson
All reactions