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

                if (moduloid.Trim().ToString() == "0100" && moduloid.Trim().ToString() == "0500")
                {
                    reporteRollokardex.DataDefinition.FormulaFields["name"].Text = "'TIENDA : " + VariablesPublicas.Local + "  - " + VariablesPublicas.nombrelocal + "'";
                }
                else
                {
                    reporteRollokardex.DataDefinition.FormulaFields["name"].Text = "'LOCAL : " + local + "  - " + localname + "'";
                }
                reporteRollokardex.SetDataSource(Movimiento_productostock(false));
                CrsRptMain.ReportSource = reporteRollokardex;
                CrsRptMain.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }