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

DLL Error

edited January 2004 in General
Hi,

I have a main program with report builder components calling a DLL with
report builder components. When I run the program I get this message: Class
EFileError with message 'A class named TraCodeModule already exists.'
The Report builder component names are all defaults for both the main
program and the DLL called.
I am using RB 6.

Thanks,
Clem

Comments

  • edited January 2004

    Try redesigning your application to be built with run-time packages rather
    than using a .dll. Delphi packages (i.e. .bpl's) are .dll's that have a
    special format that makes them easy to use. When you build your application
    you can have a small .exe that contains only your app code. All of the
    Delphi and RB classes can reside in their current packages. You can also
    build your own packages that require the Delphi and RB packages. Using this
    strategy the RB classes will only be loaded a single time.

    Here are some options:

    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.


    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.