Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to view data from SQlServer database through Crystal Report with the help of calender? (note: To view Monthly sales report)
Posted

1 solution

if (flag == true)
{
ReportDocument doc = new ReportDocument();
PaySlip.monthwisesalaryDataTable saldetails = new PaySlip.monthwisesalaryDataTable ();
PaySlipTableAdapters.monthwisesalaryTableAdapter ad = new PaySlipTableAdapters.monthwisesalaryTableAdapter();
ad.Fill(saldetails);
DataSet ds = new DataSet();
ds.Tables.Add(saldetails);
string str;
str = Server.MapPath("~\\CrystalReports\\");
doc.Load(str + "PaySlipReport.rpt");
doc.SetDataSource(ds);
CrystalReportViewerPaySlip.ReportSource = doc;
CrystalReportViewerPaySlip.SelectionFormula = "{monthwisesalary.intdoctorId}= " + ddlemployeeid.Text + " and {monthwisesalary.intsalaryformonth}=" + ddlsalarymonth.Text + " and {monthwisesalary.intsalaryforyear}=" + ddlsalaryyear.Text + " ";
CrystalReportViewerPaySlip.DataBind();
clear();
}
else
lblmsg.Text = "";
 
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