Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-08

LazReport: define Variables programmatically

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Lukas Gradl

Hi,

seems like I'm too stupid to find out how to create variables by code.

What I want to do:
If the user starts the designer and clicks "File->Variables list" ther should be a Group called "Custom" and the variables "Test1" and "Test2" in there.

The values I want to fill by using OnGetValue.

I tried
frVariables['Test1']:='';
frVariables['Test2']:='';
Result: No entry in the Variables list in designer.
frVariables['Custom']:='';
frVariables[' Test1']:='';
frVariables[' Test2']:='';
Result: No entry in the Variables list in designer.
Report.Variables.Add('Custom');
Report.Variables.Add(' Test1');
Report.Variables.Add(' Test2');
Result: They're in the Variables list, but when clicking on them I get
an access violation.

Any hint or example how to proceed?

Regards
Lukas

-------------------------- software security networks Lukas Gradl <fpc#ssn.at> Eduard-Bodem-Gasse 9 A - 6020 Innsbruck Tel: +43-512-214040-0 Fax: +43-512-214040-21 --------------------------

Reply by email

Jesus Reyes
to Lukas Gradl

--- El mi? 12-ago-09, Lukas Gradl escribi?:

Show quoted text 37 lines
De:: Lukas Gradl Asunto: [Lazarus] LazReport: define Variables programmatically A: "Lazarus Mailinglists" Fecha: mi?rcoles 12 de agosto de 2009, 10:31 Hi, seems like I'm too stupid to find out how to create variables by code. What I want to do: If the user starts the designer and clicks "File->Variables list" ther should be a Group called "Custom" and the variables "Test1" and "Test2" in there. The values I want to fill by using OnGetValue. I tried frVariables['Test1']:=''; frVariables['Test2']:=''; Result: No entry in the Variables list in designer. frVariables['Custom']:=''; frVariables[' Test1']:=''; frVariables[' Test2']:=''; Result: No entry in the Variables list in designer. Report.Variables.Add('Custom'); Report.Variables.Add(' Test1'); Report.Variables.Add(' Test2'); Result: They're in the Variables list, but when clicking on them I get an access violation. Any hint or example how to proceed? Regards Lukas

Sounds like a bug, please submit a bug report with a sample project, please don't forget Lazarus revision/version

Jesus Reyes A.

Encuentra las mejores recetas en Yahoo! Cocina.
http://mx.mujer.yahoo.com/cocina/

Reply by email