public void RelatorioAcompanhamentoResumido()
        {
            DRFormAguarde.ExecuteFormWait("Gerando Relatório", "Acompanhamento Resumido");

            using (DataSet1 ds = ServerDR.GetAcompanhamentoResumido(DRProjetoContext.DRProjeto.CodProjeto, checkBox1.Checked))
            {
                if (ds.DRACOMPRESUMIDO.Rows.Count == 0)
                {
                    DRFormAguarde.FormAguarde.FinalizaAguarde();
                    MessageBox.Show("Não foi encontrado nenhuma informação!");
                    return;
                }

                DataRow rowEmp = ServerDR.GetInfoEmpresa();

                string caminho;


                #region Dados p/ Gráfico

                //Somatório do percentual de completude das atividades
                decimal totPercentualComp = Convert.ToDecimal(ds.DRACOMPRESUMIDO.Compute("SUM(PERCENTUALCOMPLETUDE)", "ETAPA = 0"));
                int     totalAtividades   = Convert.ToInt32(ds.DRACOMPRESUMIDO.Compute("COUNT(CODIGO)", "ETAPA = 0"));
                decimal percent           = totPercentualComp / totalAtividades;
                DataRow row = ds.GraficoPizza.NewRow();
                row["Item"]       = "Executado";
                row["Percentual"] = percent;
                ds.GraficoPizza.Rows.Add(row);

                DataRow rowRestante = ds.GraficoPizza.NewRow();
                rowRestante["Item"]       = "Restante";
                rowRestante["Percentual"] = 100 - percent;
                ds.GraficoPizza.Rows.Add(rowRestante);
                #endregion

                DRFormAguarde.FormAguarde.FinalizaAguarde();

                DRRelatorisClass.LoadLogoRel(rowEmp, out caminho);
                string titulo = "Relatório - Percentual de Completude da Etapa/Atividade";
                using (DRViewRel rel = new DRViewRel())
                {
                    Microsoft.Reporting.WinForms.ReportParameter[] parametros =
                    {
                        new Microsoft.Reporting.WinForms.ReportParameter("P_OBRA",      "Obra: " + DRProjetoContext.DRProjeto.NomeProjeto),
                        new Microsoft.Reporting.WinForms.ReportParameter("ImageLogo",   caminho),
                        new Microsoft.Reporting.WinForms.ReportParameter("Endereco",    DRRelatorisClass.GetEndereco(rowEmp)),
                        new Microsoft.Reporting.WinForms.ReportParameter("NomeEmpresa", rowEmp["NOME"].ToString()),
                        new Microsoft.Reporting.WinForms.ReportParameter("TITULO",      titulo),
                        new Microsoft.Reporting.WinForms.ReportParameter("Observacao",  txtObs.Text)
                    };
                    rel.AddDataSource("DataSet1_GraficoPizza", ds.GraficoPizza);
                    rel.ExecuteRel(ds.DRACOMPRESUMIDO, "DataSet1_DRACOMPRESUMIDO", "DRRelAcompanhamentoResumido.rdlc", parametros);
                }
                DRRelatorisClass.DeleteImageLogo();
            }
        }
Example #2
0
        public void RelatorioDespesasNaoClassificada()
        {
            if (_dataIni != null && _dataFim != null)
            {
            }
            else
            if (_dataIni != null || _dataFim != null)
            {
                MessageBox.Show("Favor informar a data inicial e final");
                return;
            }

            DRFormAguarde.ExecuteFormWait("Gerando Relatório", "Despesas Não Classificadas ");


            ds = ServerDR.GetDespesasNaoClassificadas(DRProjetoContext.DRProjeto.CodProjeto, _dataIni, _dataFim);

            if (ds.DRDESPESANAOCLASSIFICADA.Rows.Count == 0)
            {
                DRFormAguarde.FormAguarde.FinalizaAguarde();
                MessageBox.Show("Não foi encontrado nenhuma informação!");
                return;
            }

            DataRow rowEmp = ServerDR.GetInfoEmpresa();

            string caminho;

            DRRelatorisClass.LoadLogoRel(rowEmp, out caminho);

            string titulo = "Relatório de Despesas Não Classificada";

            if (_dataIni != null && _dataFim != null)
            {
                titulo = string.Format("Relatório de Despesas Não Classificada - Período de {0} á {1}", Convert.ToDateTime(_dataIni).ToShortDateString(),
                                       Convert.ToDateTime(_dataFim).ToShortDateString());
            }
            DRFormAguarde.FormAguarde.FinalizaAguarde();

            using (DRViewRel rel = new DRViewRel())
            {
                Microsoft.Reporting.WinForms.ReportParameter[] parametros =
                {
                    new Microsoft.Reporting.WinForms.ReportParameter("P_OBRA",      "Obra: " + DRProjetoContext.DRProjeto.NomeProjeto),
                    new Microsoft.Reporting.WinForms.ReportParameter("ImageLogo",   caminho),
                    new Microsoft.Reporting.WinForms.ReportParameter("Endereco",    DRRelatorisClass.GetEndereco(rowEmp)),
                    new Microsoft.Reporting.WinForms.ReportParameter("NomeEmpresa", rowEmp["NOME"].ToString()),
                    new Microsoft.Reporting.WinForms.ReportParameter("TITULO",      titulo)
                };
                rel.ExecuteRel(ds.DRDESPESANAOCLASSIFICADA, "DSRel_II_DRDESPESANAOCLASSIFICADA", "DRRelDespesa_NaoClassificada.rdlc", parametros);

                DRRelatorisClass.DeleteImageLogo();
            }
            ds.Dispose();
        }
        public void RelatorioAcompanhamento()
        {
            DRFormAguarde.ExecuteFormWait("Gerando Relatório", "Acompanhamento ");

            using (DataSet1 ds = ServerDR.GetAcompanhamentoPeriodo(DRProjetoContext.DRProjeto.CodProjeto, dtini, dtfim, checkBox1.Checked))
            {
                if (ds.DRACOMPANHAMENTO.Rows.Count == 0)
                {
                    DRFormAguarde.FormAguarde.FinalizaAguarde();
                    MessageBox.Show("Não foi encontrado nenhuma informação!");
                    return;
                }

                DataRow rowEmp = ServerDR.GetInfoEmpresa();
                string  caminho;
                DRRelatorisClass.LoadLogoRel(rowEmp, out caminho);
                string titulo = GetTitulo();



                decimal totPrevisto;
                decimal totDespesaAnterior;
                decimal totDespesaAtual;

                ServerDR.GetTotalizadores(DRProjetoContext.DRProjeto.CodProjeto, dtini, dtfim,
                                          out totPrevisto, out totDespesaAnterior, out totDespesaAtual);

                decimal totDespesa = totDespesaAnterior + totDespesaAtual;

                DRFormAguarde.FormAguarde.FinalizaAguarde();

                using (DRViewRel rel = new DRViewRel())
                {
                    Microsoft.Reporting.WinForms.ReportParameter[] parametros =
                    {
                        new Microsoft.Reporting.WinForms.ReportParameter("P_OBRA",             "Obra: " + DRProjetoContext.DRProjeto.NomeProjeto),
                        new Microsoft.Reporting.WinForms.ReportParameter("ImageLogo",          caminho),
                        new Microsoft.Reporting.WinForms.ReportParameter("Endereco",           DRRelatorisClass.GetEndereco(rowEmp)),
                        new Microsoft.Reporting.WinForms.ReportParameter("NomeEmpresa",        rowEmp["NOME"].ToString()),
                        new Microsoft.Reporting.WinForms.ReportParameter("TITULO",             titulo),
                        new Microsoft.Reporting.WinForms.ReportParameter("TotalDespesa",       totDespesa.ToString()),
                        new Microsoft.Reporting.WinForms.ReportParameter("TotalPrevisto",      totPrevisto.ToString()),
                        new Microsoft.Reporting.WinForms.ReportParameter("TotDespesaAtual",    totDespesaAtual.ToString()),
                        new Microsoft.Reporting.WinForms.ReportParameter("TotDespesaAnterior", totDespesaAnterior.ToString()),
                        new Microsoft.Reporting.WinForms.ReportParameter("Observacao",         txtObs.Text)
                    };
                    rel.ExecuteRel(ds.DRACOMPANHAMENTO, "DataSet1_DRACOMPANHAMENTO", "DRRelAcompanhamento.rdlc", parametros);
                }
                DRRelatorisClass.DeleteImageLogo();
            }
        }
Example #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            DSRel_II ds;

            DRFormAguarde.ExecuteFormWait("Gerando Relatório", "Extrato Pagamento Investidor");
            if (drConsInvestidor.GetValueCampo("CODINVESTIDOR") != null)
            {
                ds = ServerDR.GetExtratoPagamento(DRProjetoContext.DRProjeto.CodProjeto,
                                                  Convert.ToInt32(drConsInvestidor.GetValueCampo("CODINVESTIDOR")));
            }
            else
            {
                ds = ServerDR.GetExtratoPagamento(DRProjetoContext.DRProjeto.CodProjeto, null);
            }

            if (ds.DREXTRATOPAG.Rows.Count == 0)
            {
                DRFormAguarde.FormAguarde.FinalizaAguarde();
                MessageBox.Show("Não foi encontrado nenhuma informação!");
                return;
            }

            DataRow rowEmp = ServerDR.GetInfoEmpresa();

            string caminho;

            DRRelatorisClass.LoadLogoRel(rowEmp, out caminho);

            string titulo = "Extrato de Pagamento Investidor";

            DRFormAguarde.FormAguarde.FinalizaAguarde();

            using (DRViewRel rel = new DRViewRel())
            {
                Microsoft.Reporting.WinForms.ReportParameter[] parametros =
                {
                    new Microsoft.Reporting.WinForms.ReportParameter("P_OBRA",      "Obra:" + DRProjetoContext.DRProjeto.NomeProjeto),
                    new Microsoft.Reporting.WinForms.ReportParameter("ImageLogo",   caminho),
                    new Microsoft.Reporting.WinForms.ReportParameter("Endereco",    DRRelatorisClass.GetEndereco(rowEmp)),
                    new Microsoft.Reporting.WinForms.ReportParameter("NomeEmpresa", rowEmp["NOME"].ToString()),
                    new Microsoft.Reporting.WinForms.ReportParameter("TITULO",      titulo),
                };

                rel.ExecuteRel(ds.DREXTRATOPAG, "DSRel_II_DREXTRATOPAG", "DRRelExtratoPagInvestidor.rdlc", parametros);

                DRRelatorisClass.DeleteImageLogo();
            }
            ds.Dispose();
        }
        public void RelatorioAcompanhamento()
        {
            //if (ServerDR.ExisteDespesasNaoClassificadas(DRProjetoContext.DRProjeto.CodProjeto, null,null))
            //{
            //    MessageBox.Show(Resources.SMensagemValidacaoDespNaoClassificada2, "Informação Importante", MessageBoxButtons.OK, MessageBoxIcon.Warning);

            //}

            DRFormAguarde.ExecuteFormWait("Gerando Relatório", "Acompanhamento Entradas X Despesa/Saldo");

            using (DataSet1 ds = ServerDR.MontaPagamentoMensal(DRProjetoContext.DRProjeto.CodProjeto, Ano))
            {
                if (ds.DRACOMPINVESTIDOR.Rows.Count == 0)
                {
                    DRFormAguarde.FormAguarde.FinalizaAguarde();
                    MessageBox.Show("Não foi encontrado nenhuma informação!");
                    return;
                }

                DataRow rowEmp = ServerDR.GetInfoEmpresa();

                string caminho;
                DRRelatorisClass.LoadLogoRel(rowEmp, out caminho);
                string titulo = GetTitulo();

                DRFormAguarde.FormAguarde.FinalizaAguarde();

                using (DRViewRel rel = new DRViewRel())
                {
                    Microsoft.Reporting.WinForms.ReportParameter[] parametros =
                    {
                        new Microsoft.Reporting.WinForms.ReportParameter("P_OBRA",      "Obra: " + DRProjetoContext.DRProjeto.NomeProjeto),
                        new Microsoft.Reporting.WinForms.ReportParameter("ImageLogo",   caminho),
                        new Microsoft.Reporting.WinForms.ReportParameter("Endereco",    DRRelatorisClass.GetEndereco(rowEmp)),
                        new Microsoft.Reporting.WinForms.ReportParameter("NomeEmpresa", rowEmp["NOME"].ToString()),
                        new Microsoft.Reporting.WinForms.ReportParameter("TITULO",      titulo),
                        new Microsoft.Reporting.WinForms.ReportParameter("Ano",         Ano.ToString()),
                        new Microsoft.Reporting.WinForms.ReportParameter("Observacao",  txtObs.Text),
                    };
                    rel.AddDataSource("DataSet1_DRENTRADA_DESPESA",
                                      ServerDR.GetEntrada_X_Despesa(DRProjetoContext.DRProjeto.CodProjeto,
                                                                    Ano));
                    rel.ExecuteRel(ds.DRACOMPINVESTIDOR, "DataSet1_DRACOMPINVESTIDOR", "DRRelAcompanhamentoInvest.rdlc", parametros);
                }
                DRRelatorisClass.DeleteImageLogo();
            }
        }
Example #6
0
        public static void RelatorioCota()
        {
            DRFormAguarde.ExecuteFormWait("Gerando Relatório", "Cotas");

            DRRelServer serverRel = new DRRelServer();

            serverRel.Initializa(DRContex.Sistema.StringConexao);
            using (DSRel_II ds = serverRel.GetCotas(DRProjetoContext.DRProjeto.CodProjeto))
            {
                if (ds.DRRELCOTAS.Rows.Count == 0)
                {
                    DRFormAguarde.FormAguarde.FinalizaAguarde();
                    MessageBox.Show("Não foi encontrado nenhuma informação!");
                    return;
                }

                DataRow rowEmp = serverRel.GetInfoEmpresa();

                string caminho;
                LoadLogoRel(rowEmp, out caminho);


                using (DRViewRel rel = new DRViewRel())
                {
                    Microsoft.Reporting.WinForms.ReportParameter[] parametros =
                    {
                        new Microsoft.Reporting.WinForms.ReportParameter("P_OBRA",            "Obra: " + DRProjetoContext.DRProjeto.NomeProjeto),
                        new Microsoft.Reporting.WinForms.ReportParameter("ImageLogo",         caminho),
                        new Microsoft.Reporting.WinForms.ReportParameter("Endereco",          DRRelatorisClass.GetEndereco(rowEmp)),
                        new Microsoft.Reporting.WinForms.ReportParameter("NomeEmpresa",       rowEmp["NOME"].ToString()),
                        new Microsoft.Reporting.WinForms.ReportParameter("TITULO",            "Relatório de Cotas"),
                        new Microsoft.Reporting.WinForms.ReportParameter("TotalPrevistoCota", serverRel.GetValorTotalPrevistoCota(DRProjetoContext.DRProjeto.CodProjeto).ToString())
                    };

                    DRFormAguarde.FormAguarde.FinalizaAguarde();

                    //rel.AddDataSource("DataSet1_DREMPRESA", ds.DREMPRESA);
                    rel.ExecuteRel(ds.DRRELCOTAS, "DSRel_II_DRRELCOTAS", "DRRelCotas.rdlc", parametros);
                }
                DeleteImageLogo();
            }
        }
Example #7
0
        public void RelatorioDespesaPorAtividade()
        {
            if (_dataIni != null && _dataFim != null)
            {
            }
            else
            if (_dataIni != null || _dataFim != null)
            {
                MessageBox.Show("Favor informar a data inicial e final");
                return;
            }

            if (ServerDR.ExisteDespesasNaoClassificadas(DRProjetoContext.DRProjeto.CodProjeto, _dataIni, _dataFim))
            {
                MessageBox.Show(Resources.SMensagemValidacaoDespNaoClassificada, "Informação Importante", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }

            DRFormAguarde.ExecuteFormWait("Gerando Relatório", "Acompanhamento de Despesa");

            if (ckFiltraEtapa.Checked)
            {
                ds = ServerDR.GetEtapa_Atividade_RelDespesa(DRProjetoContext.DRProjeto.CodProjeto, drSelecAtividade_Etapa1.GetEtapasSelecionadas(), "E",
                                                            _dataIni, _dataFim);
            }
            else
            if (ckFiltraAtividade.Checked)
            {
                ds = ServerDR.GetEtapa_Atividade_RelDespesa(DRProjetoContext.DRProjeto.CodProjeto, drSelecAtividade_Etapa1.GetAtividadesSelecionadas(), "A",
                                                            _dataIni, _dataFim);
            }
            else
            {
                ds = ServerDR.GetEtapa_Atividade_RelDespesa(DRProjetoContext.DRProjeto.CodProjeto, new DataTable(), string.Empty,
                                                            _dataIni, _dataFim);
            }

            if (ds.DRETAPA_ATIVIDADE.Rows.Count == 0)
            {
                DRFormAguarde.FormAguarde.FinalizaAguarde();
                MessageBox.Show("Não foi encontrado nenhuma informação!");
                return;
            }

            DataRow rowEmp            = ServerDR.GetInfoEmpresa();
            string  valorTotalDespesa = ds.DRDESPESA.Compute("Sum(Valor)", string.Empty).ToString();

            string caminho;

            DRRelatorisClass.LoadLogoRel(rowEmp, out caminho);

            string titulo = "Relatório de Despesa - Etapa/Atividade";

            if (_dataIni != null && _dataFim != null)
            {
                titulo = string.Format("Relatório de Despesa - Etapa/Atividade - Período de {0} á {1}", Convert.ToDateTime(_dataIni).ToShortDateString(),
                                       Convert.ToDateTime(_dataFim).ToShortDateString());
            }
            DRFormAguarde.FormAguarde.FinalizaAguarde();

            using (DRViewRel rel = new DRViewRel())
            {
                Microsoft.Reporting.WinForms.ReportParameter[] parametros =
                {
                    new Microsoft.Reporting.WinForms.ReportParameter("P_OBRA",       "Obra: " + DRProjetoContext.DRProjeto.NomeProjeto),
                    new Microsoft.Reporting.WinForms.ReportParameter("ImageLogo",    caminho),
                    new Microsoft.Reporting.WinForms.ReportParameter("Endereco",     DRRelatorisClass.GetEndereco(rowEmp)),
                    new Microsoft.Reporting.WinForms.ReportParameter("NomeEmpresa",  rowEmp["NOME"].ToString()),
                    new Microsoft.Reporting.WinForms.ReportParameter("TITULO",       titulo),
                    new Microsoft.Reporting.WinForms.ReportParameter("TotalDespesa", valorTotalDespesa)
                };
                rel.ExecuteRel(ds.DRETAPA_ATIVIDADE, "DSRel_II_DRETAPA_ATIVIDADE", "DRRelEtapaAtividade.rdlc", parametros,
                               new SubreportProcessingEventHandler(ProcessaSubRelatorioDespesa));


                DRRelatorisClass.DeleteImageLogo();
            }
            ds.Dispose();
        }
Example #8
0
        public void RelatorioPatrimonio()
        {
            DSRel_II ds;

            DateTime?_dataIni = null;

            if (dtIni.DataInformada())
            {
                _dataIni = dtIni.GetDate();
            }

            DateTime?_dataFim = null;

            if (dtFim.DataInformada())
            {
                _dataFim = dtFim.GetDate();
            }



            DRFormAguarde.ExecuteFormWait("Gerando Relatório", "Patrimônios");
            ds = ServerDR.GetPatrimonios(_dataIni, _dataFim, DRProjetoContext.DRProjeto.CodProjeto);

            if (ds.DRPATRIMONIO.Rows.Count == 0)
            {
                DRFormAguarde.FormAguarde.FinalizaAguarde();
                MessageBox.Show("Não foi encontrado nenhuma informação!");
                return;
            }

            DataRow rowEmp = ServerDR.GetInfoEmpresa();

            string caminho;

            DRRelatorisClass.LoadLogoRel(rowEmp, out caminho);

            string titulo = "Relatório de Patrimônio";

            if (_dataIni != null && _dataFim != null)
            {
                titulo = string.Format("Relatório de Patrimônio - Período de {0} á {1}", Convert.ToDateTime(_dataIni).ToShortDateString(),
                                       Convert.ToDateTime(_dataFim).ToShortDateString());
            }
            DRFormAguarde.FormAguarde.FinalizaAguarde();

            using (DRViewRel rel = new DRViewRel())
            {
                Microsoft.Reporting.WinForms.ReportParameter[] parametros =
                {
                    new Microsoft.Reporting.WinForms.ReportParameter("P_OBRA",      "Obra:" + DRProjetoContext.DRProjeto.NomeProjeto),
                    new Microsoft.Reporting.WinForms.ReportParameter("ImageLogo",   caminho),
                    new Microsoft.Reporting.WinForms.ReportParameter("Endereco",    DRRelatorisClass.GetEndereco(rowEmp)),
                    new Microsoft.Reporting.WinForms.ReportParameter("NomeEmpresa", rowEmp["NOME"].ToString()),
                    new Microsoft.Reporting.WinForms.ReportParameter("TITULO",      titulo),
                };

                rel.ExecuteRel(ds.DRPATRIMONIO, "DSRel_II_DRPATRIMONIO", "DRRelPatrimonio.rdlc", parametros);



                DRRelatorisClass.DeleteImageLogo();
            }
            ds.Dispose();
        }