Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Creating a crystal report from a dataset

Avatar of elmbrook
elmbrook asked on
12 Comments1 Solution772 ViewsLast Modified:

I have created a blank Crystal report called test.rpt.

I would like to manually add the information from a dataset to the report.

The report is loaded into Crystal Report Viewer.

The below code works in adding the report to the viewer but how would I connect my dataset to it?

I think I am close, just need help with the final display.

private void rptBrowser_Load(object sender, EventArgs e)
            // Create new DataSet
            mydb thedb = new mydb();
            SqlDataAdapter myds = null;

            string _sql = "select LogName, Firstname, Lastname from sysUser";

            myds = thedb.myDataAdapter(_sql);

            ReportDocument cryRpt = new ReportDocument();
            cryRpt.Load(myglobal_properties.FP1 + "test.rpt");
            rptView.ReportSource = cryRpt;

Avatar of elmbrook

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 12 Comments.
See Answers