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

Adding table columns in code does not work with drill through

1 Answer 34 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Thys
Top achievements
Rank 1
Thys asked on 04 Sep 2014, 12:07 PM
We have a large number of reports with dynamically generated columns. We cannot create static reports since the columns to be displayed varies from user to user (and no, column groups are not an option since this reduces the performances too much).

The current solution is to design the report in VS with all the static info and grouping. We clear the data source in the report constructor. Then in the "NeedDataSource" event for the report (or table) we open the SQL query, examine the fields returned and create additional columns for the existing table based on the variable columns.

This works fine.

However, if we drill through to another report and navigate back, the table is recreated as it was at design time (without the extra columns). Furthermore there is no way to access the data source instance any more. The report and table data source reflect as NULL in the itemdatabound/binding events. It also seems as if a new instance of the report is created since all the other user added properties are gone / reset to NULL.

This effectively means we cannot use drill through and this is one feature we really need in our application.

1 Answer, 1 is accepted

Sort by
0
Hinata
Top achievements
Rank 1
answered on 09 Sep 2014, 07:44 AM
Hi Thys,

Check this forum thread, which elaborates on the same topic: Event for Navigate Back-Button.
Tags
General Discussions
Asked by
Thys
Top achievements
Rank 1
Answers by
Hinata
Top achievements
Rank 1
Share this question
or