protected override void RefreshReport()
        {
            base.RefreshReport();

            int      CompanyId = int.Parse(Parameters.Find(p => p.Name == "CompanyId").Value);
            DateTime Date      = DateTime.Parse(Parameters.Find(p => p.Name == "Date").Value);

            ReportParameter[] reportParam = new ReportParameter[1];

            EBalanceSheetReportDS    bsDataSource      = new EBalanceSheetReportDS();
            AssetTableAdapter        assetAdapter      = new AssetTableAdapter();
            LiabilityTableAdapter    liabilityAdapter  = new LiabilityTableAdapter();
            EquityTableAdapter       equityAdapter     = new EquityTableAdapter();
            ECompanyDS               companyDataSource = new ECompanyDS();
            tblCompaniesTableAdapter companyAdapter    = new tblCompaniesTableAdapter();

            assetAdapter.Fill(bsDataSource.Asset, CompanyId, Date, 1);
            liabilityAdapter.Fill(bsDataSource.Liability, CompanyId, Date, 2);
            equityAdapter.Fill(bsDataSource.Equity, CompanyId, Date, 3);
            companyAdapter.Fill(companyDataSource.tblCompanies, CompanyId);

            reportViewer.Reset();
            reportViewer.LocalReport.ReportPath = Properties.Settings.Default.ReportPath + "Balance Sheet.rdlc";

            reportParam[0] = new ReportParameter("Date", Date.ToString("MM'/'dd'/'yyyy"), false);

            reportViewer.LocalReport.SetParameters(reportParam);

            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Asset", bsDataSource.Tables["Asset"]));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Liability", bsDataSource.Tables["Liability"]));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Equity", bsDataSource.Tables["Equity"]));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Company", companyDataSource.Tables["tblCompanies"]));
            reportViewer.RefreshReport();
        }
        protected override void RefreshReport()
        {
            base.RefreshReport();

            int      CompanyId     = int.Parse(Parameters.Find(p => p.Name == "CompanyId").Value);
            DateTime FromDate      = DateTime.Parse(Parameters.Find(p => p.Name == "FromDate").Value);
            DateTime ToDate        = DateTime.Parse(Parameters.Find(p => p.Name == "ToDate").Value);
            int      JournalTypeId = int.Parse(Parameters.Find(p => p.Name == "JournalTypeId").Value);

            ReportParameter[] reportParam = new ReportParameter[2];

            EJournalsReportDS          journalDataSource = new EJournalsReportDS();
            JournalsReportTableAdapter journalAdapter    = new JournalsReportTableAdapter();
            ECompanyDS companyDataSource = new ECompanyDS();
            tblCompaniesTableAdapter    companyAdapter     = new tblCompaniesTableAdapter();
            tblJournalTypesTableAdapter journaltypeAdapter = new tblJournalTypesTableAdapter();

            journalAdapter.Fill(journalDataSource.JournalsReport, CompanyId, FromDate, ToDate, JournalTypeId);
            companyAdapter.Fill(companyDataSource.tblCompanies, CompanyId);
            journaltypeAdapter.Fill(journalDataSource.tblJournalTypes, JournalTypeId);

            reportViewer.Reset();
            reportViewer.LocalReport.ReportPath  = Properties.Settings.Default.ReportPath + "Journals.rdlc";
            reportViewer.LocalReport.DisplayName = journalDataSource.tblJournalTypes.Rows[0][0].ToString();

            reportParam[0] = new ReportParameter("FromDate", FromDate.ToString("MM'/'dd'/'yyyy"), false);
            reportParam[1] = new ReportParameter("ToDate", ToDate.ToString("MM'/'dd'/'yyyy"), false);

            reportViewer.LocalReport.SetParameters(reportParam);

            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Journals", journalDataSource.Tables["JournalsReport"]));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Company", companyDataSource.Tables["tblCompanies"]));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("JournalType", journalDataSource.Tables["tblJournalTypes"]));
            reportViewer.RefreshReport();
        }
        protected override void RefreshReport()
        {
            base.RefreshReport();

            int      CompanyId = int.Parse(Parameters.Find(p => p.Name == "CompanyId").Value);
            DateTime FromDate  = DateTime.Parse(Parameters.Find(p => p.Name == "FromDate").Value);
            DateTime ToDate    = DateTime.Parse(Parameters.Find(p => p.Name == "ToDate").Value);

            ReportParameter[] reportParam = new ReportParameter[2];

            EIncomeStatementReportDS isDataSource   = new EIncomeStatementReportDS();
            IncomeTableAdapter       incomeAdapter  = new IncomeTableAdapter();
            ExpenseTableAdapter      expenseAdapter = new ExpenseTableAdapter();
            ECompanyDS companyDataSource            = new ECompanyDS();
            tblCompaniesTableAdapter companyAdapter = new tblCompaniesTableAdapter();

            incomeAdapter.Fill(isDataSource.Income, CompanyId, FromDate, ToDate, 4);
            expenseAdapter.Fill(isDataSource.Expense, CompanyId, FromDate, ToDate, 5);
            companyAdapter.Fill(companyDataSource.tblCompanies, CompanyId);

            reportViewer.Reset();
            reportViewer.LocalReport.ReportPath = Properties.Settings.Default.ReportPath + "Income Statement.rdlc";

            reportParam[0] = new ReportParameter("FromDate", FromDate.ToString("MM'/'dd'/'yyyy"), false);
            reportParam[1] = new ReportParameter("ToDate", ToDate.ToString("MM'/'dd'/'yyyy"), false);

            reportViewer.LocalReport.SetParameters(reportParam);

            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Income", isDataSource.Tables["Income"]));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Expense", isDataSource.Tables["Expense"]));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Company", companyDataSource.Tables["tblCompanies"]));
            reportViewer.RefreshReport();
        }
        protected override void RefreshReport()
        {
            base.RefreshReport();

            int Id        = int.Parse(Parameters.Find(p => p.Name == "Id").Value);
            int CompanyId = int.Parse(Parameters.Find(p => p.Name == "CompanyId").Value);

            ESalesInvoicePrintoutDS            siDataSource     = new ESalesInvoicePrintoutDS();
            tblSalesInvoicesTableAdapter       SIAdapter        = new tblSalesInvoicesTableAdapter();
            tblSalesInvoiceDetailsTableAdapter SIDetailsAdapter = new tblSalesInvoiceDetailsTableAdapter();
            ECompanyDS companyDataSource            = new ECompanyDS();
            tblCompaniesTableAdapter companyAdapter = new tblCompaniesTableAdapter();

            SIAdapter.Fill(siDataSource.tblSalesInvoices, Id);
            SIDetailsAdapter.Fill(siDataSource.tblSalesInvoiceDetails, Id);
            companyAdapter.Fill(companyDataSource.tblCompanies, CompanyId);

            reportViewer.Reset();
            reportViewer.LocalReport.ReportPath = Properties.Settings.Default.ReportPath + "Sales Invoice.rdlc";

            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("SalesInvoice", siDataSource.Tables["tblSalesInvoices"]));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("SalesInvoiceDetails", siDataSource.Tables["tblSalesInvoiceDetails"]));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Company", companyDataSource.Tables["tblCompanies"]));
            reportViewer.RefreshReport();
        }
Ejemplo n.º 5
0
        protected override void RefreshReport()
        {
            base.RefreshReport();

            int CompanyId = int.Parse(Parameters.Find(p => p.Name == "CompanyId").Value);

            ReportParameter[] reportParam = new ReportParameter[1];

            EAgingOfPayablesReportDS    agingDataSource = new EAgingOfPayablesReportDS();
            AgingOfPayablesTableAdapter agingAdapter    = new AgingOfPayablesTableAdapter();
            ECompanyDS companyDataSource            = new ECompanyDS();
            tblCompaniesTableAdapter companyAdapter = new tblCompaniesTableAdapter();

            agingAdapter.Fill(agingDataSource.AgingOfPayables, CompanyId);
            companyAdapter.Fill(companyDataSource.tblCompanies, CompanyId);

            reportViewer.Reset();
            reportViewer.LocalReport.ReportPath = Properties.Settings.Default.ReportPath + "Aging of Payables.rdlc";

            reportParam[0] = new ReportParameter("Date", DateTime.Now.ToString("MM'/'dd'/'yyyy"), false);

            reportViewer.LocalReport.SetParameters(reportParam);

            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("AgingOfPayables", agingDataSource.Tables["AgingOfPayables"]));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Company", companyDataSource.Tables["tblCompanies"]));
            reportViewer.RefreshReport();
        }
Ejemplo n.º 6
0
        protected override void RefreshReport()
        {
            base.RefreshReport();

            int      CompanyId   = int.Parse(Parameters.Find(p => p.Name == "CompanyId").Value);
            DateTime FromDate    = DateTime.Parse(Parameters.Find(p => p.Name == "FromDate").Value);
            DateTime ToDate      = DateTime.Parse(Parameters.Find(p => p.Name == "ToDate").Value);
            String   SubCategory = this.SubCategory;

            ReportParameter[] reportParam = new ReportParameter[4];

            ESystemLogsReportDS            logDataSource = new ESystemLogsReportDS();
            GetSystemLogReportTableAdapter logAdapter    = new GetSystemLogReportTableAdapter();
            ECompanyDS companyDataSource            = new ECompanyDS();
            tblCompaniesTableAdapter companyAdapter = new tblCompaniesTableAdapter();

            logAdapter.Fill(logDataSource.GetSystemLogReport, CompanyId, FromDate, ToDate, SubCategory);
            companyAdapter.Fill(companyDataSource.tblCompanies, CompanyId);

            reportViewer.Reset();
            reportViewer.LocalReport.ReportPath = Properties.Settings.Default.ReportPath + "System Logs.rdlc";

            reportParam[0] = new ReportParameter("FromDate", FromDate.ToString("MM'/'dd'/'yyyy"), false);
            reportParam[1] = new ReportParameter("ToDate", ToDate.ToString("MM'/'dd'/'yyyy"), false);
            reportParam[2] = new ReportParameter("SubCategory", SubCategory + " - System Logs", false);
            reportParam[3] = new ReportParameter("IdentifierHeader", GetIdentifierHeader(), false);

            reportViewer.LocalReport.SetParameters(reportParam);

            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("SystemLogs", logDataSource.Tables["GetSystemLogReport"]));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Company", companyDataSource.Tables["tblCompanies"]));
            reportViewer.RefreshReport();
        }
Ejemplo n.º 7
0
        protected override void RefreshReport()
        {
            base.RefreshReport();

            int      CompanyId = int.Parse(Parameters.Find(p => p.Name == "CompanyId").Value);
            DateTime FromDate  = DateTime.Parse(Parameters.Find(p => p.Name == "FromDate").Value);
            DateTime ToDate    = DateTime.Parse(Parameters.Find(p => p.Name == "ToDate").Value);

            ReportParameter[] reportParam = new ReportParameter[2];

            ESubsidiaryLedgerReportDS       slDataSource            = new ESubsidiaryLedgerReportDS();
            tblSubsidiaryLedgerTableAdapter SubsidiaryLedgerAdapter = new tblSubsidiaryLedgerTableAdapter();
            ECompanyDS companyDataSource            = new ECompanyDS();
            tblCompaniesTableAdapter companyAdapter = new tblCompaniesTableAdapter();

            SubsidiaryLedgerAdapter.Fill(slDataSource.tblSubsidiaryLedger, CompanyId, FromDate, ToDate);
            companyAdapter.Fill(companyDataSource.tblCompanies, CompanyId);

            reportViewer.Reset();
            reportViewer.LocalReport.ReportPath = Properties.Settings.Default.ReportPath + "Subsidiary Ledger.rdlc";

            reportParam[0] = new ReportParameter("FromDate", FromDate.ToString("MM'/'dd'/'yyyy"), false);
            reportParam[1] = new ReportParameter("ToDate", ToDate.ToString("MM'/'dd'/'yyyy"), false);

            reportViewer.LocalReport.SetParameters(reportParam);

            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("SubsidiaryLedger", slDataSource.Tables["tblSubsidiaryLedger"]));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Company", companyDataSource.Tables["tblCompanies"]));
            reportViewer.RefreshReport();
        }
        private void reportViewer_Drillthrough(object sender, DrillthroughEventArgs e)
        {
            int      CompanyId = int.Parse(Parameters.Find(p => p.Name == "CompanyId").Value);
            int      AccountId = 0;
            DateTime FromDate  = DateTime.Parse(Parameters.Find(p => p.Name == "FromDate").Value);
            DateTime ToDate    = DateTime.Parse(Parameters.Find(p => p.Name == "ToDate").Value);

            ReportParameter[] reportParam = new ReportParameter[2];

            EGeneralLedgerDetailsReportDS    jDataSource    = new EGeneralLedgerDetailsReportDS();
            GeneralLedgerDetailsTableAdapter JournalAdapter = new GeneralLedgerDetailsTableAdapter();
            ECompanyDS companyDataSource            = new ECompanyDS();
            tblCompaniesTableAdapter companyAdapter = new tblCompaniesTableAdapter();

            if ((e.Report as LocalReport).GetParameters()["ReportType"].Values[0] == "Per Date")
            {
                FromDate = IDateHandler.Parse((e.Report as LocalReport).GetParameters()["FromDate"].Values[0]);
                ToDate   = IDateHandler.Parse((e.Report as LocalReport).GetParameters()["ToDate"].Values[0]);
            }

            AccountId = int.Parse((e.Report as LocalReport).GetParameters()["AccountId"].Values[0]);
            JournalAdapter.Fill(jDataSource.GeneralLedgerDetails, CompanyId, FromDate, ToDate, AccountId);
            companyAdapter.Fill(companyDataSource.tblCompanies, CompanyId);

            reportParam[0] = new ReportParameter("FromDate", FromDate.ToString("MM'/'dd'/'yyyy"), false);
            reportParam[1] = new ReportParameter("ToDate", ToDate.ToString("MM'/'dd'/'yyyy"), false);

            (e.Report as LocalReport).SetParameters(reportParam);

            (e.Report as LocalReport).DataSources.Add(new ReportDataSource("GeneralLedgerDetails", jDataSource.Tables["GeneralLedgerDetails"]));
            (e.Report as LocalReport).DataSources.Add(new ReportDataSource("Company", companyDataSource.Tables["tblCompanies"]));
        }
        protected override void RefreshReport()
        {
            base.RefreshReport();

            int Id        = int.Parse(Parameters.Find(p => p.Name == "Id").Value);
            int CompanyId = int.Parse(Parameters.Find(p => p.Name == "CompanyId").Value);

            ReportParameter[] reportParam = new ReportParameter[1];

            EJournalPrintoutDS                   journalDataSource     = new EJournalPrintoutDS();
            GetJournalPrintoutTableAdapter       journalAdapter        = new GetJournalPrintoutTableAdapter();
            GetJournalDetailPrintoutTableAdapter journalDetailsAdapter = new GetJournalDetailPrintoutTableAdapter();
            ECompanyDS companyDataSource            = new ECompanyDS();
            tblCompaniesTableAdapter companyAdapter = new tblCompaniesTableAdapter();

            journalAdapter.Fill(journalDataSource.GetJournalPrintout, Id, this.PrintoutHeader);
            journalDetailsAdapter.Fill(journalDataSource.GetJournalDetailPrintout, Id, this.PrintoutHeader);
            companyAdapter.Fill(companyDataSource.tblCompanies, CompanyId);

            reportViewer.Reset();
            reportViewer.LocalReport.ReportPath = Properties.Settings.Default.ReportPath + "Journal Printout.rdlc";

            reportParam[0] = new ReportParameter("Header", SwitchHeader(this.PrintoutHeader), false);

            reportViewer.LocalReport.SetParameters(reportParam);

            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("GetJournalPrintout", journalDataSource.Tables["GetJournalPrintout"]));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("GetJournalDetailPrintout", journalDataSource.Tables["GetJournalDetailPrintout"]));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Company", companyDataSource.Tables["tblCompanies"]));
            reportViewer.RefreshReport();
        }
        protected override void RefreshReport()
        {
            base.RefreshReport();

            int      CompanyId       = int.Parse(Parameters.Find(p => p.Name == "CompanyId").Value);
            DateTime FromDate        = DateTime.Parse(Parameters.Find(p => p.Name == "FromDate").Value);
            DateTime ToDate          = DateTime.Parse(Parameters.Find(p => p.Name == "ToDate").Value);
            bool     ShowZeroBalance = Boolean.Parse(Parameters.Find(p => p.Name == "ShowZeroBalance").Value);

            ReportParameter[] reportParam = new ReportParameter[2];

            ETrialBalanceReportDS    tbDataSource   = new ETrialBalanceReportDS();
            TrialBalanceTableAdapter tbAdapter      = new TrialBalanceTableAdapter();
            ECompanyDS companyDataSource            = new ECompanyDS();
            tblCompaniesTableAdapter companyAdapter = new tblCompaniesTableAdapter();

            tbAdapter.Fill(tbDataSource.TrialBalance, CompanyId, FromDate, ToDate, ShowZeroBalance);
            companyAdapter.Fill(companyDataSource.tblCompanies, CompanyId);

            reportViewer.Reset();
            reportViewer.LocalReport.ReportPath = Properties.Settings.Default.ReportPath + "Trial Balance.rdlc";

            reportParam[0] = new ReportParameter("FromDate", FromDate.ToString("MM'/'dd'/'yyyy"), false);
            reportParam[1] = new ReportParameter("ToDate", ToDate.ToString("MM'/'dd'/'yyyy"), false);

            reportViewer.LocalReport.SetParameters(reportParam);

            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("TrialBalance", tbDataSource.Tables["TrialBalance"]));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("Company", companyDataSource.Tables["tblCompanies"]));
            reportViewer.RefreshReport();
        }
        private void reportViewer_Drillthrough(object sender, DrillthroughEventArgs e)
        {
            int      CompanyId = int.Parse(Parameters.Find(p => p.Name == "CompanyId").Value);
            DateTime FromDate  = DateTime.Parse(Parameters.Find(p => p.Name == "FromDate").Value);
            DateTime ToDate    = DateTime.Parse(Parameters.Find(p => p.Name == "ToDate").Value);

            if (e.ReportPath == "Income Statement Detail Chart")
            {
                ReportParameter[] reportParam = new ReportParameter[2];

                EIncomeStatementChartReportDS isDataSource = new EIncomeStatementChartReportDS();
                IncomeStatementDetailChartReportTableAdapter isDetailAdapter = new IncomeStatementDetailChartReportTableAdapter();
                ECompanyDS companyDataSource            = new ECompanyDS();
                tblCompaniesTableAdapter companyAdapter = new tblCompaniesTableAdapter();

                isDetailAdapter.Fill(isDataSource.IncomeStatementDetailChartReport, CompanyId, FromDate, ToDate);
                companyAdapter.Fill(companyDataSource.tblCompanies, CompanyId);

                reportParam[0] = new ReportParameter("FromDate", FromDate.ToString("MM'/'dd'/'yyyy"), false);
                reportParam[1] = new ReportParameter("ToDate", ToDate.ToString("MM'/'dd'/'yyyy"), false);

                (e.Report as LocalReport).SetParameters(reportParam);

                (e.Report as LocalReport).DataSources.Add(new ReportDataSource("IncomeStatementDetailChartReport", isDataSource.Tables["IncomeStatementDetailChartReport"]));
                (e.Report as LocalReport).DataSources.Add(new ReportDataSource("Company", companyDataSource.Tables["tblCompanies"]));
            }
            else if (e.ReportPath == "Balance Sheet Detail Chart")
            {
                ReportParameter[] reportParam = new ReportParameter[1];

                EBalanceSheetChartReport bsDataSource = new EBalanceSheetChartReport();
                BalanceSheetDetailChartReportTableAdapter bsDetailAdapter = new BalanceSheetDetailChartReportTableAdapter();
                ECompanyDS companyDataSource            = new ECompanyDS();
                tblCompaniesTableAdapter companyAdapter = new tblCompaniesTableAdapter();

                bsDetailAdapter.Fill(bsDataSource.BalanceSheetDetailChartReport, CompanyId, ToDate);
                companyAdapter.Fill(companyDataSource.tblCompanies, CompanyId);

                reportParam[0] = new ReportParameter("AsOfDate", ToDate.ToString("MM'/'dd'/'yyyy"), false);

                (e.Report as LocalReport).SetParameters(reportParam);

                (e.Report as LocalReport).DataSources.Add(new ReportDataSource("BalanceSheetDetailChartReport", bsDataSource.Tables["BalanceSheetDetailChartReport"]));
                (e.Report as LocalReport).DataSources.Add(new ReportDataSource("Company", companyDataSource.Tables["tblCompanies"]));
            }
        }