FAST REPORT GRAPH
I create a database in delphi saving my data in access tables and I constructed some reports in fast report. Now I want to insert some graph in my report but I have this problem. If I make a graph report (using data from access) and open it by double clicking the fast report file it works fine. But when I'm trying to open the same report by calling it via delphi with script:
procedure TfrmHDP.DAYReport();
var path : String;
begin
CheckForFlights();
if adoquery1.FieldCount>0 then
begin
Path := ExtractFilePath(ParamStr(0));
frxReport1.LoadFromFile(path + 'forms\DAYReport.fr3' );
frxReport1.Variables.Variables:= '''' + dateToStr(datetimepicker1.date) + '''';
frxReport1.Variables.Variables:= '''' + dateToStr(datetimepicker2.date) + '''';
frxReport1.Variables.Variables:= userId;
frxReport1.ShowReport();
the following message appears: The callout property does not exist, my report opens but nothing appear. Does anyone know what the problem is? Thanks.
procedure TfrmHDP.DAYReport();
var path : String;
begin
CheckForFlights();
if adoquery1.FieldCount>0 then
begin
Path := ExtractFilePath(ParamStr(0));
frxReport1.LoadFromFile(path + 'forms\DAYReport.fr3' );
frxReport1.Variables.Variables:= '''' + dateToStr(datetimepicker1.date) + '''';
frxReport1.Variables.Variables:= '''' + dateToStr(datetimepicker2.date) + '''';
frxReport1.Variables.Variables:= userId;
frxReport1.ShowReport();
the following message appears: The callout property does not exist, my report opens but nothing appear. Does anyone know what the problem is? Thanks.
Comments
(..)
frxReport1.Variables.Variables:= userId;
frxReport1.PrepareReport;
frxReport1.ShowReport();
(...)
frxReport1.LoadFromFile(path + 'forms\DAYReport.fr3' );
you may need a backslash before forms if it is a subfolder to the apps folder
were your variables created as categorized variables or typed variables ?
if categorized variables delete the second .Variables.
frxReport1.Variables.Variables:= '''' + dateToStr(datetimepicker1.date) + '''';
procedure TfrmStatistic.BitBtn1Click(Sender: TObject);
var path : String;
begin
Path := ExtractFilePath(ParamStr(0));
frxReport1.LoadFromFile(path + 'forms\graph.fr3' );
// frxReport1.PrepareReport;
frxReport1.ShowReport();
end;
and call fast report via delphi my fast report file opens but no graph appears. I made a graph using as datasource ''fixed data'' option from the graph menu. When I open it by double clicking the fast report file the file opens and my graph appears. But when i call it via delphi ''stol.exe'' file using the above script my fast report file opens, everything appears (headers, footers, etc) exept my graph. Instand of it a white box appears in its position. I' m sure that the fault isn't the graph properties because my graph appears when I open the same fast report file directly.
And what happend?
The second report (the one with no graph) written to disk works as an original one - in fact it has a few bytes less.
The first one (with graph based on 3 fixed data: 1, 2, 3) after writting to disk is completly broken. Instead of about 3kB (as original one) it is about 0,5 kB. When I open it I can see there is NO DialogPage1 and Page1 tab at all.
Maybe this will show you the way of further tests.
Mick
I mean the operation of loading report with graph may have a bug [img]style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> You should send a support ticket to Fast Report. Mick[/img]