Page 1 of 1

Render StiReport

Posted: Wed Mar 12, 2008 12:20 am
by ngaheer
Hi,
We are using StiReport.render() Api which seem to be not working as expected unless we are missing something.
Basically we want to extract each of the rendered pages one by one and email each page to a different email address.


When we are using stiReport.Render(False,1,1) and then when we call stiReport.Export(), we get only the second page exported (which is all that we rendered) and that is correct. But the same call with frompage = 0 and toPage = 0 parameters i.e. stiReport.Render(False,0,0) then its renders all pages and which in turn results in all pages getting exported when we call stiReport.export() api.

so please let us know a) if this is a bug or expected behavior b) in case it is expected, how can we only render the first page?

Thanks in Advance,



Render StiReport

Posted: Wed Mar 12, 2008 9:14 am
by Edward
Yes, the issue with Render(False,0,0) is confirmed.

The workaround now may be the following:

Code: Select all

    report.Render(False, 0, 1)
    If (report.RenderedPages.Count = 2) Then
        report.RenderedPages.RemoveAt(1)
    End If
Thank you.