Flexcelreport - skipping undefined report values

Hi,

I have an excel template with a number of report tags. Due to the application logic, the setting of some values should be postponed until the calculation are run while the remainder are updated by an event handler is fired. So I would like to skip the undefined values without throwing an expection "Report variable %s is not defined". Is that possible

Many thanks.

  

Hi,
Yes, you can do it by  specifying a default value for the tag.

For example, if you write <#mytag;MyTag is not defined> it will write the value of mytag if it is defined and "MyTag is not defined" if it is not. And of course <#mytag;> will write an empty cell if the value is not defined.

Normally using the semicolon is enough. But if you need more control there is also the <#defined> tag so you could write <#if(<#defined(mytag)>;....)>

The default values for tags are explained in rows 12 to 23 of this file: http://www.tmssoftware.biz/flexcel/docs/vcl/FlexCelReportTags.xls
And the #defined tag is also explained in that same document at row 577 to 594

Many thanks, it worked.