How to display filter selections in BAQ Report?

How does one display the filter selections in a BAQ (SSRS) Report?

Has anyone found a trick or work-around for displaying what the user selects in a filter for a BAQ (SSRS) Report?

Showing/displaying what the user selected in a filter is a basic kind of request for an SSRS report, and I’m extremely surprised to not see the filter selection info in any of the report parameter tables. Does everyone just shrug and live with this limitation, or is there a work-around that someone has found?

Surely there must be some way to do this…or is this really impossible in Epicor ERP?

(I saw a similar post from way back in 2010…with no replies. I trust that ~8 years later there is some way to make this better now, right?)

I think those are passsed over in the ReportParam table available in the BAQ SSRS Report? DId you check there yet? It’s been a while since I poked at it.

3 Likes

I think Jose is right. A Param table is available.

I looked at the Parameter Table and did not find the Filter Selection values being placed anywhere in any of the fields in the Parameter table. The Option selection values do make it into the Parameter table, but I’m not seeing the Filter selections getting into the Parameter table.

I am 99% sure they are not passed and if by chance someone proves otherwise, I will kick myself for making a slight customization to pass these to the reportparam table.

Dan, you made a “slight customization” in order to get the Filter Selections into the Parameter table, so that they can be used on the SSRS report? Really? Please do tell… What customization did you make?

Yes and this is one way to do it. Create a customization for the BAQ Report parameter screen. You then create the necessary code to capture a value change for your filter fields and then update the dataView (using a field that is not used. Once this is done you will see the value in the ReportParams field (as shown below). If you would like I can provide a working code sample that will lay it out better.

edvReportParam.dataView[edvReportParam.Row]["Character01"] = myFilterField.Value;

Yes, I would love to see a working code example! And thanks for confirming that there is some kind of way to make this happen!

Also available to reports starting with 10.1.600 - the BPMData table fields. Those can be filled in the Client via customization and the values are passed all the way through to a Transient Table in the SSRS table set for the report. Similar concept to the Report Parameters but Epicor does not manage any of the data.

4 Likes

That’s @Rich that’s good info, is the dataset automatically added to SSRS with the BPMData or do we have to link that into the SSRS ourselves? I haven’t seen this in the docs I’ll poke around

2 Likes

Rich, what kind of customization is needed to pass the BAQ Filter Selections to the SSRS table?

Here is a very simple example of using custom code. The report form for this example has a Job Number filter and I take the job number from the grid of filter results and put it into Character01. I did bundle some code together for the example that I would typically not do and this would also need to read each filter row and add to Job Num. I am basically only moving 1 row for the example. You would also need to delimit into Character01 or whatever field you want with multiple values and then split the column in SSRS. There are better ways to do this but wanted to give you a quick example.

	private void BAQReportParam_AfterFieldChange(object sender, DataColumnChangeEventArgs args)
	{
		// ** Argument Properties and Uses **
		// args.Row["FieldName"]
		// args.Column, args.ProposedValue, args.Row
		// Add Event Handler Code
		switch (args.Column.ColumnName)
		{
			case "FilterList1":
			string JobNum = string.Empty;
			EpiUltraGrid grdFilter = (EpiUltraGrid)csm.GetNativeControlReference("064288ef-9896-4095-8b51-770e9e7ca290-1");
			foreach (UltraGridRow row in grdFilter.Rows)
				{
					JobNum = row.Cells["JobNum"].Value.ToString();
				}
			EpiDataView epiDataView = (EpiDataView) oTrans.EpiDataViews["ReportParam"];
			epiDataView.dataView[epiDataView.Row]["Character01"] = JobNum;
			break;
		}
	}
3 Likes

The column CallContextData in BAQReportParameter_GUID holds this data as XML. It takes a function or modifying the dataset query, in SSRS, to use it though, at least from what I have experienced.

You could just use simple string manipulation:

=Mid(First(Fields!Filter2.Value, “BAQReportParameter”),17, instr(First(Fields!Filter2.Value, “BAQReportParameter”), “</PartBin_BinNum>” )-17 )

Replace part_bin_binnum and the len (17) and off you go !

2 Likes