This is a migrated thread and some comments may be shown as answers.

Printing multiple reports

1 Answer 188 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
katie
Top achievements
Rank 1
katie asked on 06 Oct 2010, 09:14 PM
In my application, I have a list of orders. I want to be able to check a box next to several of these orders and print them as a report. I am trying to do this with a Report Book. I loop through the list of orders and if it is checked, I create a report and add it to a report book. But all I get is several of the same order. Example: I want to print orders 1, 2, 3, and 4. But my report book shows orders 4, 4, 4, and 4.

Here is the print code:

 

private void Print()

{

System.Data.EntityClient.

 

EntityConnectionStringBuilder entCSB = new System.Data.EntityClient.EntityConnectionStringBuilder();

 

entCSB.ConnectionString =

 

App.CurrentApp.CurrentEnvironment.Connection;

 

Telerik.Reporting.

 

ReportBook book = new Telerik.Reporting.ReportBook();

 

 

 

 

foreach (OpenOnlineOrderDetails details in Transactions)

{

 

 

if (details.Selected)

 

{

 

book.Reports.Add(new OrderReport(entCSB.ProviderConnectionString, details.SaleTransactionID.ToString()));

 

}

}

 

AppView.Views.

 

ReportForm report = new LogiText.AppView.Views.ReportForm(book);

 

report.Show();

 

}



And this is the form with the report viewer:

public partial class ReportForm : Form  

 

{

Telerik.Reporting.

 

ReportBook book;

 

 

 

public ReportForm(Telerik.Reporting.ReportBook reportBook)

 

{

InitializeComponent();

 

 

this.book = reportBook;

 

}

 

 

private void ReportForm_Load(object sender, EventArgs e)

 

{

reportViewer1.Report =

 

this.book;

 

reportViewer1.RefreshReport();

}

 

}

 

 

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 11 Oct 2010, 04:16 PM
Hello katie,

The Mergable property controls Report Parameter merging in ReportBook. The default value of the "Mergable" property is true. Set the "Mergable" property to false if you want to prevent a parameter from being merged with its equivalent ones.

All the best,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
katie
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or