Null values in memo
Hi,
I have a memoViews on Detail data, lets say memo1, meom2, memo3.
This memo fields may have null values.
What i need is whene a memo field hav a value, so not a null then its value must be value * 5;
"First of all, i am missing a good manual explaning Events, which one whene i can use. And about all options there are in delphi components"
I am using version 5 enterprise.
So i have tryed something like this
if ValidFloat(TfrxMemoView(Sender).Text) then
TfrxMemoView(Sender).Text := FloatToStr( StrToFloat(TfrxMemoView(Sender).Text) * 5);
Its jsut printing the values, withouth changing them.
Somehow i cannot test if a value null is, i have ConvertNulls false.
So please tell me in which event i have to do this and what will be the code to do this.
I am pointing all memoviews to the same function, thats why i am using TfrxMemoView(Sender).Text.
Tahnks
I have a memoViews on Detail data, lets say memo1, meom2, memo3.
This memo fields may have null values.
What i need is whene a memo field hav a value, so not a null then its value must be value * 5;
"First of all, i am missing a good manual explaning Events, which one whene i can use. And about all options there are in delphi components"
I am using version 5 enterprise.
So i have tryed something like this
if ValidFloat(TfrxMemoView(Sender).Text) then
TfrxMemoView(Sender).Text := FloatToStr( StrToFloat(TfrxMemoView(Sender).Text) * 5);
Its jsut printing the values, withouth changing them.
Somehow i cannot test if a value null is, i have ConvertNulls false.
So please tell me in which event i have to do this and what will be the code to do this.
I am pointing all memoviews to the same function, thats why i am using TfrxMemoView(Sender).Text.
Tahnks
Comments
Could not convert variqant of type (array Variant) into type (OleStr)
This is the code now
TfrxMemoView(Sender).Text := [IIF(VarToStr(TfrxMemoView(Sender).Text) <> '', StrToFloat(TfrxMemoView(Sender).Text) * 5, '')];
And can you specify on which event do i haver to do this? OnAfterData?
or just type in the memo
[IIF(VarToStr(<YourDatasetName."YourFieldName">) <> '', StrToFloat(<YourDatasetName."YourFieldName">) * 5, '')]
its printing this as a string [IIF(VarToStr(TfrxMemoView(Sender).Text) <> '''', StrToFloat(TfrxMemoView(Sender).Text) * 5, '''')]
this is my code maybe i miss something
margeInt is now 5.
if (<Bestelling."margeInt"> > 0) then
begin
TfrxMemoView(Sender).Text := [IIF(TfrxMemoView(Sender).Text <> null, StrToFloat(TfrxMemoView(Sender).Text) * <Bestelling."margeInt">, '')];
end;
Still i dont know where is the right place, onbeforprint or onafterdata?
2. TfrxMemoView(Sender).Text is string, so it should be TfrxMemoView(Sender).Text := 'some text or expression';
3. I'll see your ROfferte.fr3 from https://support.fast-report.com/tickets/535050 to understand what you need
Why you asking me, if you cant solve it then tell me that.
I dont understand, is you the support of the company?
I am asking you 5 times to explain what are the events, asking to point to a manual where i can read all options.
Not getting any of my questions.
Your unswers look like you didnot read my messages.
i am very dissepointed!
I can't to help you without small demo project with error. Small project with one form, report and two datasets
You need to test if your filed is null, or use directly one InternalCalc field form one ClientDatasdet for example.
Testing In Your Memo:
[IIF(<YourDatasetName."YourFieldName">=null, 0, <YourDatasetName."YourFieldName"> * 5)]
By Roberto Novakosky