How to add columns dynamically to a report based on the user's decisions

Hi there,

I am working on a report in which the columns to be displayed are chosen by the user with radio buttons and drop-down menus… For instance, if the user selects the first item in the drop-down menu, the report is going to contain columns ‘a’ and ‘b’, else if he selects the 2nd item, the report is expected to contain columns ‘c’ and ‘d’ and ‘e’

That is to say the number of the columns varies at user’s will.

I was recommended by my colleagues to write codes to change the visibility of the columns and calculate the position of them on the report, yet I’d like to find a rather easier and more generic way so that every time a new column is added to my report i won’t have to start from the scratch. I think using a generated design with programmable sections, there must be a better way to it.

I would appreciate if anyone could give me some hints how to do it.

Thank you

I would keep it simple. Changing the Visibility of the columns based on the selection seems like a straight forward way of approaching your problem of hiding columns.

Thank you for your reply, but my manager is not convinced with that approach :frowning:

Since we are having this issue repeatedly in our reports, he insists on finding a generic way to add columns dynamically without having to do handle the new columns manually to cover all the possible layouts that are made up of user’s selections. you know I actually have 3 radio buttons and 6 drop-down menus (to the moment!) and every single combination of their selections changes the result and accordingly the columns to be displayed. I did handle it in a grid on a form by changing the visibility of columns but now I am asked to create a printable report out of it.

Thanks for your time