Hi,
Let's imagine we have a simple class, for instance
class Person {
public FirstName {get;set;}
public LastName {get;set;}
}
when generating report I'm able to do the following:
var owner = new Person();
var requester = new Person();
var report = new FlexCelReport();
report.SetValue("OwnerFirstName", owner.FirstName);
report.SetValue("OwnerLastName", owner.LastName);
report.SetValue("RequesterFirstName", requester.FirstName);
report.SetValue("RequesterLastName", requester.LastName);
After this I can use registered values in my report as <#OwnerFirstName>, etc.
But actually I want to something like this:
report.SetValue("Owner", owner); in code
and <#Owner.FirstName> in template
That doesn't work because seem like the FlexCel report variable doesn't support that or similar syntax.
So, the question is, are there any ways to get object field value from a template?
Thanks in advance
Hi,
Wow! I didn't expect "sub.subobjects" will work in tables because more simpler report variables don't support that.
Now I understand that FlexCel just treated the variable with "." as dataset.
The workaround is acceptable. Thanks for your help!
Hello Adrian,
Did you investigate is it possible to use dot syntax for report variables?
The workaround with datasets is hard to the end user, because of need to create a named range. And as data can appear in many different places, the named range is getting complicated.
The second workaround that I found is to use #dbvalue. (<#dbvalue(List;0;"ListItemData")> )
It's not required to use named range, but doesn't look user frienly.
Thanks in advance
Hi,
Hello Adrian,
Are there any news?
Sorry but not yet, and it will still take some time.