Skip to Content
avatar image
Former Member

Show Crystal report when add on form button click

Hi Experts

I try to show Crystal report that is already add on administration->setup->general--->Report and layout manager

and then I want to connect Visual studio new form when button click

that addon Crystal report will show.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 17, 2017 at 03:21 PM

    There are several ways to do this depending on whether this is a web or desktop application. My experience is with desktop apps.

    I usually set up a form that just has the Crystal Viewer on it. I override the form constructor so that I can tell it which report to load and, if I'm using a local DataSet, which data to connect to. If I'm connecting to a database instead of a local DataSet, I'll pass in the connection string. If the report includes parameters that will be set based on what the user is viewing in the application, I will also create a class to hold the param name/value pairs and pass in a List of that class with the parameters to be set. The constructor will then load the report, connect it to the data, and set the parameters before the form shows.

    Using this technique, you only have to have one form in order to show any report in your program.


    Add comment
    10|10000 characters needed characters exceeded