Displayformat property of TppDBPipeline
Hello All,
When i set Displayformat-property of a field in SQLDataset or ClientDataset,
the field on the TppReport is not printed according to the format i set.
Also when i set the Displayformat-property of a field in the TppDBPipeline
component, the field on the Report is not printed with the format i set.
The only time i get Displayformat working, is to set the DisplayFormat of
the DBText-field on the report itself, in the reportdesigner. I don't want
that, i want to do that work for our users. So our users don't need to know
about displayformats syntax, when they are making their own reports.
Any suggestions what i do wrong?
I'm using Delphi 6 + Reportbuilder 6.03, but i just tried Reportbuild 7.02
to see if the problem still exists in version 7. And it does...
Hope someone has a sollution,
--
Marcel van Bloppoel
Software Engineer
Vendit B.V.
http://www.vendit.nl/
When i set Displayformat-property of a field in SQLDataset or ClientDataset,
the field on the TppReport is not printed according to the format i set.
Also when i set the Displayformat-property of a field in the TppDBPipeline
component, the field on the Report is not printed with the format i set.
The only time i get Displayformat working, is to set the DisplayFormat of
the DBText-field on the report itself, in the reportdesigner. I don't want
that, i want to do that work for our users. So our users don't need to know
about displayformats syntax, when they are making their own reports.
Any suggestions what i do wrong?
I'm using Delphi 6 + Reportbuilder 6.03, but i just tried Reportbuild 7.02
to see if the problem still exists in version 7. And it does...
Hope someone has a sollution,
--
Marcel van Bloppoel
Software Engineer
Vendit B.V.
http://www.vendit.nl/
This discussion has been closed.
Comments
TppDeigner.OnAssignField event. For this example I used a TQuery on a form
connecting to DBDemos Orders table for the 'AmountPaid' field which had a
display format set on the TField object at Delphi design time in the TQuery.
procedure TmyEndUserSolution.ppDesigner1AssignField(Sender: TObject);
var
lField: TField;
lQuery: TQuery;
begin
if (Sender is TppDBText) and (TppComponent(Sender).IsDataAware) then
begin
lQuery :=
TQuery(TppDBPipeline(TppComponent(Sender).DataPipeline).DataSource.Dataset);
lField := lQuery.FieldByName(TppComponent(Sender).DataField);
if (lField is TNumericField) then
TppDBText(Sender).DisplayFormat :=
TNumericField(lField).DisplayFormat;
end;
end;
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com