May 11, 2012 at 4:21 am
I have a problem which i have not been able to solve for quite some time now. Despite looking for a workaround on the internet i still havn't found anything that could work in this regard. May be someone can help me out with this here!!!!!
The issue i have is very basic. I have a table that has a fixed number of columns (say 10), and i want to hide 3 of these columns at runtime based on the value of parameter which the user would select.. This can be easily done by setting the coulmn visibility of each of these 3 columns based on the value of the aforesaid parameter... It's perfectly fine uptill here...
The problem is when the report shows up (with 3 columns hidden) the remaining 7 columns take up the place of the hidden columns and as a result the overall width of the table reduces accordingly... I do not want this to happen..i.e. i want the table width to remain constant..
That is to say the remaining colums width should somehow be able to expand so that the original overall width of the table remains same...
Is this possible to achieve.... Please Help..I really need this to get going asap. Thanks In Advance...
May 11, 2012 at 7:03 am
Unfortunately column width is not something that can be controlled by expression.
However, I think you could use two tablix, one with the extra 3 columns and the other without them. Get them exactly the same size as you like then and set the tablix visibility to show or hide based on user selection. Then place one tablix exactly on top of the other in different layers.
May 11, 2012 at 8:02 am
Thanks for the response Daniel
However in my case number of columns is not 10 , that was just an example. Also, I am not aware of columns which I have to hide. I have given hidden expression to all the columns and based on some conditions, their visibility will be false.
Is there any property for Tablix like alignment. Its ok to me if I can align tablix to center in report after hiding particular number of columns.
Thanks.
May 11, 2012 at 12:21 pm
Unfortunately Tablix position values cannot be manipulated by expression either. One thing that might help a bit, but it is not really what you want is to set the ConsumeContainerWhitespace property for the report to True. That will contract the white space outside of the tablix to the widest element of the report.
May 11, 2012 at 6:13 pm
Maybe instead of expressions to hide the columns based on the param value, leave the columns visible but set the field expression to only display data based on the parameter. eg. =iif(Parameters!Thing1.Value = "What it is", Fields!Fieldname.Value, Nothing)
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply