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

More than one table depending on your choice

7 Answers 111 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 23 Oct 2019, 02:02 PM

Hi there,

I have a report with 3 filter, date1, date2 and driver.
The report parameter driver is set to multivalue.

How can I set the report so that each selected driver
gets its own table in the report and is displayed on a separate page?

Example:
In the report, 3 drivers were selected.
So there are 3 tables in the report each on a DINA4 page.

---
Can I realize this with a ReportViewer or should I better take a ReportBook?

Is there an example project for download?

 

Best regards

 

Simon

7 Answers, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 28 Oct 2019, 10:27 AM

Hello Simon,

You can achieve some outcome through the usage of report groups and filtering. The attached report demonstrates the following approach:

1) Add a CSV DataSource (Driver, Information, Price) and set it to be the DataSource of the report.

2) Right-click outside the report -> Add group -> set the Expression to be: = Fields.Driver;

3) Add a report parameter for the drivers;

4) Add a table which displays DriverInformationPrice;

5) Mark the table and from the menu with Properties remove the DataSource and it through the following Binding:

Property path: DataSource

Expression: = ReportItem.DataObject

This is required to show each driver in a separate table.

6) To be able to show each table on a new page, click on the group footer section and from the Properties panel set Page Break to After.

7) Add filtering to the report for the selected drivers: click on Filters and set it as follows:

Expression: = Fields.Driver

Operator: In

Value:= Parameters.DriverParameter.Value

 

Regards,
Neli
Progress Telerik

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 Feedback Portal and vote to affect the priority of the items
0
Simon
Top achievements
Rank 1
answered on 28 Oct 2019, 01:27 PM

Hi Neli,

thank you for your explanation.

It works fine so far, but it is possible to show the tables at once among themselves,

not one after the other?

The reportfilter driver seems to work like radio buttons, not like checkboxes.

(By the way: driver is somenone who drive a car.)

When I select all drivers, they should all be displayed on the report.

But as you can see in the attached screenshot only the first one BIOS is displayed.

 

Best regards

Simon

0
Neli
Telerik team
answered on 31 Oct 2019, 10:04 AM

Hi Simon,

From the first message (How can I set the report so that each selected driver gets its own table in the report and is displayed on a separate page?), I understood that you want to display each table on a new page. For that reason, I set the PageBreak to After the group footer section. If you wish to avoid this effect, set it to None.

Indeed the other tables are also on the report but you need to click on Next to go to the next page. Check the attached screenshot. You can see that there are three pages for each table.

Regards,
Neli
Progress Telerik

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 Feedback Portal and vote to affect the priority of the items
0
Simon
Top achievements
Rank 1
answered on 04 Nov 2019, 09:11 AM

Hi Neli,

Sorry, that was my fault!

I thought the pages with the tables appear automatically among each other.

I have overlooked that button.

I do not often work with the standalone report designer ; .)

Thank you!

Best Regards

Simon

 

 

0
Simon
Top achievements
Rank 1
answered on 04 Nov 2019, 01:50 PM

Hi Neli,

I have a new problem:

If there is only one record per driver the presentation is ok!

(See screenshot OneDataset.JPG)

But when it gives more than one dataset per driver the presentation isn't ok.

(See screenshot MultipleDatasets.JPG)

Then I get for each record one separate table.

Records that belong to a driver should also be displayed in one table.

Can you change your project Report1.trdp and show me a solution?

 

Best Regards

Simon

 

 

0
Nasko
Telerik team
answered on 06 Nov 2019, 03:55 PM

Hello Simon,

The multiple table per record problem can be resolved by moving the table item inside a group section. This way all records will be grouped by the Driver data field. Please check the attached sample report.

Regards,
Nasko
Progress Telerik

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 Feedback Portal and vote to affect the priority of the items
0
Simon
Top achievements
Rank 1
answered on 08 Nov 2019, 08:54 AM

Hi Nasko,

thank you, it works.

Best Regards

Simon

 

Tags
General Discussions
Asked by
Simon
Top achievements
Rank 1
Answers by
Neli
Telerik team
Simon
Top achievements
Rank 1
Nasko
Telerik team
Share this question
or