Hi,
Update 16, new test new bug
There are three properties with expression values:
However one of the properties is not displayed in the Report:
File for inspection:
*i only extracted one item from larger model for demonstration
buglevel3notshowinginreport.dgn
Ivan Galik said:However one of the properties is not displayed in the Report:
It's weird, I guess somebody from developers will have to check what's happening internally.
In the past I reported bug (discussed also in this forum), when expressions results were not available in reports (I hope I remember it right). But in your case, 3 expressions look nearly the same, but only one does not work.
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
looks to me like wrong expression… (last one)this correction works fine for me
IIf(System.String.LastIndexOf(this.GetElement().GetDisplayString("Level"),"-")>=0,System.String.Substring(this.GetElement().GetDisplayString("Level"),System.String.LastIndexOf(this.GetElement().GetDisplayString("Level"),"-")+1,(System.String.Length(this.GetElement().GetDisplayString("Level")))-(System.String.LastIndexOf(this.GetElement().GetDisplayString("Level"),"-")+1)),"")
please verify it
now it works. thank you
funny thing is that the wrong one worked fine to be displayed in properties but not in the report.
could you please have a look at this post of mine which is related
https://communities.bentley.com/products/microstation/f/microstation-forum/213227/using-expressions-in-itemtypes-to-split-level-string-into-parts
specifically the comment
Ivan Galik said: the wrong one worked fine to be displayed in properties but not in the repor
I've come across that puzzle, where an Expression works as an Item Type property but fails in a Report definition. The solution is to be very precise with the Expression syntax.
Unfortunately there's not an Expression debug tool. Or to put it another way, the Expression Builder is not very informative when we get things wrong.
Miroslav Matas said:this correction works fine
Expression maestro!
Regards, Jon Summers LA Solutions