protected void Page_Load(object sender, EventArgs e) { try { if (Session["COMP_CODE"] != null && Session["USERCODE"] != null && Session["USERNAME"] != null && Session["USERTYPE"] != null && Session["COMP_CODE"] != null && Session["COMP_NAME"] != null && Session["WORK_VIEWFLAG"] != null && Session["BRANCH_CODE"] != null && Session["BRANCH_NAME"] != null && Session["BRANCH_TYPE"] != null && Session["FIN_YEAR"] != null && Session["FIN_YEAR_END"] != null && Session["ON_DATE"] != null) { rprt.Load(Server.MapPath("~/ReportAccount/AccountTrading_ProfitLossStatementReport.rpt")); rprt.SetDatabaseLogon("veeradatabase", "Veera@welcome!1"); DataTable DtMain = new DataTable(); DataSet DtSub = new DataSet(); DtMain = AccountReport_Logiclayer.GetACCOUNTS_TradingAndProfitMainDetailsForReport(Session["COMP_CODE"].ToString(), "R", Convert.ToDateTime(Session["ON_DATE"].ToString()), Convert.ToDateTime(Session["FIN_YEAR"].ToString()), Convert.ToDateTime(Session["FIN_YEAR_END"].ToString())); DtSub = AccountReport_Logiclayer.GetACCOUNTS_TradingAndProfitMainDetailsForReport_MHL(Session["COMP_CODE"].ToString(), "R", Convert.ToDateTime(Session["ON_DATE"].ToString()), Convert.ToDateTime(Session["FIN_YEAR"].ToString()), Convert.ToDateTime(Session["FIN_YEAR_END"].ToString())); rprt.SetDataSource(DtMain); rprt.SetParameterValue("Branch_Name", (Session["BRANCH_NAME"].ToString())); rprt.Subreports[0].SetDataSource(DtSub.Tables[0]); rprt.Subreports[1].SetDataSource(DtSub.Tables[0]); rprt.Subreports[2].SetDataSource(DtSub.Tables[0]); rprt.Subreports[3].SetDataSource(DtSub.Tables[0]); CryRptStatement.ReportSource = rprt; } else { //LOgOut Code } } catch (Exception Ex) { Response.AppendToLog(Ex.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["COMP_CODE"] != null && Session["USERCODE"] != null && Session["USERNAME"] != null && Session["USERTYPE"] != null && Session["COMP_CODE"] != null && Session["COMP_NAME"] != null && Session["WORK_VIEWFLAG"] != null && Session["BRANCH_CODE"] != null && Session["BRANCH_NAME"] != null && Session["BRANCH_TYPE"] != null && Session["FIN_YEAR"] != null && Session["FIN_YEAR_END"] != null && Session["TRAN_NO"] != null && Session["TRAN_DATE"] != null && Session["TRAN_TYPE"] != null ) { // rprt.Load(Server.MapPath("~/ReportAccount/PaymentReciptOutstandingSubReport.rpt")); rprt.Load(Server.MapPath("~/ReportAccount/PaymentReceiptBillMainReport.rpt")); } DataSet ds = new DataSet(); DataSet dssub = new DataSet(); dssub = AccountReport_Logiclayer.GetOutStnadingDataOnPartyNameForReport(Session["COMP_CODE"].ToString(), Session["BRANCH_CODE"].ToString(), Session["TRAN_TYPE"].ToString(), Convert.ToDateTime(Session["TRAN_DATE"].ToString()), Session["TRAN_NO"].ToString(), Convert.ToDateTime(Session["FIN_YEAR"].ToString()), Convert.ToDateTime(Session["FIN_YEAR_END"].ToString())); ds = AccountReport_Logiclayer.GetPaymentReceiptDataForBillReport(Session["COMP_CODE"].ToString(), Convert.ToDateTime(Session["TRAN_DATE"].ToString()), Session["TRAN_NO"].ToString()); //rprt.Subreports[0].SetParameterValue("@p_comp_code", Session["COMP_CODE"].ToString()); //rprt.Subreports[0].SetParameterValue("@p_branch_code", Session["BRANCH_CODE"].ToString()); //rprt.Subreports[0].SetParameterValue("@pay_rec_m_tran_type", Session["TRAN_TYPE"].ToString()); //rprt.Subreports[0].SetParameterValue("@TRAN_DATE", Session["TRAN_DATE"].ToString()); //rprt.Subreports[0].SetParameterValue("@TRAN_NO", Session["TRAN_NO"].ToString()); //rprt.Subreports[0].SetParameterValue("@YRDT1", Session["FIN_YEAR"].ToString()); //rprt.Subreports[0].SetParameterValue("@YRDT2", Session["FIN_YEAR_END"].ToString()); rprt.SetDataSource(ds.Tables[0]); rprt.Subreports[0].SetDataSource(dssub.Tables[0]); CrystalReportViewer1.ReportSource = rprt; } catch (Exception Ex) { Response.AppendToLog(Ex.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["COMP_CODE"] != null && Session["USERCODE"] != null && Session["USERNAME"] != null && Session["USERTYPE"] != null && Session["COMP_CODE"] != null && Session["COMP_NAME"] != null && Session["WORK_VIEWFLAG"] != null && Session["BRANCH_CODE"] != null && Session["BRANCH_NAME"] != null && Session["BRANCH_TYPE"] != null && Session["FIN_YEAR"] != null && Session["FIN_YEAR_END"] != null && Session["TRAN_NO"] != null && Session["TRAN_DATE"] != null && Session["TRAN_TYPE"] != null ) { if (Session["PAGE_HEIGHT"].ToString() == "A4") { rprt.Load(Server.MapPath("~/ReportAccount/CashBankVoucherReporta4.rpt")); } else if (Session["PAGE_HEIGHT"].ToString() == "A5") { rprt.Load(Server.MapPath("~/ReportAccount/CashBankVoucherReporta5.rpt")); } } DataSet ds = new DataSet(); ds = AccountReport_Logiclayer.GetCashBankPaymentReceiptVoucherReport(Session["TRAN_NO"].ToString(), Convert.ToDateTime(Session["TRAN_DATE"].ToString()), Session["COMP_CODE"].ToString()); // ds = AccountReport_Logiclayer.GetCashBankPaymentReceiptVoucherReport(Convert.ToInt32(6).ToString(), Convert.ToDateTime("2019-12-08 00:00:00.000"),Convert.ToInt32(101).ToString()); rprt.SetDataSource(ds.Tables[0]); CrystalReportViewer1.ReportSource = rprt; } catch (Exception Ex) { Response.AppendToLog(Ex.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["COMP_CODE"] != null && Session["USERCODE"] != null && Session["USERNAME"] != null && Session["USERTYPE"] != null && Session["COMP_CODE"] != null && Session["COMP_NAME"] != null && Session["WORK_VIEWFLAG"] != null && Session["BRANCH_CODE"] != null && Session["BRANCH_NAME"] != null && Session["BRANCH_TYPE"] != null && Session["FIN_YEAR"] != null && Session["FIN_YEAR_END"] != null && Session["TRAN_NO"] != null && Session["TRAN_DATE"] != null && Session["TRAN_TYPE"] != null) { if (Session["PAGE_HEIGHT_JV"].ToString() == "A4") { rprt.Load(Server.MapPath("~/ReportAccount/JournalVoucherReport.rpt")); } else { rprt.Load(Server.MapPath("~/ReportAccount/JournalVoucherReportA5.rpt")); } } DataSet ds = new DataSet(); // rprt.Load(Server.MapPath("~/ReportAccount/JournalVoucherReport.rpt")); ds = AccountReport_Logiclayer.GetJournalVoucherDataForReport(Session["COMP_CODE"].ToString(), Convert.ToDateTime(Session["TRAN_DATE"].ToString()), Session["TRAN_NO"].ToString()); // ds = AccountReport_Logiclayer.GetJournalVoucherDataForReport("101", Convert.ToDateTime("2019-12-07 00:00:00.000"), "3"); rprt.SetDataSource(ds.Tables[0]); CryRptJournalVoucher.ReportSource = rprt; } catch (Exception ex) { Response.AppendToLog(ex.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["COMP_CODE"] != null && Session["USERCODE"] != null && Session["USERNAME"] != null && Session["USERTYPE"] != null && Session["COMP_CODE"] != null && Session["COMP_NAME"] != null && Session["WORK_VIEWFLAG"] != null && Session["BRANCH_CODE"] != null && Session["BRANCH_NAME"] != null && Session["BRANCH_TYPE"] != null && Session["FIN_YEAR"] != null && Session["FIN_YEAR_END"] != null && Session["ON_DATE"] != null) { rprt.Load(Server.MapPath("~/ReportAccount/AccountTradingStatementReport.rpt")); DataSet ds = new DataSet(); ds = AccountReport_Logiclayer.GetACCOUNTS_TradingDetailsForReport(Session["COMP_CODE"].ToString(), "R", Convert.ToDateTime(Session["ON_DATE"].ToString()), Convert.ToDateTime(Session["FIN_YEAR"].ToString()), Convert.ToDateTime(Session["FIN_YEAR_END"].ToString())); if ((ds.Tables.Count > 0)) { rprt.SetDataSource(ds.Tables[0]); rprt.SetParameterValue("Branch_Name", (Session["BRANCH_NAME"].ToString())); CryRptTradingAccount.ReportSource = rprt; } } else { //LOgOut Code } } catch (Exception Ex) { Response.AppendToLog(Ex.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["COMP_CODE"] != null && Session["USERCODE"] != null && Session["USERNAME"] != null && Session["USERTYPE"] != null && Session["COMP_CODE"] != null && Session["COMP_NAME"] != null && Session["WORK_VIEWFLAG"] != null && Session["BRANCH_CODE"] != null && Session["BRANCH_NAME"] != null && Session["BRANCH_TYPE"] != null && Session["FIN_YEAR"] != null && Session["FIN_YEAR_END"] != null && Session["ON_DATE"] != null) { rprt.Load(Server.MapPath("~/ReportAccount/AccountBalanceSheetReport.rpt")); rprt.SetDatabaseLogon("veeradatabase", "Veera@welcome!1"); DataSet DsBal = new DataSet(); DsBal = AccountReport_Logiclayer.GetACCOUNTS_BalanceSheetForReport(Session["COMP_CODE"].ToString(), Convert.ToDateTime(Session["ON_DATE"].ToString()), Convert.ToDateTime(Session["FIN_YEAR"].ToString()), Convert.ToDateTime(Session["FIN_YEAR_END"].ToString())); rprt.SetDataSource(DsBal.Tables[0]); // rprt.SetParameterValue("Branch_Name", (Session["BRANCH_NAME"].ToString())); CryRptBalanceSheet.ReportSource = rprt; } else { //LOgOut Code } } catch (Exception Ex) { Response.AppendToLog(Ex.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["COMP_CODE"] != null && Session["USERCODE"] != null && Session["USERNAME"] != null && Session["USERTYPE"] != null && Session["COMP_CODE"] != null && Session["COMP_NAME"] != null && Session["WORK_VIEWFLAG"] != null && Session["BRANCH_CODE"] != null && Session["BRANCH_NAME"] != null && Session["BRANCH_TYPE"] != null && Session["FIN_YEAR"] != null && Session["FIN_YEAR_END"] != null && Session["TRAN_NO"] != null && Session["TRAN_DATE"] != null && Session["TRAN_TYPE"] != null) { rprt.Load(Server.MapPath("~/ReportAccount/CreditDebitNoteReport.rpt")); } DataSet ds = new DataSet(); ds = AccountReport_Logiclayer.GetCreditDebitNoteDataForReport(Session["COMP_CODE"].ToString(), Convert.ToDateTime(Session["TRAN_DATE"].ToString()), Session["TRAN_NO"].ToString()); // ds = AccountReport_Logiclayer.GetCreditDebitNoteDataForReport(Convert.ToInt32(101).ToString(), Convert.ToDateTime("2019-11-14 00:00:00.000"), Convert.ToInt32(6).ToString()); // rprt.Load(Server.MapPath("~/ReportAccount/CreditDebitNoteReport.rpt")); rprt.SetDataSource(ds.Tables[0]); rprt.SetParameterValue("PARAM_LOGO", Server.MapPath("~/Admin/Company/LH/" + ds.Tables[0].Rows[0]["CMPLOGO"].ToString())); CryRptCredtDebitNote.ReportSource = rprt; } catch (Exception ex) { Response.AppendToLog(ex.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["COMP_CODE"] != null && Session["USERCODE"] != null && Session["USERNAME"] != null && Session["USERTYPE"] != null && Session["COMP_CODE"] != null && Session["COMP_NAME"] != null && Session["WORK_VIEWFLAG"] != null && Session["BRANCH_CODE"] != null && Session["BRANCH_NAME"] != null && Session["BRANCH_TYPE"] != null && Session["FIN_YEAR"] != null && Session["FIN_YEAR_END"] != null && Session["FROM_DATE"] != null && Session["TO_DATE"] != null && Session["MENU_FLAG"] != null) { if (string.IsNullOrEmpty(Session["GROUP_CODE"] as string)) { Session["GROUP_CODE"] = "0"; } if (string.IsNullOrEmpty(Session["ACODE"] as string)) { Session["ACODE"] = "0"; } if (Session["MENU_FLAG"].ToString() == "L") { rprt.Load(Server.MapPath("~/ReportAccount/AccountWiseLedgerReport.rpt")); } else if (Session["MENU_FLAG"].ToString() == "LC") { rprt.Load(Server.MapPath("~/ReportAccount/AccountWiseLegderConfirmationReport.rpt")); } DataSet ds = new DataSet(); ds = AccountReport_Logiclayer.GetAccountsLedgerDeatilsOnPartyNameForReport(Session["COMP_CODE"].ToString(), Session["BRANCH_CODE"].ToString(), Session["GROUP_CODE"] == null ? "0" : Session["GROUP_CODE"].ToString(), Session["ACODE"] == null ? "0" : Session["ACODE"].ToString(), Convert.ToDateTime(Session["FROM_DATE"].ToString()), Convert.ToDateTime(Session["TO_DATE"].ToString()), Convert.ToDateTime(Session["FIN_YEAR"].ToString()), Convert.ToDateTime(Session["FIN_YEAR_END"].ToString())); if ((ds.Tables.Count > 0)) { rprt.SetDataSource(ds.Tables[0]); rprt.SetParameterValue("fromto", (Session["FROM_DATE"].ToString() + " To " + Session["TO_DATE"].ToString())); CryRptLedger.ReportSource = rprt; } } else { //LOgOut Code } } catch (Exception Ex) { Response.AppendToLog(Ex.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { CryRptMiscStatement.Zoom(200); try { if (Session["COMP_CODE"] != null && Session["USERCODE"] != null && Session["USERNAME"] != null && Session["USERTYPE"] != null && Session["COMP_CODE"] != null && Session["COMP_NAME"] != null && Session["WORK_VIEWFLAG"] != null && Session["BRANCH_CODE"] != null && Session["BRANCH_NAME"] != null && Session["BRANCH_TYPE"] != null && Session["FIN_YEAR"] != null && Session["FIN_YEAR_END"] != null && Session["FROM_DATE"] != null && Session["TO_DATE"] != null && Session["MENU_FLAG"] != null && Session["VIEW_REPORT"] != null) { if (string.IsNullOrEmpty(Session["GROUP_CODE"] as string)) { Session["GROUP_CODE"] = "0"; } if (Session["MENU_FLAG"].ToString() == "AL") { rprt.Load(Server.MapPath("~/ReportAccount/MiscAccountListReport.rpt")); DataSet ds = new DataSet(); ds = AccountReport_Logiclayer.GetACCOUNT_DetailsListForReport(Session["COMP_CODE"].ToString(), Session["BRANCH_CODE"].ToString(), Session["GROUP_CODE"] == null ? "0" : Session["GROUP_CODE"].ToString()); if ((ds.Tables.Count > 0)) { rprt.SetDataSource(ds.Tables[0]); CryRptMiscStatement.ReportSource = rprt; } } else if (Session["MENU_FLAG"].ToString() == "ALL") { rprt.Load(Server.MapPath("~/ReportAccount/MiscAccountLabelListReport.rpt")); DataSet ds = new DataSet(); ds = AccountReport_Logiclayer.GetACCOUNT_DetailsListForReport(Session["COMP_CODE"].ToString(), Session["BRANCH_CODE"].ToString(), Session["GROUP_CODE"] == null ? "0" : Session["GROUP_CODE"].ToString()); if ((ds.Tables.Count > 0)) { rprt.SetDataSource(ds.Tables[0]); CryRptMiscStatement.ReportSource = rprt; } } else if (Session["MENU_FLAG"].ToString() == "CCL") { rprt.Load(Server.MapPath("~/ReportAccount/MiscCustomerContactDetailsReport.rpt")); DataSet ds = new DataSet(); ds = AccountReport_Logiclayer.GetACCOUNTS_CustomerContactDetailsForReport(Session["COMP_CODE"].ToString(), Session["BRANCH_CODE"].ToString()); if ((ds.Tables.Count > 0)) { rprt.SetDataSource(ds.Tables[0]); rprt.SetParameterValue("UserName", (Session["USERNAME"].ToString())); CryRptMiscStatement.ReportSource = rprt; } } else if (Session["MENU_FLAG"].ToString() == "SCL") { rprt.Load(Server.MapPath("~/ReportAccount/MiscCustomerContactDetailsReport.rpt")); DataSet ds = new DataSet(); ds = AccountReport_Logiclayer.GetACCOUNTS_SupplierContactDetailsForReport(Session["COMP_CODE"].ToString(), Session["BRANCH_CODE"].ToString()); if ((ds.Tables.Count > 0)) { rprt.SetDataSource(ds.Tables[0]); rprt.SetParameterValue("UserName", (Session["USERNAME"].ToString())); CryRptMiscStatement.ReportSource = rprt; } } else if (Session["MENU_FLAG"].ToString() == "ULD") { rprt.Load(Server.MapPath("~/ReportAccount/MiscUserLoginDetailsReport.rpt")); if (string.IsNullOrEmpty(Session["USER_LOGIN_NAME"] as string)) { Session["USER_LOGIN_NAME"] = "0"; } DataSet ds = new DataSet(); ds = AccountReport_Logiclayer.GetACCOUNTS_USERLOGINDetailsForReport(Session["USER_LOGIN_NAME"].ToString()); if ((ds.Tables.Count > 0)) { rprt.SetDataSource(ds.Tables[0]); rprt.SetParameterValue("UserName", (Session["USERNAME"].ToString())); rprt.SetParameterValue("Comp_Name", (Session["COMP_NAME"].ToString())); rprt.SetParameterValue("Branch_Name", (Session["BRANCH_NAME"].ToString())); rprt.SetParameterValue("FromToDate", (Convert.ToDateTime(Session["FIN_YEAR"].ToString()).ToString("dd-mm-yyyy") + " To " + Convert.ToDateTime(Session["FIN_YEAR_END"].ToString()).ToString("dd-mm-yyyy"))); CryRptMiscStatement.ReportSource = rprt; } } } else { //LOgOut Code } } catch (Exception Ex) { Response.AppendToLog(Ex.ToString()); } }