Page 1 of 1

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

Posted: Sat Nov 01, 2008 6:19 am
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????

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

Posted: Sun Nov 02, 2008 11:10 am
by Edward
Hi.

Please call the following command once for your StiViewerControl:

Code: Select all

stiViewerControl1.SetZoomOnePage();
Thank you.

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

Posted: Mon Nov 03, 2008 12:22 am
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????

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

Posted: Mon Nov 03, 2008 12:29 am
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....

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

Posted: Mon Nov 03, 2008 4:01 am
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.