Dynamically add crystal report to application

  • Thread starter Thread starter ghigbee
  • Start date Start date
G

ghigbee

Hi all and thanks in advance for any input.

I'm designing an application that will make heavy use of crystal
reports. I'm trying to make the application look at a specific
directory for a list of reports and make them available to the user.
Does anyone know if you can create reports as a separate project in
VS.NET 2003 and then allow the application to load them when chosen by
the user? I'm trying to avoid the need to recompile the application
every time a user wants a new report. If I cannot do that with the
version of crystal reports that shipped with VS.NET, do you know if it
can be done with the full version of crystal reports?

Thanks,
Gary
 
Nevermind, I got it to work by creating a wrapper class for each report
that inherits from the report itself. It may not be the most elegant
way to do it but it works. In case anyone needs the info here are the
steps I followed:

1. Create an empty class and add a crystal report to it.
2. Set the class to inherit from the class that is created for the
crystal report.
3. Load the assembly
4.Create an instance of the assembly and set that as the report source
for the crystal report viewer.

Thanks,
Gary
 
Back
Top