private void GetReport() { DBCON a = new DBCON(); if (Request.QueryString["pino"] != null) { //int ID = 0; //int len = Request.QueryString["ID"].ToString().Split('-').Length; //if (len > 1) //if the input is OrderNumber //{ ID = Convert.ToInt32(BAL.Common.GetScalarBySQLQuery("select ID from OrderSummary where OrderNo='" + Request.QueryString["ID"].ToString() + "'")); } //else //{ ID = Convert.ToInt32(Request.QueryString["ID"].ToString()); } PurchaseReturnReport objRpt = new PurchaseReturnReport(); crystalReport = objRpt; a.ExcecuteQuery("select* from PurchaseReturnTable t1 inner join ProductTable t2 on t1.Item = t2.P_name inner join PurchaseRInvoiceTable t3 on t1.BillNo = t3.PR_No where t3.PR_InvoiceNo ='" + Request.QueryString["pino"].ToString() + "' "); crystalReport.SetDataSource(a.DT); crystalReport.SetParameterValue("pino", Request.QueryString["pino"].ToString()); CrystalReportViewer1.ReportSource = crystalReport; } }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { PurchaseReturnReport rpt = new PurchaseReturnReport(); rpt.Site = this.Site; return(rpt); }