Script error when opening ssrs report inside epicor with customization

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;
	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, 
	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 |
	Infragistics.Win.UltraWinDock.UltraDockManager dock = (Infragistics.Win.UltraWinDock.UltraDockManager)obj2;
	// dock.DockAreas.RemoveAt(0);

private string GetSSRSBaseURL() 
	// Declare and Initialize EpiDataView Variables 
	// Create instance of Adapter? oTrans 
	Erp.Adapters.CompanyAdapter adapterCompany = new Erp.Adapters.CompanyAdapter(this.oTrans); 
	// 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 = 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


A post was merged into an existing topic: Open URL on an specific browser