Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

'Save SubReport To File' saves the subreport in binary format to file

Hi,

When in the designer a report is saved to file, the format is changed to ftAscii by TppDesignDocumentController.SaveFile.
When a subreport is saved using 'Save SubReport To File' the format is not changed and the default ftBinary is used.
I would prefer the subreport also in ascii format when saved to file without changing the template settings for the subreport myself.

Using RB21.01/Delphi 10.4
Kind regards,

Jeroen Röttink
JR-soft software solutions

Comments

  • Found an easy solution.

    procedure TmyEndUserSolution.ppDesigner1CustomSaveDoc(Sender: TObject);
    var
    lFormat: TppFormatType;
    lReport: TppCustomReport;
    begin
    lReport := TppCustomReport(Sender);
    lFormat := lReport.Template.Format;
    try
    if (lReport.Template.SaveTo = stFile)
    then begin
    // always ascii
    lReport.Template.Format := ftASCII;
    end
    // save report template
    lReport.Template.Save;
    finally
    lReport.Template.Format := lFormat;
    end;
    end;
    Kind regards,

    Jeroen Röttink
    JR-soft software solutions
  • Hi Jeroen,

    I created a patch for RB 21.02 that resolves the issue.

    I emailed you the patch.

    RB developers with an active license can email support@ and request the patch.

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
Sign In or Register to comment.