Trying to Create a new BAQ Report Style

I created a BAQ Report style and I am getting an error message when i tried to print it.

Program Ice.Services.Lib.RunTask raised an unexpected exception with the following message: RunTask:
System.ArgumentNullException: Value cannot be null.
Parameter name: key

  • at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)*
  • at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)*
  • at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)*
  • at Epicor.Utilities.DictionaryExtensions.GetOrAdd[TKey,TValue](IDictionary2 dictionary, TKey key, Func2 valueFactory) in C:_Releases\ICE\UD10.2.500.40FW\Source\Shared\Framework\Epicor.ServiceModel\Utilities\DictionaryExtensions.cs:line 24*
  • at Ice.Core.RptBase.ReportDataBuilderBase.XMLDumpTable(IRow row, String rptTableId) in C:_Releases\ICE\UD10.2.500.40FW\Source\Server\Internal\Lib\TaskLib\RptBase\ReportDataBuilderBase.cs:line 335*
  • at Erp.Internal.SR.PackingSlipPrint.doShipDtl() in C:_Releases\ERP\UD10.2.500.40\Source\Server\Internal\SR\PackingSlipPrint\PackingSlipPrint.cs:line 2077*
  • at Erp.Internal.SR.PackingSlipPrint.RunProcess(Int64 Instance_TaskNum, String OutputFile) in C:_Releases\ERP\UD10.2.500.40\Source\Server\Internal\SR\PackingSlipPrint\PackingSlipPrint.cs:line 1044*
  • at Ice.Core.TaskBase`1.StartProcess(Int64 instanceTaskNum, String outputFileName) in C:_Releases\ICE\UD10.2.500.40FW\Source\Server\Internal\Lib\TaskLib\TaskBase\TaskBase.cs:line 83*
  • at Ice.Hosting.TaskCaller.InnerExecuteTask(IceDataContext newContext) in C:_Releases\ICE\UD10.2.500.40FW\Source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 117*
  • at Ice.Hosting.TaskCaller.ExecuteTask() in C:_Releases\ICE\UD10.2.500.40FW\Source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 59*
  • at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in C:_Releases\ICE\RL10.2.500.0FW\Source\Server\Services\Lib\RunTask\BpmFriendlyTaskLauncher.cs:line 63*
  • at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:_Releases\ICE\RL10.2.500.0FW\Source\Server\Services\Lib\RunTask\RunTask.cs:line 452*

    Here is how i set up the report data definitions.
    image
    Here is how i set up the report style. I am guessing i missed a step somewhere. I did try to set up parameters and it also failed so i removed them. We are running 10.2.500.70

Your source BAQ cannot have parameters.

1 Like

It does not.

Let’s see that query if you can.

1 Like


select **
** [ShipHead].[ShipDate] as [ShipHead_ShipDate],

** [ShipHead].[PackNum] as [ShipHead_PackNum],**
** [ShipTo].[INVATNumber] as [ShipTo_INVATNumber],**
** [ShipHead].[TotalDiscount] as [ShipHead_TotalDiscount],**
** [ShipHead].[OrderAmt] as [ShipHead_OrderAmt],**
** [ShipHead].[ShipToNum] as [ShipHead_ShipToNum],**
** [ShipHead].[CustNum] as [ShipHead_CustNum],**
** [ShipHead].[Plant] as [ShipHead_Plant],**
** [ShipHead].[BTCustNum] as [ShipHead_BTCustNum],**
** [ShipHead].[BTConNum] as [ShipHead_BTConNum],**
** [ShipHead].[NotifyEMail] as [ShipHead_NotifyEMail],**
** [ShipHead].[CertOfOrigin] as [ShipHead_CertOfOrigin],**
** [ShipHead].[HazardousShipment] as [ShipHead_HazardousShipment],**
** [ShipHead].[IntrntlShip] as [ShipHead_IntrntlShip],**
** [ShipHead].[CurrencyCode] as [ShipHead_CurrencyCode],**
** [ShipHead].[TotalWHTax] as [ShipHead_TotalWHTax],**
** [ShipHead].[DocTotalWHTax] as [ShipHead_DocTotalWHTax],**
** [ShipHead].[TotalSATax] as [ShipHead_TotalSATax],**
** [ShipHead].[DocTotalSATax] as [ShipHead_DocTotalSATax],**
** [ShipHead].[TotalTax] as [ShipHead_TotalTax],**
** [ShipHead].[DocTotalTax] as [ShipHead_DocTotalTax],**
** [ShipHead].[DocTotalDiscount] as [ShipHead_DocTotalDiscount],**
** [ShipHead].[ShipToCustNum] as [ShipHead_ShipToCustNum],**
** [ShipTo].[CustNum] as [ShipTo_CustNum],**
** [ShipTo].[ShipToNum] as [ShipTo_ShipToNum],**
** [ShipTo].[Name] as [ShipTo_Name],**
** [ShipTo].[Address1] as [ShipTo_Address1],**
** [ShipTo].[Address2] as [ShipTo_Address2],**
** [ShipTo].[Address3] as [ShipTo_Address3],**
** [ShipTo].[City] as [ShipTo_City],**
** [ShipTo].[State] as [ShipTo_State],**
** [ShipTo].[ZIP] as [ShipTo_ZIP],**
** [ShipTo].[Country] as [ShipTo_Country],**
** [ShipTo].[SalesRepCode] as [ShipTo_SalesRepCode],**
** [ShipTo].[TerritoryID] as [ShipTo_TerritoryID],**
** [ShipTo].[ShipViaCode] as [ShipTo_ShipViaCode],**
** [ShipTo].[FaxNum] as [ShipTo_FaxNum],**
** [ShipTo].[PhoneNum] as [ShipTo_PhoneNum],**
** [ShipTo].[EMailAddress] as [ShipTo_EMailAddress],**
** [ShipTo].[TerritorySelect] as [ShipTo_TerritorySelect],**
** [ShipTo].[ChrgAmount] as [ShipTo_ChrgAmount],**
** [ShipTo].[NotifyEMail] as [ShipTo_NotifyEMail],**
** [ShipTo].[DeclaredIns] as [ShipTo_DeclaredIns],**
** [ShipTo].[DeclaredAmt] as [ShipTo_DeclaredAmt],**
** [Customer].[Company] as [Customer_Company],**
** [Customer].[CustID] as [Customer_CustID],**
** [Customer].[CustNum] as [Customer_CustNum],**
** [Customer].[Name] as [Customer_Name],**
** [Customer].[Address1] as [Customer_Address1],**
** [Customer].[Address2] as [Customer_Address2],**
** [Customer].[Address3] as [Customer_Address3],**
** [Customer].[City] as [Customer_City],**
** [Customer].[State] as [Customer_State],**
** [Customer].[Zip] as [Customer_Zip],**
** [Customer].[Country] as [Customer_Country],**
** [Customer].[SalesRepCode] as [Customer_SalesRepCode],**
** [Customer].[TerritoryID] as [Customer_TerritoryID],**
** [Customer].[ShipToNum] as [Customer_ShipToNum],**
** [Customer].[ShipViaCode] as [Customer_ShipViaCode],**
** [Customer].[PhoneNum] as [Customer_PhoneNum],**
** [Customer].[CurrencyCode] as [Customer_CurrencyCode],**
** [Customer].[CountryNum] as [Customer_CountryNum],**
** [Customer].[BTName] as [Customer_BTName],**
** [Customer].[BTAddress1] as [Customer_BTAddress1],**
** [Customer].[BTAddress2] as [Customer_BTAddress2],**
** [Customer].[BTAddress3] as [Customer_BTAddress3],**
** [Customer].[BTCity] as [Customer_BTCity],**
** [Customer].[BTState] as [Customer_BTState],**
** [Customer].[BTZip] as [Customer_BTZip],**
** [Customer].[BTCountryNum] as [Customer_BTCountryNum],**
** [Customer].[BTCountry] as [Customer_BTCountry],**
** [Customer].[BTPhoneNum] as [Customer_BTPhoneNum],**
** [Customer].[ParentCustNum] as [Customer_ParentCustNum],**
** [Customer].[EMailAddress] as [Customer_EMailAddress],**
** [Company].[Company] as [Company_Company],**
** [Company].[Name] as [Company_Name],**
** [Company].[Address1] as [Company_Address1],**
** [Company].[Address2] as [Company_Address2],**
** [Company].[Address3] as [Company_Address3],**
** [Company].[City] as [Company_City],**
** [Company].[State] as [Company_State],**
** [Company].[Zip] as [Company_Zip],**
** [Company].[Country] as [Company_Country],**
** [Company].[PhoneNum] as [Company_PhoneNum],**
** [Company].[CountryNum] as [Company_CountryNum],**
** [Company].[LegalName] as [Company_LegalName],**
** [ShipDtl].[PackLine] as [ShipDtl_PackLine],**
** [ShipDtl].[PartNum] as [ShipDtl_PartNum],**
** [ShipDtl].[LineDesc] as [ShipDtl_LineDesc],**
** [ShipDtl].[WarehouseCode] as [ShipDtl_WarehouseCode],**
** [OrderHed].[OrderNum] as [OrderHed_OrderNum],**
** [Part].[NetWeight] as [Part_NetWeight],**
** [Part].[GrossWeight] as [Part_GrossWeight],**
** [PartCOO].[OrigCountry] as [PartCOO_OrigCountry],**
** [ShipDtl].[UnitPrice] as [ShipDtl_UnitPrice],**
** [ShipDtl].[SellingInventoryShipQty] as [ShipDtl_SellingInventoryShipQty],**
** [ShipDtl].[SellingJobShipQty] as [ShipDtl_SellingJobShipQty],**
** (ShipDtl.SellingInventoryShipQty + ShipDtl.SellingJobShipQty) as [Calculated_TotalShipQty],**
** [Country].[Description] as [Country_Description],**
** [SalesRep].[Name] as [SalesRep_Name],**
** [Part].[CommodityCode] as [Part_CommodityCode],**
** [ShipDtl].[ExtPrice] as [ShipDtl_ExtPrice]**
from Erp.ShipHead as ShipHead
inner join Erp.ShipTo as ShipTo on **
** ShipHead.Company = ShipTo.Company

** and ShipHead.CustNum = ShipTo.CustNum**
** and ShipHead.ShipToNum = ShipTo.ShipToNum**
inner join Erp.Customer as Customer on **
** ShipTo.Company = Customer.Company

** and ShipTo.CustNum = Customer.CustNum**
left outer join Erp.SalesRep as SalesRep on **
** SalesRep.Company = Customer.Company

** and SalesRep.SalesRepCode = Customer.SalesRepCode**
inner join Erp.Company as Company on **
** ShipHead.Company = Company.Company

inner join Erp.ShipDtl as ShipDtl on **
** ShipHead.Company = ShipDtl.Company

** and ShipHead.PackNum = ShipDtl.PackNum**
inner join Erp.Part as Part on **
** ShipDtl.Company = Part.Company

** and ShipDtl.PartNum = Part.PartNum**
inner join Erp.PartCOO as PartCOO on **
** Part.Company = PartCOO.Company

** and Part.PartNum = PartCOO.PartNum**
inner join Erp.Country as Country on **
** PartCOO.Company = Country.Company

** and PartCOO.OrigCountry = Country.CountryNum**
left outer join Erp.OrderDtl as OrderDtl on **
** ShipDtl.Company = OrderDtl.Company

** and ShipDtl.OrderNum = OrderDtl.OrderNum**
** and ShipDtl.OrderLine = OrderDtl.OrderLine**
inner join Erp.OrderHed as OrderHed on **
** ShipHead.Company = OrderHed.Company

** and ShipHead.OTSOrderNum = OrderHed.OrderNum**emphasized text

Not sure which one is more helpful.

Yeah, I don’t see much going on in the BAQ either. Does your BAQ return an expected set of records if you run it in the editor? What do you have in place to filter the results?

1 Like

You did not mention anything about the rdl you are using for the report.

1 Like

yes it works perfect, but I thought since i would be running it from the Customer Shipment Entry Screen it would auto filter on the PackNum. I did try to go through the steps of doing a parameter and filter on the PackNum. That worked great except i was never able to pass the PackNum along. So i removed it all thinking there was some backend logic that would take over. That is not the case.

I am using the PackSlip report sytle and I let the system create me a base SSRS report style. (if that is what you are asking)

You cannot just create an SSRS Report and drop it in to another report style. You should take the existing PackSlip and duplicate it, then edit the rdl to do what you want. Did the PackSlip RDD not have the data you needed?

1 Like

It does not that is why I thought I would make a new one. I seen a thread on here that walked through most of the set up.

What information was missing in the RDD? A lot of data is accessible in the RDD if you copy it to a new one.

1 Like

The SSRS guy (not me) needed some extra stuff like country of origin and our company specific information because we ship stuff over seas. the information was coming up blank, then i built him the BAQ and he was getting all the information that he needed.

I would have your SSRS guy look at the PackSlip rdl to see what parameters are on it and have him create the same parameters in the new rdl.

1 Like

I will take a look and see. When I say SSRS guy he is brand new to SSRS. I have a little more experience then him but not much. I will update you soon. Thank you for the guidance.

I just looked it up and they are not doing it through a BAQ.

also no parameters are being passed that i see.

You won’t see the rdl parameters passed in the RDD. You will only see them in the rdl.

image

1 Like

I think most of the system reports are based off of tables and not BAQs. I could be wrong though. I don’t think epicor would give us access to the base queries that they are using for their reports.

1 Like

Only if you have the SDK.

1 Like

Latest update we went back to base and copied that. I added PartCOO did we relationship it auto populated the joins on Company and PartNum. Well it is giving me this error when i try to print the report.

Program Ice.Services.Lib.RunTask raised an unexpected exception with the following message: RunTask:
System.InvalidOperationException: The column PartCOO.Company used by the ‘PartToPartCOO’ relationship is missing. Include the column or remove the relationship.

  • at Ice.Core.RptBase.DataSourceRelationship.BuildColumnKeyCollection(String relationshipName, IDataSource dataSource, IEnumerable`1 columnNames) in C:_Releases\ICE\UD10.2.500.40FW\Source\Server\Internal\Lib\TaskLib\RptBase\DataSourceRelationship.cs:line 152*
  • at Ice.Core.RptBase.DataSourceRelationship…ctor(RptRelation rptRelation, IEnumerable1 rptRelationFields, DataSourceCollection dataSources, IEnumerable1 whereItems) in C:_Releases\ICE\UD10.2.500.40FW\Source\Server\Internal\Lib\TaskLib\RptBase\DataSourceRelationship.cs:line 33*
  • at Ice.Core.RptBase.ReportDefinitionLoader.<>c__DisplayClass11_0.b__0(RptRelation rptRelation) in C:_Releases\ICE\UD10.2.500.40FW\Source\Server\Internal\Lib\TaskLib\RptBase\ReportDefinitionLoader.cs:line 190*
  • at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()*
  • at System.Linq.Buffer1..ctor(IEnumerable1 source)*
  • at System.Linq.OrderedEnumerable`1.d__1.MoveNext()*
  • at System.Linq.Buffer1..ctor(IEnumerable1 source)*
  • at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)*
  • at Ice.Core.RptBase.ReportDefinitionLoader.LoadReport(CachedTables cachedTables, SqlTableSchemaCache sqlTableSchemaCache, Func2 getBaqInformation, IElectronicInterfaceReportingExtender eiReportingExtender, IEnumerable1 extensionTables, String reportParameterTableSystemCode, String reportParameterTableId, String languageFromReportParameter, String languageFromSession, Guid reportInstanceId) in C:_Releases\ICE\UD10.2.500.40FW\Source\Server\Internal\Lib\TaskLib\RptBase\ReportDefinitionLoader.cs:line 59*
  • at Ice.Core.RptBase.ReportDefinitionLoader.LoadReport(IRptTask1 rptTask, CachedTables cachedTables, SqlTableSchemaCache sqlTableSchemaCache, IEnumerable1 extensionTables, Func`2 getBaqInformation, IElectronicInterfaceReportingExtender eiReportingExtender, Guid reportInstanceId) in C:_Releases\ICE\UD10.2.500.40FW\Source\Server\Internal\Lib\TaskLib\RptBase\ReportDefinitionLoader.cs:line 24*
  • at Ice.Core.RptTaskBase`1.XMLOpen(String fileName) in C:_Releases\ICE\UD10.2.500.40FW\Source\Server\Internal\Lib\TaskLib\RptBase\RptTaskBase.cs:line 289*
  • at Erp.Internal.SR.PackingSlipPrint.RunProcess(Int64 Instance_TaskNum, String OutputFile) in C:_Releases\ERP\UD10.2.500.40\Source\Server\Internal\SR\PackingSlipPrint\PackingSlipPrint.cs:line 876*
  • at Ice.Core.TaskBase`1.StartProcess(Int64 instanceTaskNum, String outputFileName) in C:_Releases\ICE\UD10.2.500.40FW\Source\Server\Internal\Lib\TaskLib\TaskBase\TaskBase.cs:line 83*
  • at Ice.Hosting.TaskCaller.InnerExecuteTask(IceDataContext newContext) in C:_Releases\ICE\UD10.2.500.40FW\Source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 117*
  • at Ice.Hosting.TaskCaller.ExecuteTask() in C:_Releases\ICE\UD10.2.500.40FW\Source\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 59*
  • at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in C:_Releases\ICE\RL10.2.500.0FW\Source\Server\Services\Lib\RunTask\BpmFriendlyTaskLauncher.cs:line 63*
  • at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:_Releases\ICE\RL10.2.500.0FW\Source\Server\Services\Lib\RunTask\RunTask.cs:line 452*

any ideas? if i remove the relationship and go back into the report there are no fields for PartCOO