the "uses" statement
I have a module called "UnitConversion.pas", that contains an object called TUnitProperties.
for example:
TUnitProperties = class(TPersistent)
private
FPowerUnits: byte;
FPowerDecimals: byte;
protected
{}
published
constructor Create;
destructor destroy;
procedure CopyUnitPropertiesFrom(aValue: TUnitProperties);
public
Property PowerUnits: byte read FPowerUnits write FPowerUnits;
Property PowerDecimals: byte read FPowerDecimals write FPowerDecimals;
end;
On my fxReport1 code page, I have declared the following
uses 'UnitConversion.pas';
var FUnitProperties: TUnitProperties;
//main
begin
{}
end
when I try to preview the report, I get an error, "identifier expected". what's happening, and how do i make the module UnitConversion visible in fxReport1??
TIA,
Arthur
for example:
TUnitProperties = class(TPersistent)
private
FPowerUnits: byte;
FPowerDecimals: byte;
protected
{}
published
constructor Create;
destructor destroy;
procedure CopyUnitPropertiesFrom(aValue: TUnitProperties);
public
Property PowerUnits: byte read FPowerUnits write FPowerUnits;
Property PowerDecimals: byte read FPowerDecimals write FPowerDecimals;
end;
On my fxReport1 code page, I have declared the following
uses 'UnitConversion.pas';
var FUnitProperties: TUnitProperties;
//main
begin
{}
end
when I try to preview the report, I get an error, "identifier expected". what's happening, and how do i make the module UnitConversion visible in fxReport1??
TIA,
Arthur
Comments
you must register procs into FastReport.
for example:
then you are able to call 'SomeFunc' from FastReport code without 'uses' clause.