FR 2.5.1 report preview

We have several application using Fast Reports. Recently we downloaded the 2.5.1 update and installed it. After recompiling our programs the reports work correctly in some but not in others. We are using Delpi 7 with ADO and have had the same results in Delphi 5. All of the reports have dialog forms with ADO queries. All of the reports were designed in and work correctly in FR 2.4.7.

The problem is the same on described earlier in this forum. When a user selects a report from the menu the report preview does not appear.

The code is almost identical in both the programs that work and those that do not:

procedure TFrmFReports.BbPreviewClick(Sender: TObject);
Var ReportName : String;
begin
ReportName := '..\Freports\' + DM1.QryFReportsFileName.Value;
if FileExists(ReportName) then
begin
with FrmWInvMain.frReport1 do
begin
LoadFromFile(ReportName);
PrepareReport;
ShowPreparedReport;
end;
end
else
ShowMessage(ReportName + ' Not Found');
ChDir(ExtractFilePath(Application.ExeName));
end;

We don't get any error messages. If we open the report designer, load the report and select preview the report will run correctly. If you then select a report in the program and click preview the report that was opened in the designer will preview regardless of which report was selected.

Any ideas/suggestions welcome.

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 1:45PM
    Fr is generally bw compatible Ie app compiled withg 2.51 should be able to run report created in previous version, but a app compiled with a previous version cannot run a report created with the newer version.
    regards
    gord ;)
  • edited 1:45PM
    We are not trying to run reports with the older version. They all worked correctly before upgrade but not all of the reports will work after upgrading to 2.5.1. All of the programs have been recompiled with the new version inplace.
  • gordkgordk St.Catherines On. Canada.
    edited 1:45PM
    hi Bcart
    ok thats one possibility out of the way
    it could be
    ReportName := '..\Freports\' + DM1.QryFReportsFileName.Value;
    is the .. your sub to read easier in this message. if not it should coded to full pathname.
    if that doesn't do it was ado recompiled after install of new frversion.
    regards gord ;)
  • edited 1:45PM
    We added ExpandUNCFileName

    procedure TFrmXmain.ShowReport(ReportName: String);
    Var ExFileName : String;
    begin
    ExFileName := ExpandUNCFileName(ReportName);

    and everything now seems to work correctly.

    Thanks.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.