Minimize Size of Executable

Question: “How can I minimize the size of my application executable (.exe) when using ReportBuilder?”

Answer:

  1. Part of the overhead is linking in supporting vcl and data access class libraries.
  2. Part of the overhead is linking the RB library. Probably about 600K or so for the core reporting library. If you include the Designer, Query Tools, etc. then there will be additional overhead.
  3. Any additional overhead will be added by the reports you create. Each report will contain description of all the objects on the report. View the .dfm file as text for an example.

Strategies to minimize the size of the .Exe:
  1. Compile your project using the Delphi run-time packages option. This will create a small .exe. You then distribute the runtime packages along with your executable file.
  2. Store you report definitions to .rtm files or a database. Thus the report definitions are stored outside the .exe and only loaded as needed. If you have a large number of reports, this can drastically reduce the size of the .exe.
  3. Compile all of your reports into a Delphi package.
    Then your application only loads the package as needed.