Render StiReport

Stimulsoft Reports.NET discussion
Post Reply
ngaheer
Posts: 44
Joined: Sat Jul 22, 2006 1:12 am
Location: San Jose

Render StiReport

Post 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,


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

Render StiReport

Post 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.
Post Reply