Hi everyone,
I have been struggling with what seems like a simple problem. I want to put an Option checkbox on my BAQ Report. Then I want to filter my SSRS based on whether or not that box is checked.
More specifically I am listing my inventory in all warehouses and bins. I want the checkbox to only show bins that are not numeric. So, if checked, I would get bins “A, AA, AB, and AB1” but not “1, 22, or 115”
My approach was to insert an option in the BAQ Report. I used ReportParam_Check01 for this.
Then inside my SSRS, I attempted to filter the results using the following code. I first applied this code to the dataset filter, then to the group filter, and then to the tablix filter. All returned similar errors when I try to upload the report.
Message: A FilterExpression for the tablix ‘Tablix1’ includes an aggregate function. Aggregate functions cannot be used in dataset filters or data region filters.
Program: Epicor.ServiceModel.dll
Method: ShouldRethrowNonRetryableException
Client Stack Trace
at Epicor.ServiceModel.Channels.ImplBase1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets) at Ice.Proxy.BO.ReportImpl.ImportSsrsReports(DataSet reports) at Ice.Lib.Report.SsrsTransfer.UploadReports(String clientDirectory, String reportLocations) at Ice.Lib.Report.UploadSsrsDialog.UploadReports(Session session, String selectedPath, String printProgram) at Ice.Lib.Report.SsrsDialogBase.TransferReports(Session session, Action1 showReportsTransfered)
at Ice.Lib.Report.UploadSsrsDialog.UploadReports(Form parentForm, Session session)
at Ice.UI.App.DynamicReportDesigner.BAQRDesignerForm.UploadSsrsReport()
at Ice.UI.App.DynamicReportDesigner.BAQRDesignerForm.OnClickMiscTool(String ToolKey)
at Ice.Lib.Framework.EpiBaseForm.handleToolClickInternal(String tKey, ToolClickEventArgs ea)
at Ice.Lib.Framework.EpiBaseForm.handleToolClick(String tKey, ToolClickEventArgs ea)
So I pulled out the aggregate function like this, and got this error:
Message: The FilterExpression expression for the tablix ‘Tablix1’ refers to the field ‘Check01’. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. Letters in the names of fields must use the correct case.
Program: Epicor.ServiceModel.dll
Method: ShouldRethrowNonRetryableException
Client Stack Trace
at Epicor.ServiceModel.Channels.ImplBase1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets) at Ice.Proxy.BO.ReportImpl.ImportSsrsReports(DataSet reports) at Ice.Lib.Report.SsrsTransfer.UploadReports(String clientDirectory, String reportLocations) at Ice.Lib.Report.UploadSsrsDialog.UploadReports(Session session, String selectedPath, String printProgram) at Ice.Lib.Report.SsrsDialogBase.TransferReports(Session session, Action1 showReportsTransfered)
at Ice.Lib.Report.UploadSsrsDialog.UploadReports(Form parentForm, Session session)
at Ice.UI.App.DynamicReportDesigner.BAQRDesignerForm.UploadSsrsReport()
at Ice.UI.App.DynamicReportDesigner.BAQRDesignerForm.OnClickMiscTool(String ToolKey)
at Ice.Lib.Framework.EpiBaseForm.handleToolClickInternal(String tKey, ToolClickEventArgs ea)
at Ice.Lib.Framework.EpiBaseForm.handleToolClick(String tKey, ToolClickEventArgs ea)
The way I do this is by adding a parameter in the RDL and setting its default value to pull the field from BAQReportParameter dataset. Then you can reference the new parameter in your BAQReportResult or Tablix filter conditions.
The way I do this is by adding a parameter in the RDL and setting its default value to pull the field from BAQReportParameter dataset. Then you can reference the new parameter in your BAQReportResult or Tablix filter conditions.
I got this error when I tried this approach:
Application Error
Exception caught in: Epicor.ServiceModel
Error Detail
Message: A Value expression used for the report parameter ‘IsAlpha’ refers to a field. Fields cannot be used in report parameter expressions.
Program: Epicor.ServiceModel.dll
Method: ShouldRethrowNonRetryableException
Client Stack Trace
at Epicor.ServiceModel.Channels.ImplBase1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets) at Ice.Proxy.BO.ReportImpl.ImportSsrsReports(DataSet reports) at Ice.Lib.Report.SsrsTransfer.UploadReports(String clientDirectory, String reportLocations) at Ice.Lib.Report.UploadSsrsDialog.UploadReports(Session session, String selectedPath, String printProgram) at Ice.Lib.Report.SsrsDialogBase.TransferReports(Session session, Action1 showReportsTransfered)
at Ice.Lib.Report.UploadSsrsDialog.UploadReports(Form parentForm, Session session)
at Ice.UI.App.DynamicReportDesigner.BAQRDesignerForm.UploadSsrsReport()
at Ice.UI.App.DynamicReportDesigner.BAQRDesignerForm.OnClickMiscTool(String ToolKey)
at Ice.Lib.Framework.EpiBaseForm.handleToolClickInternal(String tKey, ToolClickEventArgs ea)
at Ice.Lib.Framework.EpiBaseForm.handleToolClick(String tKey, ToolClickEventArgs ea)
This method actually worked! Kind of… It left huge blank gaps in my report where the rows were hidden. I turned on CanShrink but still have big blank sections where the rows are hidden.
First, I applied this criteria to the Hidden expression of the detail row in the tablix. This gave the big blank sections.
Then, I applied the same code to the Hidden expression of the tablix itself. This didn’t seem to filter at all.