Autofit Tablix width While hiding some columns
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 10th, 2012 3:14pm

Please suggest something....
Free Windows Admin Tool Kit Click here and download it now
May 11th, 2012 12:43pm

Hi there As far as my knowledge is this is not possible. This is a common request and I can see the value in it. However, until SSRS 2008 it is not possible. I hope One day, Reporting Services will probably include an object model which developers like me can manipulate J I hope this will help. Please let me know if you have any questions Many Thanks Syed Qazafi Anjum Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful. Please see this thread for more info http://social.msdn.microsoft.com/forums/en-US/sqlreportingservices/thread/9e6043f1-c458-4540-be59-d37b02feab8a/
May 11th, 2012 1:16pm

Thanks Syed for the response. Can we do one thing like : Suppose tablix (10 columns) inital width is 10in and on hiding 3 columns, its reduced to 7in . Can I align (horizontally) tablix to centre if not increase width to 10in for 7 columns. I guess there must be some workaround for this. Thanks.
Free Windows Admin Tool Kit Click here and download it now
May 11th, 2012 1:40pm

Hi There If I will be in this situation then what I will do I will create two tables one with 7 columns and one with 10 columns and I will make the width of both tables exactly same and hide the complete table instead just the three columns. In this case my layout will be exactly same in both cases. I hope this will help. Please let me know if you have any questions Many Thanks Syed Qazafi Anjum Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
May 12th, 2012 8:34am

Hi Itsmejainh, As Syed posted above, the dynamic width of the column is not supported in Reporting Services. Currently, we can only set fixed value for column width/height. In your last post, you want to place the tablix in the center of the report body. I am afraid this is impossible because we can only set fixed values for the location property of a tablix. To work around the issue, I suggest that you refer to Syeds suggestion above. Whats more, if we place two tablix in the one report, the location of each tablix may vary a lot at runtime. To minimize the influence of the location diversity, we can design the two tablix as two subreports, add the two subreports to the main report, and then minimize the subreport controls and put them close. References: How to: Hide an ItemHow to: Add a Subreport and Parameters Regards, Mike Yin
Free Windows Admin Tool Kit Click here and download it now
May 13th, 2012 5:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics