send multiple reports to the printer
Posted: Wed May 04, 2011 7:15 am
Hello,
Thank you.
Please modify your code:jpascual wrote:Thanks for your answer but the example does not work. Displays the report in black and with only one page when it should have two pages and data.
Code: Select all
Dim report As New StiReport
report.Load(MapPath("~/report.mrt"))
report.Compile()
report.Render(False)
Dim reportAll As New StiReport
reportAll.NeedsCompiling = False
reportAll.IsRendered = True
reportAll.RenderedPages.Clear()
Dim Customers(2) As String
Customers(0) = 719
Customers(1) = 717
For k As Integer = 0 To Customers.Length - 2
Dim CustomerID As Integer = Customers(k)
report("Variable1") = CustomerID.ToString()
report.Render(False)
For Each page As StiPage In report.RenderedPages
reportAll.RenderedPages.Add(page)
Next
Next
StiWebViewerFx1.Report = reportAll
This line of code depends on whether the report is compiled or not.jpascual wrote:The code is similar to what I had. Just change one line and is similar.
Thank you.