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

                reporteRollokardex.DataDefinition.FormulaFields["empresaname"].Text = "'EMPRESA: " + VariablesPublicas.EmpresaName.Trim() + "'";
                reporteRollokardex.DataDefinition.FormulaFields["empresaruc"].Text = "'RUC: " + VariablesPublicas.EmpresaRuc.Trim() + "'";
                reporteRollokardex.DataDefinition.FormulaFields["almacen"].Text = "'" + moduloname + "'";

                reporteRollokardex.SetDataSource(Lista_DiferenciaInv());
                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()
 {
     var rpt = new CR_diferencia_inv();
     rpt.Site = Site;
     return rpt;
 }