send multiple reports to the printer
send multiple reports to the printer
Hi, I have a report that prints a single report with many dataset that are of a client. The dataset is loaded with a CustomerID.
I can not group the reports by CustomerID, each report is for a customer.
I want to send to print multiple reports for different customers without having to open multiple windows, one for each client.
Is it possible to send multiple reports to the printer queue without opening multiple windows?
thanks!
I can not group the reports by CustomerID, each report is for a customer.
I want to send to print multiple reports for different customers without having to open multiple windows, one for each client.
Is it possible to send multiple reports to the printer queue without opening multiple windows?
thanks!
send multiple reports to the printer
Hello,
As a way, you can create multiple reports for different CustomerID, and then merge them into one report and send for printing.
Thank you.
As a way, you can create multiple reports for different CustomerID, and then merge them into one report and send for printing.
Thank you.
send multiple reports to the printer
Hi, thanks for your response.
Could you tell me more about how I can combine multiple reports into one?
I can create multiple reports but I do not know how to group.
thanks
Could you tell me more about how I can combine multiple reports into one?
I can create multiple reports but I do not know how to group.
thanks
send multiple reports to the printer
Hello,
Please see the sample code:
Let us know if you need any additional help.
Thank you.
Please see the sample code:
Code: Select all
StiReport report = new StiReport();
report.Load("e:\\Report.mrt");
report.Compile();
report["VariableCustomerID"] = 1;
report.Render(false);
StiReport reportAll = new StiReport();
reportAll.Render();
reportAll.RenderedPages.Clear();
foreach (StiPage page in report.RenderedPages)
{
reportAll.RenderedPages.Add(page);
}
report["VariableCustomerID"] = 2;
report.Render(false);
foreach (StiPage page in report.RenderedPages)
{
reportAll.RenderedPages.Add(page);
}
//..
reportAll.Show();
Thank you.
send multiple reports to the printer
Hi, I have tried to do what you told me but I can not work. Can you check my code and see what I do wrong?
Code: Select all
Dim report As New StiReport
report.Load(MapPath("~/Reports/report.mrt"))
report.Compile()
'report.Render(False)
Dim reportAll As New StiReport
reportAll.Render()
reportAll.RenderedPages.Clear()
Dim Customers(2) As String
Customers(0) = 719
Customers(1) = 717
For k = 0 To Customers.Length - 2
Dim CustomerID As Integer = Customers(k)
Dim DSCustomer As DataSet
DSCustomer = CNResid.ShowCustomer(CustomerID)
Dim DS2 As New DataSet
DS2.Tables.Add(DSCustomer.Tables(0).Copy)
report.RegData(DS2)
report.Render(False)
For Each page As StiPage In report.RenderedPages
reportAll.RenderedPages.Add(page)
Next
Next
'reportAll.Show()
StiWebViewerFx1.Report = reportAll
send multiple reports to the printer
Hello,
Can you please send us a sample project, which reproduce the issue?
Thank you.
Can you please send us a sample project, which reproduce the issue?
Thank you.
send multiple reports to the printer
I attach a Visual Studio 2008 project with the code to join two reports into one report. thanks
- Attachments
-
- 955.Prueba_2ReportIn1.rar
- (2.02 MiB) Downloaded 635 times
send multiple reports to the printer
Hello,
Please check modified project in attachment.
Thank you.
Please check modified project in attachment.
Thank you.
- Attachments
-
- 958.PruebaPDF.zip
- (103.59 KiB) Downloaded 931 times
send multiple reports to the printer
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.
The code is similar to what I had. Just change one line and is similar.
In this example I use variables but usually I use Dataset to load the report. For example:
Dim DSvisualizar As New DataSet
DSvisualizar.Tables.Add(myDatatable.Copy())
report.RegData(DSvisualizar)
The code is similar to what I had. Just change one line and is similar.
In this example I use variables but usually I use Dataset to load the report. For example:
Dim DSvisualizar As New DataSet
DSvisualizar.Tables.Add(myDatatable.Copy())
report.RegData(DSvisualizar)
send multiple reports to the printer
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.