Reputation: 1496
I want to add an option for the user when creating the report to select the columns that the report will show. See the attached image below on how it is suppose to look.
Is there a way to do that?
Upvotes: 0
Views: 78
Reputation: 2669
I don't know about the parameter dialog, but assuming that your column names are in an array. You can have an SQL query with all possible column names (probably you should use special comments to mark the beginning and end of the select list). E.g.
select
'X' as dummy
-- BEGIN COLS
, column1
, column2
...
-- END COLS
from ...
where ...
order by ...
Then, in the beforeOpen event of the query, you can access and modify the query with this.queryText (IIRC) and remove all those lines ("," + columnname) in the marked part for which columnname is not contained in the array.
Upvotes: 1