How do you hide a line in Dynamic AX reports?
In body of section I have 4 calculated fields. I want to hide开发者_StackOverflow社区 a line when all four fields are 0 value. Please let me know your suggestions...
Create an executeSection method in the body and only call super()
if you want the section to print:
public void executeSection()
{
if(value1!=0 || value2!=0 || value3!=0 || value4!=0)
{
super();
}
}
In order of simplicity, you could:
- Add a range to the query (may not be possible in your case)
- Add the test in the
executeSection
method of the report section - Add the test in the
send
method of the report
Example of an override the send
method of the report (in this case option 1 would be better):
boolean send(Common cursor, int level=1, boolean triggerOffBody=TRUE)
{
boolean ret;
InventTable inventTable;
if (cursor.tableId == TableNum(InventTable))
{
inventTable = cursor;
if (inventTable.InventType == InventType::BOM)
ret = super(cursor, level, triggerOffBody);
}
return ret;
}
精彩评论