All blank on pdf export

Simple Master/detail report. If I use ShowPreparedReport and export from there to pdf everything is fine. If I use Export(frxPDFExport1) The pdf file is the right size but its blank. If there's anything there its white on white.

I've tried embedding fonts but that did no good.

I found I had to turn of FastExport for the frxXLSExport1 otherwise that screwed up. Is there a property I need to alter for frxPDFExport1?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 4:37AM
    "If I use Export(frxPDFExport1) The pdf file is the right size but its blank. If there's anything there its white on white."
    did you call prepare report first
  • edited 4:37AM
    gordk wrote: »
    "If I use Export(frxPDFExport1) The pdf file is the right size but its blank. If there's anything there its white on white."
    did you call prepare report first

    Yes. Here's the function calling the report

    procedure TFilmList.ProduceReport(OutputWanted: integer);
    var
    Choice: TfrxReport;
    tagRange: integer;
    tagSelection: integer;
    Band: TComponent;
    begin
    tagRange := OutputWanted div 1000;
    tagSelection := OutputWanted - (tagRange * 1000);
    Parents.Prepare;
    Parents.ExecSQL;
    if tagRange = 2 then begin
    Choice := ReportList;
    Children.Prepare;
    Children.ParamByName('xRef').AsInteger := Parents.FieldByName('_ID').AsInteger;
    frxXLSExport1.ExportStyles := True;
    end else begin
    Choice := NoEpisodes;
    frxXLSExport1.ExportStyles := False;
    end;
    Band := Choice.FindObject('Page1');
    if Band <> nil then begin
    TfrxReportPage(Band).EndlessHeight := tagSelection > 1;
    TfrxReportPage(Band).EndlessWidth := tagSelection > 1;
    if TagSelection = 2 then begin
    Band := Choice.FindObject('PageFooter1');
    if Band <> nil then TfrxPageFooter(Band).Visible := False;
    Band := Choice.FindObject('PageHeader1');
    if Band <> nil then TfrxPageFooter(Band).Visible := False;
    end;
    end;
    Choice.PrepareReport;
    case tagSelection of
    1: Choice.Print;
    2: Choice.Export(frxXLSExport1);
    3: Choice.Export(frxPDFExport1);
    end;
    Parents.Close;
    Children.Close;
    end;
  • gordkgordk St.Catherines On. Canada.
    edited 4:37AM
    hi roy i think the problem lies in the last case statement
    my pref would be to set the export props within each case
  • edited 4:37AM
    gordk wrote: »
    hi roy i think the problem lies in the last case statement
    my pref would be to set the export props within each case

    After much experimenting the answer was EndlessHeight - leave that false and it works set to true and I get a blank pdf.

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.