Scripting
Hi, I'm new to Fast Report and scripting.
I have created an easy report with a masterdata, on that band I have connected to a datasource
and selected the fields from the datasource I would like to print.
No problems so far and the report shows with correct values.
But I have a checkox component on that band that is connected to a datafield of boolean type.
The problem is that I would like to reverse the values, if the value in the datasource is True then the
checkbox would not be checked, and if the value is false the checkbox will be checked.... it's easy in
delphi code but how to solve it in Fast Report code section?
I have selected the checkbox and set the OnbeforePrint event, but in the code I don't know how
to make the above works?
Another question:
For example how can I in the code get the datasource of my project and access any field from it as you
you do in Delphi code? For ex query1.FieldByName('field1').AsString for example.
I have an frxDBDataSet1 component attached to the MasterData band and I would like to get any field from
it by code.
Is there also any good documentation about the scripting possibilites in Fast Report 4 VCL pro edition?
Thanks in advance!
Marco.
I have created an easy report with a masterdata, on that band I have connected to a datasource
and selected the fields from the datasource I would like to print.
No problems so far and the report shows with correct values.
But I have a checkox component on that band that is connected to a datafield of boolean type.
The problem is that I would like to reverse the values, if the value in the datasource is True then the
checkbox would not be checked, and if the value is false the checkbox will be checked.... it's easy in
delphi code but how to solve it in Fast Report code section?
I have selected the checkbox and set the OnbeforePrint event, but in the code I don't know how
to make the above works?
Another question:
For example how can I in the code get the datasource of my project and access any field from it as you
you do in Delphi code? For ex query1.FieldByName('field1').AsString for example.
I have an frxDBDataSet1 component attached to the MasterData band and I would like to get any field from
it by code.
Is there also any good documentation about the scripting possibilites in Fast Report 4 VCL pro edition?
Thanks in advance!
Marco.
Comments