does anybody know a solution?
"see decodedate" - yeah thanks, except that don't work in the expression
property.
I have emailed asking for help in getting to the TQRGroup.Expression
property and are awaiting a reply. At least you could alter the copy(date,
x, x) statement in expression at run time to suit international date
formarts.
As soon as I hear from the "professionals" in norway, i will post here.
Christoph Wolf wrote in message <3650ADF3...@edu.uni-klu.ac.at>...
They say, i have to create a calculated field in the table of the
dataset-property containig my calculations needed e.g.: mm/yyyy.
This works, but this is a workaround and no solution!
--
Greatings André Mens author of QReport Artist.
EMail an...@mensand.demon.nl
Homepage http://mensand.demon.nl
QReport Artist the QuickReport EndUser report Designer with Delphi like IDE.
Christoph Wolf heeft geschreven in bericht
<365182C6...@edu.uni-klu.ac.at>...
Although it was a terrible search through not existing help i can present a
quick solution for this problem. You can add additional functions to the
Expression editor just as André said.
Here is my example (not best coding, indeed, but it shows how it works):
A Expression Function for simulating
FormatDateTime(Format:string;dat: TDateTime) :string
unit datetime;
interface
uses Windows, SysUtils, Messages, Classes, Graphics, Controls,
StdCtrls, ExtCtrls, Quickrpt, QRCtrls, QRprntr;
type TQREvFormatDateTimeFunction = class(TQREvElementFunction)
public
function Calculate : TQREvResult; override;
end;
procedure Register;
implementation
function TQREvFormatDateTimeFunction.Calculate : TQREvResult;
begin
if ArgList.Count = 2 then
begin
If (self.Argument(0).Kind = resString) and
(self.Argument(0).Kind = resString) Then
begin
try
StrToDateTime(Argument(1).StrResult);
Result.Kind := resString;
Result.StrResult := FormatDateTime(Argument(0).StrResult,
StrToDateTime(Argument(1).StrResult));
except
Result.Kind := resError;
end;
end
else
Result.Kind := resError;
end else
Result.Kind := resError;
end;
procedure Register;
begin
QrPrntr.RegisterQRFunction(TQREvFormatDateTimeFunction,'test','Datumsroutinen','xoffi','');
end;
begin
end.
In delphi 3 just follow the steps for installing a component to link the
datetime.dcu to a
xxx.dpl package ;)
Greetings,
christoph