Page 1 of 1

How to set the group header band expression by variable

Posted: Wed Oct 24, 2018 8:59 am
by adam husaini
I want to set variable to the expression in group header band condition. Before this, i put {employee.RelationCompany.name} as expression and its work. But now, I make a user to choose what they are want to grouping. I make a new variable as "variable1". In group header band expression, I set as {variable1}.

in designer.php
report.loadFile("reports/employees.mrt");
report.dictionary.variables.getByName("variable1").valueObject = "employee.RelationCompany.name";

can someone help me to solve this one? or maybe in others way.

Re: How to set the group header band expression by variable

Posted: Fri Oct 26, 2018 2:09 pm
by Lech Kulikowski
Hello,

Please try to use
report.dictionary.variables.getByName("variable1").valueObject = "{employee.RelationCompany.name}";

Thank you.