public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     CR_tomainventario rpt = new CR_tomainventario();
     rpt.Site = this.Site;
     return rpt;
 }
        private void active_tomainventario()
        {
            try
            {
                var path = string.Empty;
                var directorios = Application.StartupPath.Split('\\');
                if (directorios.Length > 0)
                {
                    path = directorios[0] + "\\" + directorios[1];
                }
                var reporteRollokardex = new CR_tomainventario();
                reporteRollokardex.DataDefinition.FormulaFields["empresaname"].Text = "'EMPRESA: " + VariablesPublicas.EmpresaName.Trim() + "'";
                reporteRollokardex.DataDefinition.FormulaFields["empresaruc"].Text = "'RUC: " + VariablesPublicas.EmpresaRuc.Trim() + "'";

                reporteRollokardex.SetDataSource(Lista_tomainventario());
                crystalReportViewer1.ReportSource = reporteRollokardex;
                crystalReportViewer1.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }