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
}
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
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
}
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.
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
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
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.
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.
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).