Toggle navigation
ReportBuilder Support Forums
Categories
Discussions
Activity
Sign In
Home
›
General
ReportBuilder 22.06 now available including Delphi 12.2 support!
New Blog Posts: Merging Reports -
Part 1
and
Part 2
Changing dbtext -> datafield dynamically (by code)
rbuser
May 2008
edited May 2008
in
General
Hi All,
How can dbtext's datafield be changed by code (dynamically), is it possible?
Delphi 7, RB 10.08 STD.
Thanks in advance.
Best regards,
H?seyin
Comments
rbuser
May 2008
edited May 2008
H?seyin,
Assuming that you know the object name, you can use the following code to
change the field associated with the DBText object at runtime.
procedure SetDBField(Report : TppReport; ObjName, DataField: String);
var
Obj : TppPrintable;
begin
Obj := TppPrintable(Report.FindUserObject(ObjName));
if Obj <> nil then Obj.DataField := DataField;
end;
Hope this helps.
--
---------------------------------------
Terry Swiers
Millennium Software, LLC
http://www.1000years.com
http://www.atrex.com
Atrex Inventory Control/POS -
Big business features without spending big business bucks!
Atrex Electronic Support Options:
Atrex Knowledgebase:
http://www.atrex.com/atrexkb.asp
Email: mailto:support@atrex.com
rbuser
May 2008
edited May 2008
Hi Terry,
Thanks for the reply, i'll try and see how far i can go
Best regards,
H?seyin
"Terry Swiers" skrev i en meddelelse
This discussion has been closed.
Comments
Assuming that you know the object name, you can use the following code to
change the field associated with the DBText object at runtime.
procedure SetDBField(Report : TppReport; ObjName, DataField: String);
var
Obj : TppPrintable;
begin
Obj := TppPrintable(Report.FindUserObject(ObjName));
if Obj <> nil then Obj.DataField := DataField;
end;
Hope this helps.
--
---------------------------------------
Terry Swiers
Millennium Software, LLC
http://www.1000years.com
http://www.atrex.com
Atrex Inventory Control/POS -
Big business features without spending big business bucks!
Atrex Electronic Support Options:
Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp
Email: mailto:support@atrex.com
Thanks for the reply, i'll try and see how far i can go
Best regards,
H?seyin
"Terry Swiers" skrev i en meddelelse