Sunday, February 27, 2011

Get ready for DAX 2012

Readability issue on customer/vendor aging report

Most of the time people ask me one common problem they face on customer/vendor aging report. It’s very annoying for them to view Invoice/Voucher field on this report. MS ship this field as single field instead of separating Invoice and Voucher two fields. However we can enhance the readability of this column by modifying the CustVendBalanceList class. The Invoice/Voucher field is setup in the addTrans() method (line#34), here is the actual piece of code:

tmpAccountSum.Txt = strfmt('%1/%2', _voucher, _invoice);

We can put some blank spaces b/w %1 / %2 to increase the visibility of the records on this report.

Lookup Department Dimension on dialog

Few days back, I received a requirement to show the Department dimension on the report dialog, there are couple of ways to achieve this functionality, but in my opinion, the easiest way to create a new EDT called DepartmentDimension and make a relations to DepartmentDimension == Dimension.num. And 0 == Dinemsions.DimensionCode; where 0 is the dimension you want to use. Finally add following code in the dialog() method of the class:

dialog.addFieldValue(typeid(DepartmentDimension ) ,departmentDimensionVariable ,"Label - if required","help text - if required");