I am creating reports with the new Report() function. I added 3 variables referencing 3 fields in the same fashion as several others in my report, and when I generate the report it returns [object Field] where my data should appear for these 3 fields. The rest of fields turn out just fine.
My problem variables and their employment are:
var firmName = this.getField("txtTPS.Atty.FirmName")
var attyContact = this.getField("txtTPS.Atty.ContactPerson")
var attyContactEmail = this.getField("txtTPS.Atty.ContactE-mail")
rpt.writeText("From: " +firmName)
rpt.writeText("Contact person: " +attyContact)
rpt.writeText("E-mail: " +attyContactEmail)
These 3 fields in the report generate like this:
From: [object Field]
Contact person: [object Field]
E-mail: [object Field]
Would appreciate it if someone could tell me why I get [object Field] instead of the data that is in these 3 fields.
Thank you.
David
var firmName = getField("txtTPS.Atty.FirmName").valueAsString;