How to fit the report pages to stipreview report control?????

Stimulsoft Reports.NET discussion
Post Reply
abhi0410
Posts: 47
Joined: Fri Sep 26, 2008 12:42 pm
Location: bombay

How to fit the report pages to stipreview report control?????

Post by abhi0410 »


Hi,,,

how to fit the report pages to stireport preview control???

i mean i have docked the preview control to the form...Now when the report is shown then the report page doesnt fit automatically to the stireport preview control????

any suggestion how to do????
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to fit the report pages to stipreview report control?????

Post by Edward »

Hi.

Please call the following command once for your StiViewerControl:

Code: Select all

stiViewerControl1.SetZoomOnePage();
Thank you.
abhi0410
Posts: 47
Joined: Fri Sep 26, 2008 12:42 pm
Location: bombay

How to fit the report pages to stipreview report control?????

Post by abhi0410 »

thanks..Its working...

Now when i click on maxmize button of form or drag the form to increase the size of the form then i want the page of the report to automatically fit to the form???????

As you provided the code i have used it when the report loaded...

the code i have written is when i am showing the form...

stiSales_Pick_List.Compile();
stiSales_Pick_List.CompiledReport.DataSources["Pick_List"].Parameters["@SalesOrderNo"].ParameterValue = orderNumber;
stiSales_Pick_List.Render(false);
stiPreviewControl1.SetZoomOnePage();
stiPreviewControl1.Report = stiSales_Pick_List;

How to do that????
abhi0410
Posts: 47
Joined: Fri Sep 26, 2008 12:42 pm
Location: bombay

How to fit the report pages to stipreview report control?????

Post by abhi0410 »

Sorry to tell that its not.(i thought its working)...Above i have written the code in my post......

Am i writting the code properly???????

If i am wrong somewhere then o suggest me please...

Thanks....
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to fit the report pages to stipreview report control?????

Post by Edward »

I checked your code and it worked as expected for 2008.2 version.

You can add that command stiPreviewControl1.SetZoomOnePage(); to ResizeEnd event handler of the Form on which the preview control is located.

Thank you.
Post Reply