Make function public in reportbuilder in run-time.
Hi.
I have made a function which you can see below, which a want to use.
function DateAHead(const aDate : TDateTime; Days : Integer = 1) : TDateTime;
begin
if (DayOfWeek(aDate + Days) = 7) then
result := aDate + Days + 2
else
if (DayOfWeek(aDate + Days) = 1) then
result := aDate + Days + 1
else
result := aDate + Days;
end;
I have a program that can launch the report builder in run-time. My question
is how can I make the function public in the report builder at run-time so
that I can parhappes use it in the OnGetText on a Label like :
procedure Label1OnGetText(var Text : string);
begin
Text := DateToStr(DateAHead('2002-08-23', 10);
end;
Thanks
J?rgen, Denmark
I have made a function which you can see below, which a want to use.
function DateAHead(const aDate : TDateTime; Days : Integer = 1) : TDateTime;
begin
if (DayOfWeek(aDate + Days) = 7) then
result := aDate + Days + 2
else
if (DayOfWeek(aDate + Days) = 1) then
result := aDate + Days + 1
else
result := aDate + Days;
end;
I have a program that can launch the report builder in run-time. My question
is how can I make the function public in the report builder at run-time so
that I can parhappes use it in the OnGetText on a Label like :
procedure Label1OnGetText(var Text : string);
begin
Text := DateToStr(DateAHead('2002-08-23', 10);
end;
Thanks
J?rgen, Denmark
This discussion has been closed.
Comments
Include the name of the untit from your function in the uses clause of the
unit where your report component resides.
uses ...., UnitWithMyFunction, etc...
procedure Label1OnGetText(var Text : string);
begin
Text := DateToStr(DateAHead('2002-08-23', 10);
end;
Nico
RAP. There are examples of creating RAP passthrough functions in your
RBuilder\Demos\RAP directory.
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com