table dynamic rendering - showing and hiding columns

I have a table that i am holding or hiding columns based on parameters. when i remove columns it no longer appears as centered  ... how could i make it appear centered,
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nico BontenbalCommented:
As you probably found out you can't control the position of the table by using expressions. The position of the table and the width of the columns is fixed. All you can do is hide the columns. The only way I can think of is having multiple tables with a different amount of columns on top of each other. Then instead of hiding the columns you could hide and show entire tables based on the number of columns you want to show. If it's only 1 or 2 columns that can be hidden this isn't too difficult. But with a large numbers of columns it might get too complicated.

Another option might be to move the data into other columns. Suppose you have a maximum of 10 columns. Then you put 10 columns in your table. When only column 2-5 should be shown you put the data for column 2 in column 4 of the table, the data for column 3 in column 5 of the table etc. When you also hide borders of the first and last columns it will look centered. The expressions for the headings and data will become rather complex I'm afraid.

In short, I think the answer is "it's not possible, unless you really really really want to".

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vbnetcoderAuthor Commented:
Thanks for that answer and the suggestions.  Since there is so much going on with these reports i may end up dividing them into different reports instead.
vbnetcoderAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.