コード例 #1
0
        private void active_mov_balancestock()
        {
            try
            {
                var path = string.Empty;
                var directorios = Application.StartupPath.Split('\\');
                if (directorios.Length > 0)
                {
                    path = directorios[0] + "\\" + directorios[1];
                }

                var reporteRollokardex = new CR_mov_balancestock();

                reporteRollokardex.DataDefinition.FormulaFields["empresaruc"].Text = "': " + VariablesPublicas.EmpresaRuc.Trim() + "'";
                reporteRollokardex.DataDefinition.FormulaFields["empresaname"].Text = "': " + VariablesPublicas.EmpresaName.Trim() + "'";
                reporteRollokardex.DataDefinition.FormulaFields["empresaestable"].Text = "': " + localname.ToString() + "'";
                reporteRollokardex.DataDefinition.FormulaFields["empresatipo"].Text = "': " + moduloname.ToString() + "'";
                reporteRollokardex.DataDefinition.FormulaFields["empresaperiodo"].Text = "': " + VariablesPublicas.N_PrimerMes1.Trim() + " " + Peranio + "'";
                if (VariablesPublicas.N_FinMes1 == string.Empty)
                {
                    reporteRollokardex.DataDefinition.FormulaFields["mesperifin"].Text = string.Empty;
                }
                else
                {
                    reporteRollokardex.DataDefinition.FormulaFields["mesperifin"].Text = "'-   " + VariablesPublicas.N_FinMes1.Trim() + " " + Peranio + "'";
                }
                reporteRollokardex.DataDefinition.FormulaFields["fechaimpresion"].Text = "' " + VariablesPublicas.FechImpresion + "'";
                reporteRollokardex.SetDataSource(Movimiento_mov_balancestock());
                crystalReportViewer1.ReportSource = reporteRollokardex;
                crystalReportViewer1.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     CR_mov_balancestock rpt = new CR_mov_balancestock();
     rpt.Site = this.Site;
     return rpt;
 }