Click here to Skip to main content
15,901,505 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am developing a website..the client want to take print out of the bill from their system...what i want to do for that...shall we use cristal report..but i d't know how to use it...plz give me a suggestion
Posted

1 solution

 
Share this answer
 
v2
Comments
Member 9492907 29-Oct-12 3:14am    
I had created a crystal report...i got all the data from the database and i given the data source for crystal report..but when it redirect to the .rpt page, it will ask for the following details

Enter Values
The report you requested requires further information.

DataSet1
Server name:
Database name:
User name:
Password:
here is my code

protected void Page_Load(object sender, EventArgs e)
{
cls_bill obj = new cls_bill();
ReportDocument rptDoc = new ReportDocument();
DataSet ds = new DataSet(); // .xsd file name
ds = obj.data();

// Your .rpt file path will be below
rptDoc.Load(Server.MapPath("~/D:/BillingSystem/BillingSystem/CrystalReport2.rpt"));

//set dataset to the report viewer.
rptDoc.SetDataSource(ds);
CrystalReportViewer1.ReportSource = rptDoc;
}

plz help me..its very urgent
Sushil Mate 29-Oct-12 3:18am    
yes you need to provide the database details for displaying data. check updated solutions.

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