Click here to Skip to main content
15,887,300 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hai Techie

1. while running this code it shows an
C#
try
{

SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=Iwens_Database;Integrated Security=True");
SqlCommand command = new SqlCommand("SELECT E_id, E_Name, E_Address, E_Contact_No, E_Email, DOEn, E_noi, E_coursename, E_year, E_companyname, E_others, E_design, E_Selected, E_Followup FROM dbo.Enquiry_table", con);

SqlDataAdapter adapter = new SqlDataAdapter(command);
DataSet dataset = new DataSet();
DataTable dt = dataset.Tables[0];
adapter.Fill(dataset, "Enquids");
ReportDocument reportdoc= new ReportDocument();
reportdoc.Load(Server.MapPath("Enquirybydate.rpt"));
reportdoc.SetDataSource(dataset.Tables["Enquiry_table"]);
reportdoc.SetDataSource (dt);

CrystalReportViewer1.ReportSource = reportdoc ;
CrystalReportViewer1.DataBind();

Crystal Report version:13.0.2000.0
Kindly provide step by step

C#
}
catch (Exception ex )
{
Response.Write(ex.Message);

}


It shows an error message
The report you requested requires further information

Server name :
Db name:
username:
password:
use intergrated security [with check box]



What does it means and give solution


2.Is there any other way to generate a crystal report which is hassle free
Posted
Updated 24-Feb-13 21:54pm
v3

It is not able to connect to the Database properly.
Provide proper values to DataSource and Provide User Id and Pwd and try.

Below link to know about Connection Strings:
connectionstrings
 
Share this answer
 
Move this line DataTable dt = dataset.Tables[0]; next to the adapter.Fill(dataset, "Enquids");

and check the below link. it solves your problem.

http://www.codeproject.com/Articles/28899/Crystal-Report-with-DataSet-and-DataTable-using-C
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900