Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C# SetDataSource method for a dynamic report problem.

Status
Not open for further replies.

oguzhan

MIS
Jul 3, 2001
18
TR
Hello friends,

I have a report that i created in Crystal Reports 8.5. I included it in my project and with a crystal viewer i can show this report.

However i have to filter this report data according to user feedback.

I created a dataset and filled it with the necessary data.With the report's setdatasource method i assigned this dataset as report's datasource.But, altough application does not give any error message and build normally, browser brings the static report that i saved before.

I'll be very pleased if you have an idea about setting a dynamic datasource like i want.

I'm writing the code simply like in below.

string sql=...;
dt=SQLExecute(sql);
ds.Tables.Add(dt);
orpt.SetDataSource(dt);
CrViewer.ReportSource=orpt;
CrViewer.DataBind();

See you and Thank you..
 
The report object has a DiscardSavedData method that you can use with VB. There must be something similar in C#.

Hope that helps!

Marie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top