We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

crystal report

Thread ID:

Created:

Updated:

Platform:

Replies:

68869 Oct 4,2007 06:57 AM UTC Feb 4,2009 05:38 PM UTC ASP.NET Web Forms (Classic) 3
loading
Tags: FAQ
Sherin
Asked On October 4, 2007 06:57 AM UTC

How can we dynamically bind dataset in crystal report at run time plz help.



Poornima Joy Balan [Syncfusion]
Replied On October 8, 2007 05:52 AM UTC

Hello,

Here's the code snippet to dynamically bind dataset in crystal report at run time.

String connString = @"Provider=SQLOLEDB.1;User ID=yourid;Password=yourpassword;Persist Security Info=True;Network Address=yourIP;Initial Catalog=databasename";
OleDbConnection conn = new OleDbConnection(connString);
conn.Open();
string query = "SELECT * from table";
OleDbDataAdapter myDataAdapter = new OleDbDataAdapter(query, conn);
DataSet dataReport = new DataSet();
myDataAdapter.Fill(dataReport);


CrystalReport1 rep = new CrystalReport1();
rep.SetDataSource(dataReport);
crystalReportViewer1.ReportSource = rep;

Let me know, any further queries.

Regards,
Poornima



Administrator [Syncfusion]
Replied On February 4, 2009 05:37 PM UTC



hai attaching dataset to report ok but in report i dint added any table i wil not get data .i should add same tables which i specified in select statment and should i drag feilds which i want?
i want clarity what ur saying plz tell


Administrator [Syncfusion]
Replied On February 4, 2009 05:38 PM UTC



hai attaching dataset to report ok but in report i dint added any table i wil not get data .i should add same tables which i specified in select statment and should i drag feilds which i want?
i want clarity what ur saying plz tell


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;