cancel
Showing results for 
Search instead for 
Did you mean: 

Show Crystal report when add on form button click

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

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.

-Dell

Answers (0)