Epicor SSRS editing base epicor reports

Hey,

I am attempting to edit the report for receipt entry and am running into issues, so I figure it would be best to ask the community and see if anyone can help. I am attempting to print a tag from receipt entry where I am adding a few tables are the UD08 table and part tables for other part info. Here is what I have so far.

Microsoft report builder is as follows, I tried a few different options where each table in the data definition was a separate data set, but that didn’t work so here is what I settled on please correct me if this is wrong.

Dataset query on Mtl Queue
=“SELECT T1.Company,
T1.PartNum,
T2.Company,
T2.PartNum
T2.IUM,
T2.PartDescription,
T3.Company,
T3.PartNum,
T3.LotNum,
T4.Company,
T4.LotNum,
T4.OnhandQty,
T5.Key1,
T5.Key2,
T5.ShortChar10,
T5.ShortChar14
FROM MtlQueue_” + Parameters!TableGuid.Value + " T1
LEFT OUTER JOIN PartNum" + Parameters!TableGuid.Value + " T2
ON T1.Company = T2.Company AND T1.PartNum = T2.PartNum
LEFT OUTER JOIN PartLot" + Parameters!TableGuid.Value + " T3
ON T2.Company = T3.Company AND T2.PartNum = T3.PartNum
LEFT OUTER JOIN PartBin" + Parameters!TableGuid.Value + " T4
ON T3.Company = T4.Company AND T3.LotNum = T4.LotNum
LEFT OUTER JOIN UD08" + Parameters!TableGuid.Value + " T5
ON T3.PartNum = T5.Key1 AND T3.LotNum = T5.Key2"

And here is my report data definition

All fields the are excluded in the data definition besides the default which I am not using for my label anyways are on the dataset query above. Joins all match the report relationships as well. It uploaded properly, but when I try to run the report I get the following error:

Program Ice.Services.Lib.RunTask when executing task 16446541 raised an unexpected exception with the following message: RunTask:
Ice.Core.SsrsReporting.SsrsCaller.SsrsException: The SSRS server returned the status code 500 (InternalServerError) with the following error text:
An error has occurred during report processing. —> Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. —> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset ‘MtlQueue’. —> Microsoft.Data.SqlClient.SqlException: Invalid object name ‘PartNum66d7ed92ec6346d6a82bd424a695dae7’.
at Ice.Core.SsrsReporting.SsrsCaller.SoapCaller.Call[TContent,TResponse,TSoapHeader](String actionName, TContent content, TSoapHeader soapHeader) in C:_releases\ICE\ICE5.1.100.10\Source\Server\Internal\Lib\TaskLib\SsrsReporting\SsrsCaller\SoapCaller.cs:line 47
at Ice.Core.SsrsReporting.SsrsCaller.ReportExecutionService.Render(String format, String deviceInfo, String& extension, String& mimeType, String& encoding, Warning& warnings, String& streamIds) in C:_releases\ICE\ICE5.1.100.10\Source\Server\Internal\Lib\TaskLib\SsrsReporting\SsrsCaller\ReportExecutionService.cs:line 75
at Ice.Core.SsrsReporting.SsrsRendererBase.TraceReportRendered(String printProgram, String ssrsRenderFormat, Func1 timedAction) in C:\_releases\ICE\ICE5.1.100.10\Source\Server\Internal\Lib\TaskLib\SsrsReporting\SsrsRendererBase.cs:line 81 at Ice.Core.SsrsReporting.ReportProcessorBase.RenderReport_HttpClient(String ssrsRenderFormat, String printProgram, Boolean ignorePageSettings) in C:\_releases\ICE\ICE5.1.100.10\Source\Server\Internal\Lib\TaskLib\SsrsReporting\ReportProcessorBase.cs:line 349 at Ice.Core.SsrsReporting.ReportProcessorBase.RenderReport(String ssrsRenderFormat, String printProgram, Boolean ignorePageSettings) in C:\_releases\ICE\ICE5.1.100.10\Source\Server\Internal\Lib\TaskLib\SsrsReporting\ReportProcessorBase.cs:line 243 at Ice.Core.SsrsReporting.ReportProcessorBase.ProcessReportPart(String reportLocation) in C:\_releases\ICE\ICE5.1.100.10\Source\Server\Internal\Lib\TaskLib\SsrsReporting\ReportProcessorBase.cs:line 159 at Ice.Core.SsrsReporting.StandardReportProcessor.ProcessReportParts() in C:\_releases\ICE\ICE5.1.100.10\Source\Server\Internal\Lib\TaskLib\SsrsReporting\StandardReportProcessor.cs:line 31 at Ice.Core.RoutingAndBreaking.ReportPersister.Persist(ReportInstanceInformation reportInstance, Func2 reportsRenderer, Action1 fillSysRptLstRow, Action2 processReport, Func3 filterTableAttachmentsFunc) at Ice.Core.RptBase.ReportSsrsDatabaseBuilder.RenderUnroutedSsrsReport() in C:\_releases\ICE\ICE5.1.100.10\Source\Server\Internal\Lib\TaskLib\RptBase\ReportSsrsDatabaseBuilder.cs:line 355 at Ice.Core.RptTaskBase1.XMLClose() in C:_releases\ICE\ICE5.1.100.10\Source\Server\Internal\Lib\TaskLib\RptBase\RptTaskBase.cs:line 219
at Erp.Internal.XA.MtlTags.RunProcess(Int64 instanceTaskNum, String outputFileName) in C:_releases\ERP\ERP12.1.100.0\Source\Server\Internal\XA\MtlTags\MtlTags.cs:line 600
at Ice.Hosting.TaskCaller.InnerExecuteTask(IceDataContext newContext) in C:_releases\ICE\ICE5.1.100.10\Source\Server\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 71
at Ice.Hosting.TaskCaller.ExecuteTask() in C:_releases\ICE\ICE5.1.100.10\Source\Server\Framework\Epicor.Ice\Hosting\TaskCaller\TaskCaller.cs:line 62
at Ice.Lib.RunTask.BpmFriendlyTaskLauncher.Run(String sessionIdPrefix, IceContext db, Action taskRunner) in C:_releases\ICE\ICE5.1.100.0\Source\Server\Services\Lib\RunTask\BpmFriendlyTaskLauncher.cs:line 57
at Ice.Services.Lib.RunTaskSvc.InnerRunTask(Int64 ipTaskNum, Boolean suppressTransaction) in C:_releases\ICE\ICE5.1.100.0\Source\Server\Services\Lib\RunTask\RunTask.cs:line 349

Which makes no sense to me because the part num field is being referenced in my data definition and of course the dataset query in power bi, so I am wondering why is it stating the object name is invalid and what are the numbers attached to the object name? How do I go about fixing this is my whole report wrong or is it something I need to contact epicor to assist with since I am on multitenant? Please help!

You need to correct the table name in your dataset query:

This should most likey be Part rather than PartNum after the first LEFT OUTER JOIN.

Many thanks,
Nathan

2 Likes

Good catch! However my error has simply changed to say the invalid object name is now part instead of partNum

Agree w/ @ServantOMallard… table join should be Part_ (don’t forget the underscore).

You’re also missing a comma after PartNum in the select list:

You’re also selecting T1.PartNum, T2.PartNum and T3.PartNum. I would set a couple of those with aliases, for example T3.PartNum AS somethingElse

EDIT: Oh, and your UD08, PartLot, and PartBin table joins probably need underscores as well.

LEFT OUTER JOIN UD08_" + Parameters!TableGuid.Value +…

1 Like

That Worked! Thank you I really gotta practice SQL more haha, also why would you make aliases? Just to make it read easier or is there a reason besides that

1 Like

The query works… but when you create your fields, you would have (3) fields all called PartNum. How does the SSRS form know which one to use?

But If you had:
T1.PartNum
T2.PartNum AS Part_PartNum
T3.PartNum AS PartLot_PartNum

Your fields then become PartNum, Part_PartNum, and PartLot_PartNum. You can easily know where each comes from.

In this case T1.PartNum = T2.PartNum = T3.PartNum… so it probably doesn’t matter. They all have the same value. But that then begs the question, do you even need to include T2.PartNum and T3.PartNum in your Select statement at all?

You can include them in your joins, but you don’t HAVE to include them in your select statement. So, that leaves you with just one PartNum field in your report.

Same with Company… do you need to select T1.Company, T2.Company, T3.Company, T4.Company?

Again, you can use the fields in your table joins, but you don’t HAVE to include them all in your select statement.

Aliases come into play more when you may have things like JobAsmbl_PartNum and then JobMtl_PartNum. They’re both PartNum… but they would have different values.

2 Likes

Okay so follow up question, why is my report blank? I tried to group by lot number which is in the MtlTags dataset, but nothing is populating. I feel like I am doing something wrong but I am not quite sure what it is. Do I need to group by a different input coming from MtlTags, and what would that possibly be?

Well, I’m not overly sure what you’re trying to do, so I apologize I don’t have a clear answer.

When I add tables/columns to an existing report, I will generally add that into the existing dataset/query. In this case it looks like you added a new MtlQueue dataset. Not sure how that plays into your current issues.

Could you add your table joins and columns to the MtlTags query and see if data come through?

All I have to go on is my own customization to MtlTag where I added RcvDtl table. I added a relationship between MtlTags and RcvDtl:

I then added that relationship and (1) additional query field to the MtlTag query.

I did not create a new dataset. I just added on to the existing MtlTags dataset.

Again, not sure if this route would fix your issue or not. That was just my approach.

1 Like

Yeah I switched everything over to MtlTags instead of MtlQueue and that output the data, the fact that MtlTags had no report table fields in the report data definition kinda through me off. Its working like a charm now thanks again!

1 Like