calculating within a TfrxMemoView
If I want to multiply two Floatvalues from a Dataset I got the Error "(<" is not a valid Integer-Value.
My Expression:
[(<frxDBDataset1."laZeitaufwand">*<frxDBDataset1."KostenBearbeiter">)]
if I use
[<frxDBDataset1."laZeitaufwand">*<frxDBDataset1."KostenBearbeiter">],
I got the same error.
It can't be possible that I must write a OnBeforePrint-Event to do a simple calculation like this one.
My Expression:
[(<frxDBDataset1."laZeitaufwand">*<frxDBDataset1."KostenBearbeiter">)]
if I use
[<frxDBDataset1."laZeitaufwand">*<frxDBDataset1."KostenBearbeiter">],
I got the same error.
It can't be possible that I must write a OnBeforePrint-Event to do a simple calculation like this one.
Comments
[((<frxDBDataset1."laZeitaufwand">)*(<frxDBDataset1."KostenBearbeiter">))]
or try using frs built in expression builder to get your brackets in correct position.
are you kidding me?
if i do that i get [<frxDBDataset1."laZeitaufwand">*<frxDBDataset1."KostenBearbeiter">] without any brackets.
this expression resolves also in a Error!!!!!!. see my post above.
and
this also results in an error: "<f" is not a valid Integer-Value
[SUM(<frxDBDataset1."laZeitaufwand">)]
made with the expression-builder
See report template for FRDemo in attach - [<Customers."Cust No"> * <Customers."Cust No">] expression works OK
If I call the Report while my Programm is running (frxReport1.ShowReport) then I got the Convert-Error as I reported above.
TfrxDBDataset knows all selected fields from the Query. The Fieldtype of "laZeitaufwand" is fftNumeric. The fieldvalue isn't null.
I use FR Version 4.13.1 with Delphi XE2.
If you use Expressions like Sum() the event OnNewGetValue was fired. I also have user-defined-variables in the report.
To make it easier to find out which Varname is requiered (in the OnNewGetValue-Event) my Variables obtain a numeric prefix e.g. 01MyDate, 02MyColor.
I didn't know about this circumstance and I don't check the Varname. I copied the first two Chars of the Varname and want to convert them to an Integer with StrToInt.