Page 1 of 1

Dynamic varible from DataSource

Posted: Mon Jul 15, 2019 2:38 pm
by Mathaeusxs
Hi,

im trying to set custom variable from DataSource JSON data. Im doing it by creating variable "TestVar" in Report. And then edit Before Print event expression in ReportTitleBand2 like:

Code: Select all

TestVar = "";
Customers.first();
while(!Customers.isEof)
{
	// PlaingToDoSomeIfLogic
	TestVar += Customers.ContactTitle + ',';
	Customers.next();
}
All i get is undefined variables... Idk what im doing wrong or it is possible to so something like that in Reports.JS ? I mean creating some dynamic variable by looping dataSet or just from dataSet column?

Stimulsoft.Reports.JS
Version: 2019.3.2
Build date: 2019.06.17
Angular 7

Adding example "TestVar.mrt".

Re: Dynamic varible from DataSource

Posted: Mon Jul 15, 2019 8:52 pm
by Lech Kulikowski
Hello,

In the JS version is available only Interpretation mode which does not support code in events.

Thank you.