# Open URL on an specific browser **Category:** [Epicor ERP 10](https://www.epiusers.help/c/e10/5) **Created:** 2016-10-13 18:10 UTC **Views:** 8740 **Replies:** 20 **URL:** https://www.epiusers.help/t/open-url-on-an-specific-browser/35809 --- ## Post #1 by @Alex Hello guys I develop the customization below to be able to open ssrs reports inside epicor but i need that opens with IE browser does anyone can advice how to do it here is my code // ************************************************** // Custom code for UD01Form // Created: 10/09/2014 12:49:22 PM // ************************************************** // // Customization: EII_SSRS_GeneralLedger // Description: Runs General Ledger SSRS report. Based on customization // developed by Cre8tive Tech. // Author: RBeaghan // // History: // 2014-10-09 RLB -Initial C# version converted from CR8_SSRS_GeneralLedger. // // ************************************************** using System; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Windows.Forms; using Ice.Lib; using Erp.BO; using Ice.BO; using Ice.UI; using Ice.Adapters; using Erp.Adapters; using Ice.Lib.Customization; using Ice.Lib.ExtendedProps; using Ice.UI.FormFunctions; using Ice.Lib.Framework; using Ice.Lib.Searches; using System.Reflection; using Ice.Core; public class Script { // ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! ** // Begin Wizard Added Module Level Variables ** // End Wizard Added Module Level Variables ** // 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 If you are using the WebBrowser control from .NET that is already IE.... If you want to Launch it outside of Epicor and or a Custom Control then you can use processes exec as shown ```cs Process.Start("iexplore.exe","http://myurl.com"); ``` --- ## Post #3 by @josecgomez You could also look into embeding a ReportViewer control which is made specifically to render SSRS Reports. https://msdn.microsoft.com/en-us/library/ms251671.aspx --- ## Post #4 by @Alex thank you --- ## Post #5 by @nhutchins It might not apply, but I've used the following to open SSRS report with MES Buttons. ​Process.Start("iexplore.exe", "SSRS REPORT URL");​ > > Thanks, Norman Hutchins System Administrator Howell Laboratories, Inc. --- ## Post #6 by @Manasa You can also do this through the menu structure in Epicor itself as a menu item….just through worth mentioning….may not apply here…. M. Manasa Reddy P: 703.471.7145 x454 manasa@euclidsys.com --- ## Post #7 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 #8 by @josecgomez Hi Alex That is likely because the version of the IE Explorer engine that the WebBrowser control uses is old. Version 7 I believe... you are going to have to use a different control and set the configuration of your WebBrowser control to use a more recent version of the IE Engine. https://blogs.msdn.microsoft.com/patricka/2015/01/12/controlling-webbrowser-control-compatibility/ --- ## Post #9 by @Alex i have the last version IE 11 and also when i open the report outside of epicor directly with IE i dont have that error i just get the eror when i open it inside epicor. and my default browser is IE --- ## Post #10 by @josecgomez Right, is because by default the Embeded Browser control is set to use the IE7 engine (read the link I sent) --- ## Post #11 by @josecgomez Your best bet here is to use the ReportViewer control which is built specifically to render SSRS Reports as I pointed out before. The web browser control is clumsy at best and will require a lot of tweaking to make it work https://epiusers.help/t/open-url-on-an-specific-browser/35809/3?u=josecgomez.trigemco --- ## Post #12 by @prakash another thing to consider. create a dashboard as "New URL/XSLT View". --- ## Post #13 by @Edge Yes that is a little used function. You can reference the attachments linked to things in a dashboard like PDFs and have them display using that function. We showed this the accounts team at one customer and they liked reviewing the scanned in Logged AP invoices. --- ## Post #14 by @Alex Prakash when i try to deploy the URL Dashboard i get the error showed below. Have you run on this error? --- ## Post #15 by @prakash Hi Alex, We are in Epicor 10.1.400.8. All works fine in our system. can you test it by entering url as www.google.com or www.epicor.com. whats your Epicor version? FYI: you can dynamically change the url applying tokens in the "Query Phrase Subscribers". the right click context menu does not work. still ctrl+c works. [quote="Alex, post:14, topic:35809"] showed [/quote] --- ## Post #16 by @Alex thanks for your replay i got that error because i put "[ssrs]" at the end of the dashboard name --- ## Post #17 by @Alex Guys after create the dashboard i kept getting the script error in order to fix it you need to install UR03 for SQL and that solve the script problem --- ## Post #18 by @Epicorus I don't suppose there is any way to tell it to use a browser that is NOT IE? We were investigating embedding some web pages into a customization but they are all totally broken in IE (for instance, extensive use of ES6 features). --- ## Post #19 by @Mark_Wonsil [Here's how to get rid of Internet Explorer - CNET](https://www.cnet.com/how-to/heres-how-to-get-rid-of-internet-explorer/) [Microsoft will bid farewell to Internet Explorer and legacy Edge in 2021 - The Verge](https://www.theverge.com/2020/8/17/21372487/microsoft-internet-explorer-11-support-end-365-legacy-edge) --- ## Post #20 by @josecgomez You want to check out CEF Sharp Is basically embedded Chrome Works great! And you can put it on all your customizations pretty easily https://www.epiusers.help/t/cef-to-load-documents-on-order-entry-screen/67387/2?u=josecgomez --- ## Post #21 by @Epicorus Thanks Jose! Is it possible to pass the Epicor session back and forth between the web page? In our current prototype (which is outside of Epicor) we are calling the API directly from the page, which results in the user having to log in via the simple auth user/password prompt of the browser using their Epicor user name and password. Instead we would like to use the existing credentials of the user in the Epicor client. And conversely, can we open an Epicor screen from the embedded web browser? For instance, if someone right clicks on an Invoice number in the web page we want to give them the choice to open the invoice in AR Invoice Entry in the Epicor client, like you can do in the client itself. --- **Canonical:** https://www.epiusers.help/t/open-url-on-an-specific-browser/35809 **Original content:** https://www.epiusers.help/t/open-url-on-an-specific-browser/35809