# Script error when opening ssrs report inside epicor with customization **Category:** [Epicor ERP 10](https://www.epiusers.help/c/e10/5) **Created:** 2016-10-14 12:18 UTC **Views:** 1557 **Replies:** 0 **URL:** https://www.epiusers.help/t/script-error-when-opening-ssrs-report-inside-epicor-with-customization/35813 --- ## Post #1 by @Alex Hello guys i am having an error when i run the ssrs report inside the system with my customization i have narrow down the problem and i know the problem is the report server the viewer file but i have no idea how to fix it bellow i will add my code and the error screen. // Add Custom Module Level Variables Here ** WebBrowser webBrowser1; public void InitializeCustomCode() { // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines ** // Begin Wizard Added Variable Initialization // End Wizard Added Variable Initialization // Begin Wizard Added Custom Method Calls // End Wizard Added Custom Method Calls string strRptURL = string.Empty; // RLB: set form title UD01Form.Text = "Material Yield"; webBrowser1 = new WebBrowser(); webBrowser1.Dock = DockStyle.Fill; UD01Form.Controls.Add(webBrowser1); strRptURL = GetSSRSBaseURL() + "/Pages/ReportViewer.aspx?%2fCustom%2fOperational%2fMaterial+Yield&rs:Command=Render"; // webBrowser1.Navigate(new Uri(strRptURL)); // Hide the EpiTreeViewPanel Ice.Lib.Framework.EpiTreeViewPanel tree; object obj1 = typeof(Ice.UI.App.UD01Entry.UD01Form).InvokeMember("epiTreeViewPanel1", BindingFlags.Instance | BindingFlags.GetField | BindingFlags.NonPublic, null, UD01Form, null); tree = (Ice.Lib.Framework.EpiTreeViewPanel)obj1; tree.Visible = false; // Hide the panels (Detail and List) object obj2 = typeof(Ice.UI.App.UD01Entry.UD01Form).InvokeMember("baseDockManager", BindingFlags.Instance | BindingFlags.GetField | BindingFlags.NonPublic, null, UD01Form, null); Infragistics.Win.UltraWinDock.UltraDockManager dock = (Infragistics.Win.UltraWinDock.UltraDockManager)obj2; // dock.DockAreas.RemoveAt(0); dock.HideAll(); } private string GetSSRSBaseURL() { // Declare and Initialize EpiDataView Variables // Create instance of Adapter? oTrans Erp.Adapters.CompanyAdapter adapterCompany = new Erp.Adapters.CompanyAdapter(this.oTrans); adapterCompany.BOConnect(); // Declare and Initialize Variables string strBaseURL = string.Empty; string strCompany = ((Session)oTrans.Session).CompanyID; // Call Adapter method bool result = adapterCompany.GetByID(strCompany); if (result) { strBaseURL = adapterCompany.CompanyData.Company.Rows[0]["Character01"].ToString(); } // Clean-up Adapter Reference adapterCompany.Dispose(); adapterCompany = null; // MessageBox.Show(strBaseURL); return strBaseURL; } public void DestroyCustomCode() { // ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines ** // Begin Wizard Added Object Disposal // End Wizard Added Object Disposal // Begin Custom Code Disposal // End Custom Code Disposal } } --- ## Post #2 by @josecgomez A post was merged into an existing topic: [Open URL on an specific browser](/t/open-url-on-an-specific-browser/35809) --- ## Post #3 by @josecgomez --- **Canonical:** https://www.epiusers.help/t/script-error-when-opening-ssrs-report-inside-epicor-with-customization/35813 **Original content:** https://www.epiusers.help/t/script-error-when-opening-ssrs-report-inside-epicor-with-customization/35813