HI,
The question:
i would like have a list of "items" (Combobox or other object) always visible and on selecting one or more item from the list i would like to see a report of data .What matter is that the second report be displayed just after selecting one or more items from the combobox ( or other object).
This is a scenario very close to a Drilldown one or a Master/details one, but in my scenario there is no Database relathionship between items and the report i want to be displayed. Lets say that the items are the names of some tables on DB. The user selects one or more of this table from combo (or other object) and a the report with data from this table is shown. This report has own parameters and one or more crostables to analyze the data.
If it is possible to keep on the same report (Area) the combobox and the the related data-report it will be perfect. But also having the list and the report in two separated area could be fine. The matter is that the list be always visible.
The History:
Working with a crossTable: no problem to bind it to a datasourceObject from my DataLayer.So i have my data grouped and crossed as expected.
Next i added some parameter at design time (report.reportParameters object), here the problem. Using parameter (multivalues) the crossTable is rendered consequently(record are filtered) but not total and grand Total. The total fields show always the total calculated at the time i have bounded the datasource.
In other words once you change parameter, the crosstab is re-rendered but not re-calculated.
To solve this i tougth to re-bind the datasource every time the parameters are modified. That is:
1- getting my data record list from my DataLayer lets call it listDL
2- passing listDL to a businees object list (lest call it listBO) to work with data in memory
3- populate the parameters collections assigning listBO as datasource
4- executing LINQ queries on listBO using the parameters values.
5- rebind crossaTable datasource to listBO.
The report i am working on is an aggregate report, it shows several tables, them are different views on the same datasource.
That is: different LINQ queries on listBO . This is why i use ListBO: i don't want call several time my DataLayer and i prefer to use ObjectDataSource then SqlDatasource planning to use this code with our MVVM model.
This was the idea and i started this way:
the first 3 steps are executed in the report constructor
the last 2 steps are executed in NeedDataSource routine
All seems working fine but :
at step 1 i have to pass a parameter (table name) at the method calling my DataLayer to retrieve the set of Data i needs.
let say this parameter is the name of a table Database.
The user have to be make able to choose table's name from a list . The list of tables is retrieved by a call to DataLayer .
The question is: where and how i can do this?
I can't add another parameter (for table name) ad design time because i can catch its value just in NeedDataSource routine, but the this value have to be cathced at step 1 (in the constructor ).
The only way i see is to pass the parameter to the constructor, but how can i do this?
The closest thing i could think is something like a subReport, but to manage a subReport with own Parameters UI seems too complex to me.
A easier solution could be to create a report for choosing the tables and then navigate at the crosstable report passing the choosen parameter.But i whould like to select the tables without navigate trought the windows.( User should select table very frequently)
I have no idea about to accomplish this
Thanks for reading
The question:
i would like have a list of "items" (Combobox or other object) always visible and on selecting one or more item from the list i would like to see a report of data .What matter is that the second report be displayed just after selecting one or more items from the combobox ( or other object).
This is a scenario very close to a Drilldown one or a Master/details one, but in my scenario there is no Database relathionship between items and the report i want to be displayed. Lets say that the items are the names of some tables on DB. The user selects one or more of this table from combo (or other object) and a the report with data from this table is shown. This report has own parameters and one or more crostables to analyze the data.
If it is possible to keep on the same report (Area) the combobox and the the related data-report it will be perfect. But also having the list and the report in two separated area could be fine. The matter is that the list be always visible.
The History:
Working with a crossTable: no problem to bind it to a datasourceObject from my DataLayer.So i have my data grouped and crossed as expected.
Next i added some parameter at design time (report.reportParameters object), here the problem. Using parameter (multivalues) the crossTable is rendered consequently(record are filtered) but not total and grand Total. The total fields show always the total calculated at the time i have bounded the datasource.
In other words once you change parameter, the crosstab is re-rendered but not re-calculated.
To solve this i tougth to re-bind the datasource every time the parameters are modified. That is:
1- getting my data record list from my DataLayer lets call it listDL
2- passing listDL to a businees object list (lest call it listBO) to work with data in memory
3- populate the parameters collections assigning listBO as datasource
4- executing LINQ queries on listBO using the parameters values.
5- rebind crossaTable datasource to listBO.
The report i am working on is an aggregate report, it shows several tables, them are different views on the same datasource.
That is: different LINQ queries on listBO . This is why i use ListBO: i don't want call several time my DataLayer and i prefer to use ObjectDataSource then SqlDatasource planning to use this code with our MVVM model.
This was the idea and i started this way:
the first 3 steps are executed in the report constructor
the last 2 steps are executed in NeedDataSource routine
All seems working fine but :
at step 1 i have to pass a parameter (table name) at the method calling my DataLayer to retrieve the set of Data i needs.
let say this parameter is the name of a table Database.
The user have to be make able to choose table's name from a list . The list of tables is retrieved by a call to DataLayer .
The question is: where and how i can do this?
I can't add another parameter (for table name) ad design time because i can catch its value just in NeedDataSource routine, but the this value have to be cathced at step 1 (in the constructor ).
The only way i see is to pass the parameter to the constructor, but how can i do this?
The closest thing i could think is something like a subReport, but to manage a subReport with own Parameters UI seems too complex to me.
A easier solution could be to create a report for choosing the tables and then navigate at the crosstable report passing the choosen parameter.But i whould like to select the tables without navigate trought the windows.( User should select table very frequently)
I have no idea about to accomplish this
Thanks for reading