Is it possible to use inside of a text field a database variable? e.g. You write: "Mr. is born .... This should work with RB 7 Thank you for hints. Nicolas
> You can access the current record of a db field using the Meanwhile I found a strange problem: If I check in designmode it works. But if I open the report out of the program (e.g. on a click) all database fields are printed. The variable also but only the constant text, not the values of the database fields. Do you have a hint for me? Thank you and regards Nicolas
If you are using a TppVariable, you should set it's value inside the OnCalc event. This is not a known issue with RB. Is there any Delphi event code being fired during runtime that could be causing this?
As a test create a minimal application (form, report, button) and connect it to your dataset. Then place a variable in the detail band and implement the OnCalc in RAP as you have in your main app.
Comments
You can access the current record of a db field using the
Report.DataPipeline property. For instance, inside the OnGetText of a
label...
aText := 'Mr. " + Report.DataPipeline['MyField'] + ' is born...';
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thank you, I the it with the End User Designer and it works.
Regards
Nicolas
Meanwhile I found a strange problem:
If I check in designmode it works. But if I open the report out of the
program (e.g. on a click) all database fields are printed. The variable also
but only the constant text, not the values of the database fields.
Do you have a hint for me?
Thank you and regards
Nicolas
If you are using a TppVariable, you should set it's value inside the OnCalc
event. This is not a known issue with RB. Is there any Delphi event code
being fired during runtime that could be causing this?
As a test create a minimal application (form, report, button) and connect it
to your dataset. Then place a variable in the detail band and implement the
OnCalc in RAP as you have in your main app.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com