Hi Team
Trying to do something similar as above but getting errors. Any help would be much appreciate. This is the first time we have attempting any custom code
using (var svcBAQRpt = WCFServiceSupport.CreateImpl<Ice.Proxy.Rpt.BAQReportImpl> (otSession, Epicor.ServiceModel.Channels.ImplBase<Ice.Contracts.BAQReportSvcContract>.UriPath))
{
// GET DEFAULT REPORT PARAMETERS
var dsBAQReport = svcBAQRpt.GetNewParameters();
dsBAQReport.Tables["BAQReportParam"].Rows[0]["BAQRptID"] = "TankLabelPrint";
dsBAQReport.Tables["BAQReportParam"].Rows[0]["ReportID"] = "TankLabelPrint";
dsBAQReport.Tables["BAQReportParam"].Rows[0]["BAQID"] = "TankLabelPrint";
dsBAQReport.Tables["BAQReportParam"].Rows[0]["AutoAction"] = "SSRSPREVIEW";
dsBAQReport.Tables["BAQReportParam"].Rows[0]["AgentID"] = agentID;
dsBAQReport.Tables["BAQReportParam"].Rows[0]["ReportStyleNum"] = 1;
dsBAQReport.Tables["BAQReportParam"].Rows[0]["WorkstationID"] = workStation;
dsBAQReport.Tables["BAQReportParam"].Rows[0]["SSRSRenderFormat"] = "PDF";
dsBAQReport.Tables["BAQReportParam"].Rows[0]["TaskNote"] = string.Format("JPK", 2);
var rptDs = dynamicReport.GetByID(“TankLabelPrint”);
var baqRptDS = baqR.GetNewBAQReportParam(“TankLabelPrint”);
baqRptDS.BAQReportParam[0].Option01 = guid.ToString();
baqRptDS.BAQReportParam[0].AutoAction=“SSRSGenerate”;
baqRptDS.BAQReportParam[0].SSRSRenderFormat = “PDF”;
baqRptDS.BAQReportParam[0].Character01=guid.ToString();
baqRptDS.BAQReportParam[0].Character02=flag;
baqRptDS.BAQReportParam[0].BAQRptID=“TankLabelPrint”;
baqRptDS.BAQReportParam[0].ReportID=“TankLabelPrint”;
baqRptDS.BAQReportParam[0].Summary = false;
baqRptDS.BAQReportParam[0].ReportStyleNum = 1002;
baqRptDS.BAQReportParam[0].BAQID=“TankLabelPrint”;
baqRptDS.BAQReportParam[0].ReportTitle = “TankLabelPrint”;
baqRptDS.BAQReportParam[0].TaskNote = guid.ToString();
rptDs.BAQRptOptionFld[0].FieldValue = guid.ToString();
rptDs.AcceptChanges();
StringWriter writer = new StringWriter();
rptDs.WriteXml(writer);
baqRptDS.BAQReportParam[0].Filter1 = writer.ToString();
svcBAQRpt.SubmitToAgent(dsBAQReport, agentID, 0, 0, "Epicor.Mfg.UIRpt.TankLabelPrint");
MessageBox.Show("Report Submitted to System Agent");
}
Here is the error message I am getting:
Server Side Exception
There is at least one compilation error.
Exception caught in: Epicor.ServiceModel
Error Detail
Description: There is at least one compilation error.
Details:
Error CS0103: The name ‘WCFServiceSupport’ does not exist in the current context [PostTran.TankLabelPaint.cs(115,36)]
Error CS0234: The type or namespace name ‘Rpt’ does not exist in the namespace ‘Ice.Proxy’ (are you missing an assembly reference?) [PostTran.TankLabelPaint.cs(115,75)]
Error CS0103: The name ‘otSession’ does not exist in the current context [PostTran.TankLabelPaint.cs(115,95)]
Error CS0234: The type or namespace name ‘BAQReportSvcContract’ does not exist in the namespace ‘Ice.Contracts’ (are you missing an assembly reference?) [PostTran.TankLabelPaint.cs(115,158)]
Error CS0103: The name ‘agentID’ does not exist in the current context [PostTran.TankLabelPaint.cs(125,62)]
Error CS0103: The name ‘workStation’ does not exist in the current context [PostTran.TankLabelPaint.cs(127,68)]
Error CS0103: The name ‘dynamicReport’ does not exist in the current context [PostTran.TankLabelPaint.cs(131,13)]
Error CS0103: The name ‘baqR’ does not exist in the current context [PostTran.TankLabelPaint.cs(132,18)]
Error CS0103: The name ‘guid’ does not exist in the current context [PostTran.TankLabelPaint.cs(133,41)]
Error CS0103: The name ‘guid’ does not exist in the current context [PostTran.TankLabelPaint.cs(136,42)]
Error CS0103: The name ‘flag’ does not exist in the current context [PostTran.TankLabelPaint.cs(137,42)]
Error CS0103: The name ‘guid’ does not exist in the current context [PostTran.TankLabelPaint.cs(144,41)]
Error CS0103: The name ‘guid’ does not exist in the current context [PostTran.TankLabelPaint.cs(145,41)]
Error CS0246: The type or namespace name ‘StringWriter’ could not be found (are you missing a using directive or an assembly reference?) [PostTran.TankLabelPaint.cs(148,3)]
Error CS0246: The type or namespace name ‘StringWriter’ could not be found (are you missing a using directive or an assembly reference?) [PostTran.TankLabelPaint.cs(148,29)]
Error CS0103: The name ‘agentID’ does not exist in the current context [PostTran.TankLabelPaint.cs(153,41)]
Error CS0103: The name ‘MessageBox’ does not exist in the current context [PostTran.TankLabelPaint.cs(155,4)]
Program: Epicor.Customization.dll
Method: PrepareException
Line Number: 99
Column Number: 13
Server Trace Stack: at Epicor.Customization.Standard.CustomizationCompiler.PrepareException(CompilerErrorCollection errors) in c:_Releases\ICE\3.1.400.33\Source\Framework\Epicor.Customization\Standard\CustomizationCompiler.cs:line 99
at Epicor.Customization.Standard.CustomizationCompiler.Compile(BuildEnvironment input, String outputAssembly) in c:_Releases\ICE\3.1.400.33\Source\Framework\Epicor.Customization\Standard\CustomizationCompiler.cs:line 29
at Epicor.Customization.Standard.CustomizationBuilder.Process(CustomizationProject project) in c:_Releases\ICE\3.1.400.33\Source\Framework\Epicor.Customization\Standard\CustomizationBuilder.cs:line 78
at Ice.Services.BO.BpMethodSvc.AfterUpdate() in c:_Releases\ICE\3.1.400.33\Source\Server\Services\BO\BpMethod\BpMethod.Events.cs:line 85
at Ice.Services.Trace.TablesetProfilingCollector.DoTablesetEventTrace(String tablesetName, String methodName, Action action) in c:_Releases\ICE\3.1.400.33\Source\Framework\Epicor.Ice\Services\TablesetProfilingCollector.cs:line 200
at Ice.TablesetBound3.InnerUpdate(IceDataContext dataContext, TFullTableset tableset) in c:\_Releases\ICE\3.1.400.33\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 813 at Ice.Services.BO.BpMethodSvc.Update(BpMethodTableset& ds) in c:\_Releases\ICE\3.1.400.33\Source\Server\Services\BO\BpMethod\BpMethod.Designer.cs:line 835 at Ice.Services.BO.BpMethodSvcFacade.Update(BpMethodTableset& ds) in c:\_Releases\ICE\3.1.400.33\Source\Server\Services\BO\BpMethod\BpMethodSvcFacade.cs:line 224 at SyncInvokeUpdate(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func
2 func) in c:_Releases\ICE\3.1.400.33\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func2 func) in c:\_Releases\ICE\3.1.400.33\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28 at Epicor.Hosting.Wcf.EpiOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) in c:\_Releases\ICE\3.1.400.33\Source\Framework\Epicor.System\Hosting\Wcf\EpiOperationInvoker.cs:line 23 at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext) at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext) at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result) at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result) at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously) at System.ServiceModel.Channels.SecurityChannelListener
1.ReceiveItemAndVerifySecurityAsyncResult`2.InnerTryReceiveCompletedCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceiveAsyncResult.OnReceive(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.SynchronizedMessageSource.ReceiveAsyncResult.OnReceiveComplete(Object state)
at System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.Security.NegotiateStream.ProcessFrameBody(Int32 readBytes, Byte buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.NegotiateStream.ReadCallback(AsyncProtocolRequest asyncRequest)
at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result)
at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionStream.IOAsyncResult.OnAsyncIOComplete(Object state)
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)
at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
Client Stack Trace
at Epicor.ServiceModel.Channels.ImplBase1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets) at Ice.Proxy.BO.BpMethodImpl.Update(BpMethodDataSet ds) at Ice.Adapters.BpMethodAdapter.OnUpdate() at Ice.Lib.Framework.EpiBaseAdapter.Update() at Ice.UI.App.BpTriggerEntry.Transactions.MainTransaction.adapterUpdate() at Ice.Lib.Framework.EpiMultiViewTransaction.Update(IEnumerable
1 dataSets)