delphi - Use Expression in Value of FastReport -
I use the quick report 4.15 in delphi xe2, how can I use the expression in value in the report received value event Am I
Example:
I have a report with "memoviv" in the text "[a]" and the gateway event of the report is:
process TForm1.rep1GetValue (constrate VarName: string; var value: variant); If VarName is equal to 'a' then value: = 'with first [b] item' and if varName = 'b' then value: = 'second'; End; I want the report: "First with the second item".
Example 2: In my report there is an EditBox with a name "edt1", with a TfrxMemoView text "[MyExp]" The user can write text on it.
The GetValue event of the report is:
Process TForm1.rep1GetValue (cons variant: string; var value: variants); If varName = 'a2' then value: = 'item 2' and if varName = 'a3' then value: = 'item 3' and if varName = 'item' = 'A4' then value: = 'item 4' and If varName = 'a5' then value: = 'item 5' and if varName = 'a6' then value: = 'item 6' and if varName = 'myExp' then value: = edt1.Text; End; Now: If I write in ADT 1: "Show [A2] OK", then I want to say frxReport to "show item 2 OK" in frxMemoView. If I write in edt1: "show [a5] is fine", then I want to write frxReport "show item 5 ok" in frxMemoView. ...
Actually taking your question, in this way you can call it recursive < / Strong> function: Process TForm1 Rep1GetValue (const Vernanum: string; var value: variants); Var temporarily: variants; If Veeranam = 'A' starts, then start the function with // 'A' and get the value variable floating rep1GetValue ('b', Temp); // Collect the resulting value Value: = 'First with' + floating + 'item' end and if VarName = 'b' then value: = 'second'; End; Explain further to what you want to achieve - I can not give any better answer.
Comments
Post a Comment