How to output { in expressions
How to output { in expressions
I want to have an expression that outputs { and also does a calculation. If it was any other character I would do this.
# {SomeCalculation()}
I want to do this
{{SomeCalculation()}}
to output
{100}
is the only way
{"{"+SomeCalculation.ToString()+"}"}?
Thanks.
# {SomeCalculation()}
I want to do this
{{SomeCalculation()}}
to output
{100}
is the only way
{"{"+SomeCalculation.ToString()+"}"}?
Thanks.
How to output { in expressions
Haven't tried this myself but my suggestion would be using the escape operator ("\") like so...
or try doubling the operator up like so...
Like I said, I haven't tried either and I haven't got the Report Designer in front of me at this very moment but try those and let me know. I am curious as to what the outcome will be.
Code: Select all
\{{SomeCalculation()}\}
Code: Select all
{{{SomeCalculation()}}}
Thanks,
John Hamilton
Hamilton & Company, LLC
John Hamilton
Hamilton & Company, LLC
How to output { in expressions
These are the alternatives I know of
The first one is probably the closest to what you want
Code: Select all
{"{"}{Line}{"}"}
{"{" + Line.ToString() + "}"}
{String.Format("{{{0}}}", Line)}
{Format("{{{0}}}", Line)}
Code: Select all
{"{"}{SomeCalculation()}{"}"}
How to output { in expressions
I tried both of those and neither works. Just so you know. Thanks for the try anyway.johnham wrote:Haven't tried this myself but my suggestion would be using the escape operator ("\") like so...
or try doubling the operator up like so...Code: Select all
\{{SomeCalculation()}\}
Like I said, I haven't tried either and I haven't got the Report Designer in front of me at this very moment but try those and let me know. I am curious as to what the outcome will be.Code: Select all
{{{SomeCalculation()}}}
How to output { in expressions
Hello.
Please inform us about version you are using. Have you tried to add above suggestions in the Text property of the report template?
Maybe you trying to do it in run time? In that case please use GetValue event of the StiText component:
e.Value = "{"+5+6+"}";
Thank you.
Please inform us about version you are using. Have you tried to add above suggestions in the Text property of the report template?
Maybe you trying to do it in run time? In that case please use GetValue event of the StiText component:
e.Value = "{"+5+6+"}";
Thank you.