private void AddKessanShikinUchiwakeReportSub(DataDynamics.ActiveReports.ActiveReport report, views.reports.ShikinSyuushiKessanUchiwakeEngine engine, models.query.ShikinSyuushiUchiwake uchiwake, int startCol, int endCol)
        {
            engine.SetDB(Context.KaikeiDatabase);

            int rootKaikeiKubunId = Context.KaikeiDatabase.MTKaikeiKubun.RootNodeId;

            models.db.Row rootRow   = Context.KaikeiDatabase.MTKaikeiKubun.GetRowFromCache(rootKaikeiKubunId);
            string        houjinMei = rootRow.GetStr("name");
            string        title     = "【拠点区分資金収支明細書】";
            string        youshiki  = "別紙3(⑩)";

            if (form.KaikeiKubun == 1)
            {
                title    = "【資金収支内訳表】";
                youshiki = "第一号第二様式";
            }
            else if (form.KaikeiKubun == 2)
            {
                title    = "【事業区分資金収支内訳表】";
                youshiki = "第一号第三様式";
            }
            engine.SetHeader(form.StartDate.Value, form.EndDate.Value, houjinMei, uchiwake.GetColCaptions(startCol, endCol), title, youshiki);
            engine.SetFooter(
                uchiwake.GetSummaryRow(models.query.ShikinSyuushi.SummaryItem.ToukiShikin, startCol, endCol),
                uchiwake.GetSummaryRow(models.query.ShikinSyuushi.SummaryItem.ZenkiZandaka, startCol, endCol),
                uchiwake.GetSummaryRow(models.query.ShikinSyuushi.SummaryItem.ToukiZandaka, startCol, endCol));

            var source = uchiwake.GetRows(startCol, endCol);

            report.DataSource = source;
            report.Run();
        }
        private void AddKessanJigyouUchiwakeReportSub(DataDynamics.ActiveReports.ActiveReport report, views.reports.JigyouSyuushiUchiwakeEngine engine, models.query.JigyouKatsudouUchiwake uchiwake, int startCol, int endCol)
        {
            engine.SetDB(Context.KaikeiDatabase);

            int rootKaikeiKubunId = Context.KaikeiDatabase.MTKaikeiKubun.RootNodeId;

            models.db.Row rootRow   = Context.KaikeiDatabase.MTKaikeiKubun.GetRowFromCache(rootKaikeiKubunId);
            string        houjinMei = rootRow.GetStr("name");
            string        title     = "拠点区分事業活動明細書";
            string        youshiki  = "別紙3(⑪)";

            if (form.KaikeiKubun == 1)
            {
                title    = "事業活動内訳表";
                youshiki = "第二号第二様式";
            }
            else if (form.KaikeiKubun == 2)
            {
                title    = "事業区分事業活動内訳表";
                youshiki = "第二号第三様式";
            }
            engine.SetHeader(form.StartDate.Value, form.EndDate.Value, houjinMei, uchiwake.GetColCaptions(startCol, endCol), title, youshiki);
            engine.SetFooter(
                uchiwake.GetSummaryRow(models.query.JigyouKatsudou.SummaryItem.ToukiKatsudouZougenSagaku, startCol, endCol),
                uchiwake.GetSummaryRow(models.query.JigyouKatsudou.SummaryItem.ZenkiKurikoshiZougenSagaku, startCol, endCol),
                uchiwake.GetSummaryRow(models.query.JigyouKatsudou.SummaryItem.ToukimatsuKurikoshiKatsudouZougenSagaku, startCol, endCol),
                uchiwake.GetSummaryRow(models.query.JigyouKatsudou.SummaryItem.KihonkinTorikuzushiGaku, startCol, endCol),
                uchiwake.GetSummaryRow(models.query.JigyouKatsudou.SummaryItem.SonotaTsumitateTorikuzushiGaku, startCol, endCol),
                uchiwake.GetSummaryRow(models.query.JigyouKatsudou.SummaryItem.SonotaTsumitateGaku, startCol, endCol),
                uchiwake.GetSummaryRow(models.query.JigyouKatsudou.SummaryItem.JikiKurikoshiKatsudouZougenSagaku, startCol, endCol)
                );

            var source = uchiwake.GetRows(startCol, endCol);

            report.DataSource = source;
            report.Run();
        }
Пример #3
0
        private void launchReport()
        {
            if (_progressCancelled)
            {
                return;
            }
            if (VWA4Common.GlobalSettings.PrintViewReportsProgressCancelled)
            {
                return;
            }
            try
            {
                // Init Report Input Parameters
                UserControls.ReportParameters repParams = ucLowParticipationParameters1.ReportParameters;

                switch (ReportType)
                {
                case "Budget to Actual Comparison":
                    m_rptMainReport = new rptFinancials(repParams, ReportType);
                    break;

                case "Close-Up View":
                    m_rptMainReport = new rptDetails(repParams);
                    break;

                case "Configuration":
                    m_rptMainReport = new rptConfiguration(repParams);
                    break;

                case "Comparison":
                    m_rptMainReport = new rptComparision(repParams);
                    break;

                case "Comparison: Site Details":
                    m_rptMainReport = new rptComparisonSiteDetails(repParams);
                    break;

                case "Detail":
                    m_rptMainReport = new rptCrossTab(repParams);
                    break;

                case "Employee":
                    m_rptMainReport = new rptEmployee(repParams);
                    m_rptMainReport.Run();
                    if (bool.Parse(repParams["ShowEmployeeSub"].ParamValue))
                    {
                        m_rptSubReport = new rptEmployeeException(repParams);
                        m_rptSubReport.Run();
                        m_rptMainReport.Document.Pages.AddRange(m_rptSubReport.Document.Pages);
                    }
                    break;

                case "Employee Recognition":
                    m_rptMainReport = new rptEmployeeRecognition(repParams);
                    break;

                case "Event Orders":
                    m_rptMainReport = new rptEvent(repParams);
                    break;

                case "Financial Summary":
                    m_rptMainReport = new rptFinancials(repParams, ReportType);
                    break;

                case "Form":
                    m_rptMainReport = new rptFormSeries();
                    break;

                case "Goal List by Completion Percent":
                    m_rptMainReport = new rptGoalListbyCompletion(repParams);
                    break;

                case "Goal History":
                    m_rptMainReport = new rptGoalHistory(repParams);
                    break;

                case "Goal List":
                    m_rptMainReport = new rptGoalList(repParams);
                    break;

                case "Goal Weekly Status":
                    m_rptMainReport = new rptGoalWeeklyStatus(repParams);
                    break;

                case "Goal Progress":
                    m_rptMainReport = new rptGoalProgress(repParams);
                    break;

                case "Low Participation":
                    m_rptMainReport = new rptLowParticipation(repParams);
                    break;

                case "Produced Items":
                    m_rptMainReport = new rptProducedItem(repParams);
                    break;

                case "Staff Mtg. Agenda":
                    m_rptMainReport = new rptPreShiftMeetingForm(repParams);
                    break;

                case "SWAT Agenda":
                    m_rptMainReport = new rptSWATForm(repParams);
                    break;

                case "SWAT Notes":
                    m_rptMainReport = new rptSWATNotes(repParams);
                    break;

                case "Tabular":
                    m_rptMainReport = new rptTabular(repParams);
                    break;

                case "Tracker Comparison":
                    m_rptMainReport = new rptTrackerComparison(repParams);
                    break;

                case "Transactions by Employee":
                    m_rptMainReport = new rptEmployeeTransactions(repParams);
                    break;

                case "Transfers":
                    m_rptMainReport = new rptTransfers(repParams);
                    break;

                case "Trend":
                    m_rptMainReport = new rptARTrend(repParams);
                    break;

                case "Waste Avoidance":
                    m_rptMainReport = new rptWasteAvoidance(repParams);
                    break;

                case "Weekly Tabular":
                    m_rptMainReport = new rptWeeklyTabular(repParams);
                    break;

                case "YOY Comparison":
                    m_rptMainReport = new rptFinancials(repParams, ReportType);
                    break;

                default:
                    MessageBox.Show(this, "Error in launchReport: Unknown report type", "ProjectError",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                    break;
                }
                if (ReportType != "Employee")
                {
                    m_rptMainReport.Run();
                }
                if (m_rptBanchReport == null)
                {
                    m_rptBanchReport = new DataDynamics.ActiveReports.ActiveReport();
                }
                m_rptBanchReport.Document.Pages.AddRange(m_rptMainReport.Document.Pages);
            }
            catch (Exception ex)
            {
                MessageBox.Show(this, "Error in launchReport: " + ex.Message, "ProjectError",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #4
0
        private void frmViewReport_Load(object sender, EventArgs e)
        {
            Viewer.Toolbar.Images.Images.Add("myIcon", new Bitmap(Digitalizacion2014.Properties.Resources.IconPdf));
            int myIcon = Viewer.Toolbar.Images.Images.IndexOfKey("myIcon");

            DataDynamics.ActiveReports.Toolbar.Button PDFButton = new DataDynamics.ActiveReports.Toolbar.Button();
            PDFButton.Caption = "PDF";

            PDFButton.ButtonStyle = DataDynamics.ActiveReports.Toolbar.ButtonStyle.TextAndIcon;
            PDFButton.Id          = 42;
            PDFButton.ImageIndex  = myIcon;
            this.Viewer.Toolbar.Tools.Add(PDFButton);

            Viewer.Toolbar.Images.Images.Add("myIcon", new Bitmap(Digitalizacion2014.Properties.Resources.IconXLS));
            myIcon = Viewer.Toolbar.Images.Images.IndexOfKey("myIcon") + 1;

            DataDynamics.ActiveReports.Toolbar.Button EXCELButton = new DataDynamics.ActiveReports.Toolbar.Button();
            EXCELButton.Caption = "Excel";

            EXCELButton.ButtonStyle = DataDynamics.ActiveReports.Toolbar.ButtonStyle.TextAndIcon;
            EXCELButton.Id          = 43;
            EXCELButton.ImageIndex  = myIcon;
            this.Viewer.Toolbar.Tools.Add(EXCELButton);

            //Cambiar apariencia de Botones

            Viewer.Toolbar.Tools[0].ToolTip  = "Tabla de Contenido";
            Viewer.Toolbar.Tools[0].Visible  = false;
            Viewer.Toolbar.Tools[2].Caption  = "Imprimir";
            Viewer.Toolbar.Tools[2].ToolTip  = "Imprimir";
            Viewer.Toolbar.Tools[4].ToolTip  = "Copiar";
            Viewer.Toolbar.Tools[6].ToolTip  = "Buscar";
            Viewer.Toolbar.Tools[8].ToolTip  = "Página";
            Viewer.Toolbar.Tools[9].ToolTip  = "Multiples páginas";
            Viewer.Toolbar.Tools[12].ToolTip = "Alejar";
            Viewer.Toolbar.Tools[13].ToolTip = "Acercar";
            Viewer.Toolbar.Tools[14].ToolTip = "Valor de acercamiento";
            Viewer.Toolbar.Tools[16].ToolTip = "Página anterior";
            Viewer.Toolbar.Tools[17].ToolTip = "Página siguiente";
            Viewer.Toolbar.Tools[18].ToolTip = "Páginas";
            Viewer.Toolbar.Tools[20].ToolTip = "Regresar";
            Viewer.Toolbar.Tools[20].Caption = "Regresar";
            Viewer.Toolbar.Tools[21].ToolTip = "Avanzar";
            Viewer.Toolbar.Tools[21].Caption = "Avanzar";
            Viewer.Toolbar.Tools[23].ToolTip = "Anotaciones";
            Viewer.Toolbar.Tools[24].ToolTip = "Exportar a PDF";
            Viewer.Toolbar.Tools[25].ToolTip = "Exportar a EXCEL";

            if (idReporte == null)
            {
                return;
            }

            //Cargar el Reporte
            Datos = Acceso.ivkProcedimiento(R_procedimiento, R_validar, R_parametros, Clases.vGlobales.conexion, null);
            if (!Datos.bOk)
            {
                MessageBox.Show("Problemas al cargar el reporte");
                return;
            }

            this.Text = Datos.ds.Tables[0].Rows[0]["CNombre"].ToString();

            byte[] rpxByte = Convert.FromBase64String(Datos.ds.Tables[0].Rows[0]["archivoRPX"].ToString());
            System.IO.MemoryStream rpxStream = new System.IO.MemoryStream(rpxByte);

            DataDynamics.ActiveReports.ActiveReport reporte = new DataDynamics.ActiveReports.ActiveReport();
            //reporte.AddAssembly(System.Reflection.Assembly.Load("System.Drawing.dll"));
            reporte.LoadLayout(rpxStream);

            //Cargar Datos
            Datos = Acceso.ivkProcedimiento(D_procedimiento, D_validar, D_parametros, Clases.vGlobales.conexion, null);
            if (!Datos.bOk)
            {
                MessageBox.Show("Problemas al cargar los datos");
                return;
            }

            reporte.DataSource = Datos.ds.Tables[0];

            Viewer.Document = reporte.Document;
            reporte.Run();
        }