print/show prepared report doesn't work

diaswdiasw Germany
edited 3:42AM in FastReport 3.0
Hi FR's,

I'm printing a DMP-Report to a printer at lpt1 with no problem.
I save the prepared report to FP3-File. When I open the FR3-File there is no data shown/no report printed.

Here some codelines:

//prepare and print or save report

frxReport.PrintOptions.ShowDialog := False;
frxreport.PrepareReport();
if gf_DirektDruck = True then
begin
frxReport.print;
end else
begin
frxReport.SaveToFile(strFile);
end;
...

Load the report:

if frxReport.PreviewPages.LoadFromFile(strFile) = true then
begin
frxreport.PreviewPages.Report.ShowPreparedReport;
// frxReport.Print;
// frxReport.ShowPreparedReport;
end;

The FP3-files are saved, and there is data in it when I open it with an editor...

btw: I have the trialversion FR 3.04.

regards
Sascha

Comments

  • edited 3:42AM
    Try to set TfrxReport.DotMatrixReport := True after loading the FP3 file.
  • diaswdiasw Germany
    edited 3:42AM
    No change.
    Strange thing: I can call the procedure the first time with success, second time, same session, no data is shown. Even when I create an new instance of FrxReport and free it:

    Function tfrmPrint.PrintAuftragSpool(strFile: String; strDrucker: String):Boolean;
    var frxRepPrt : TFrxReport;
    begin
    frxRepPrt := TFrxReport.create(self);
    //if frxReport1.PreviewPages.LoadFromFile(strFile) = true then
    if frxRepPrt.LoadFromFile(strFile)=True then
    begin
    frxRepPrt.DotMatrixReport := True;
    frxRepPrt.ShowReport();
    // frxReport1.ShowPreparedReport;
    end;
    frxRepPrt.Free;

    {//if frxReport1.PreviewPages.LoadFromFile(strFile,False) = true then
    if frxReport1.LoadFromFile(strFile)=True then
    begin
    frxReport1.DotMatrixReport := True;
    // frxReport.PrepareReport();
    // frxreport.PreviewPages.Report.ShowPreparedReport;
    // frxReport.Print;
    frxReport1.ShowReport();
    // frxReport1.ShowPreparedReport;
    end;
    frxReport1.Free;}

    end; // proc

    _______
    Is there a special CleanUp-Method I forgot to call?

    regards
    Sascha


  • WolfgangSWolfgangS Bavaria, Germany
    edited 3:42AM
    Hi Sascha,

    if I export a report to a file (PDF) then something in the report-system is damaged. I cannot show another or the same report in a Preview.
    I have to exit the whole program to generate a new report.
    I hope this will be fixed in 3.05 ????

    Regards from Bavaria, Germany

    Wolfgang
  • diaswdiasw Germany
    edited 3:42AM
    Hi Wolfgang,

    seems to me as if there is still potential in amelioration ;-). I'm not going to buy FR before my problems aren't solved, even when FR is the best RepGen I've seen, considering the dot-matrix-solutions.



    regards from Karlsruhe, Ba-Wue, the sunny side of W-Germany...


    Sascha
    ;)

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.