private void ShowReport(string StartDate, string EndDate) { try { ReportViewer1.LocalReport.DataSources.Clear(); DSFinance ds = new DSFinance(); string reportPath = Server.MapPath("TrialBalance.rdlc"); DSFinanceTableAdapters.usp_TrialBalanceTableAdapter da = new DSFinanceTableAdapters.usp_TrialBalanceTableAdapter(); da.Fill(ds.usp_TrialBalance); ReportParameter paramLogo = new ReportParameter(); paramLogo.Name = "ReportDuration"; paramLogo.Values.Add("From : " + StartDate.Replace("'", "") + " To : " + EndDate.Replace("'", "")); ReportViewer1.LocalReport.EnableExternalImages = true; ReportViewer1.LocalReport.ReportPath = reportPath; ReportViewer1.LocalReport.SetParameters(paramLogo); ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", ds.Tables["usp_TrialBalance"])); ReportViewer1.LocalReport.Refresh(); } catch (Exception) { } finally { Destroy(); } }
private void ShowReport() { try { ReportViewer1.LocalReport.DataSources.Clear(); DSFinance ds = new DSFinance(); string reportPath = Server.MapPath("IncomeStatementRpt.rdlc"); DSFinanceTableAdapters.usp_IncomeStatementTableAdapter da = new DSFinanceTableAdapters.usp_IncomeStatementTableAdapter(); da.Fill(ds.usp_IncomeStatement, Convert.ToDateTime(txtDateFrom.Text.Trim()), Convert.ToDateTime(txtDateTo.Text.Trim())); ReportParameter Dates = new ReportParameter(); Dates.Name = "Dates"; Dates.Values.Add("From : " + txtDateFrom.Text + " To : " + txtDateTo.Text); ReportViewer1.LocalReport.EnableExternalImages = true; ReportViewer1.LocalReport.ReportPath = reportPath; ReportViewer1.LocalReport.SetParameters(Dates); ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", ds.Tables["usp_IncomeStatement"])); ReportViewer1.LocalReport.Refresh(); } catch (Exception) { } finally { } }
private void ShowReport(string ID, string StartingDate, string EndingDate) { StartingDate = StartingDate.Replace("\"", ""); EndingDate = EndingDate.Replace("\"", ""); try { ReportViewer1.LocalReport.DataSources.Clear(); DSFinance ds = new DSFinance(); string reportPath = Server.MapPath("LedgerRpt.rdlc"); DSFinanceTableAdapters.usp_LedgerRptTableAdapter da = new DSFinanceTableAdapters.usp_LedgerRptTableAdapter(); da.Fill(ds.usp_LedgerRpt, Convert.ToDateTime(StartingDate), Convert.ToDateTime(EndingDate), Convert.ToInt32(ID)); ReportViewer1.LocalReport.ReportPath = reportPath; ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSet1", ds.Tables["usp_LedgerRpt"])); ReportViewer1.LocalReport.Refresh(); } catch (Exception) { } }
private void ShowReport() { try { ReportViewer1.LocalReport.DataSources.Clear(); DSFinance ds = new DSFinance(); string reportPath = Server.MapPath("BalanceSheetRpt.rdlc"); DSFinanceTableAdapters.usp_BalanceSheetRpt_DebitTableAdapter da = new DSFinanceTableAdapters.usp_BalanceSheetRpt_DebitTableAdapter(); DSFinanceTableAdapters.usp_BalanceSheetRpt_CreditTableAdapter da1 = new DSFinanceTableAdapters.usp_BalanceSheetRpt_CreditTableAdapter(); da.Fill(ds.usp_BalanceSheetRpt_Debit, Convert.ToDateTime(txtDateFrom.Text.Trim()), Convert.ToDateTime(txtDateTo.Text.Trim())); da1.Fill(ds.usp_BalanceSheetRpt_Credit, Convert.ToDateTime(txtDateFrom.Text.Trim()), Convert.ToDateTime(txtDateTo.Text.Trim())); ReportParameter paramLogo = new ReportParameter(); paramLogo.Name = "ReportDuration"; paramLogo.Values.Add("From : " + txtDateFrom.Text.Trim() + " To : " + txtDateTo.Text.Trim()); ReportViewer1.LocalReport.EnableExternalImages = true; ReportViewer1.LocalReport.ReportPath = reportPath; ReportViewer1.LocalReport.SetParameters(paramLogo); ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", ds.Tables["usp_BalanceSheetRpt_Debit"])); ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", ds.Tables["usp_BalanceSheetRpt_Credit"])); ReportViewer1.LocalReport.Refresh(); } catch (Exception) { } finally { //DestorayData(); } }
private void ShowReport(string ID) { try { ReportViewer1.LocalReport.DataSources.Clear(); DSFinance ds = new DSFinance(); string reportPath = Server.MapPath("BankVoucherRpt.rdlc"); DSFinanceTableAdapters.usp_JournalVoucherRptTableAdapter da1 = new DSFinanceTableAdapters.usp_JournalVoucherRptTableAdapter(); da1.Fill(ds.usp_JournalVoucherRpt, Convert.ToInt32(ID)); ReportViewer1.LocalReport.ReportPath = reportPath; ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSet1", ds.Tables["usp_JournalVoucherRpt"])); ReportViewer1.LocalReport.Refresh(); } catch (Exception) { } }