Auto column width in SSRS
Hi All,
Is there any possibility to change the column width based on the expression?
Regards,
Mandava
October 9th, 2011 3:57am
hi,
you dont have options for writing expressions in size property of a textbox to change its width/height.
but you can have a workaround by changing its font size.
select text box property -> font -> fontsize-> write your conditioned expression.
Example :
=iif(len(reportitems!Textbox2.Value) <= 5,"14pt","8pt")
Regards, Gayathri devi P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)
Free Windows Admin Tool Kit Click here and download it now
October 9th, 2011 6:04am
Hi mandavas7,
Thanks for the question and Gayathridevi’s reply.
>>1.
By design, we couldn’t set the column’s width based on expression.
>>2. If you want
to increase the column’s width based on the field’s content length, please refer to the work-around in this similar thread:
Column
width and text wrap in a column in the report
>>3. If you just
want to set the column’s width based on one parameter’s value, I would suggest you using switch condition in the column’s expression, then adding blank space at the end of the field value, finally, reference previous 2’s workaround.
Assuming @p1 has three value: 0,1,2.
=Fields!FieldName.Value+Switch(Parameters!p1.Value=0,"",Parameters!p1.Value=1,"
",Parameters!p1.Value=2,"
")
Hope them helps.
Thanks,
Sharp Wang
Please remember to mark the replies as answers if they help you and unmark them if they provide no help.
October 15th, 2011 11:22pm