Saturday, April 4, 2015

Hide and Resize Column in RDLC Report with Ms Dynamics Ax 2012

Currently RLDC report in Ms Visual Studio does not provide possibility to resize column on report via property or coding, but we still have other way to make it happen. In this topic, I will guide you step by step to get result as shown in picture 1 and picture 2 below:

Picture 1: Detail table with 3 columns Product Name, Barcode and Model.
Picture 2: Detail table without column Barcode and Model, but Product Name's column width is equal to Product Name's column width in Picture 1 plus Barcode's column width plus Model's column width.
With above picture, you can see the different column number and column size of the same report.
Now you need to see below picture in detail in order to do as shown:
In RDLC report design in Ms Visual Studio, you need to think about logic that your report will display then you need to create column to display or hide follow your criteria.
The only formula that you need to apply for each column that will show or hide is

=IIF(First(Fields!CriteriaField.Value, "dsHeader") = "ABC", false, true)

No comments:

Post a Comment