BAQ Dashboard not returing the expected results


(Ken Nash) #1

The following custom code is running. Just recently the return data is not correct in the dashboard. When I run the BAQ in the BAQ editor the 66 records are returned for a particular part/rev combination. In the dashboard only 9 records are being returned. Odd. This is happening for every user. Where else could there be a filter on the BAQ? The return was checked while in debug mode with visual studio.

private void btnOneLevel_Click(object sender, System.EventArgs args)
		// ** Place Event Handling Code Here **
		spNotifyUsers.Status = ( Ice.Lib.Framework.StatusTypes )3;
		spNotifyUsers.EnabledCaption = "Retrieving FIRST Level of the BOM";
		spNotifyUsers.Refresh( );
		// Hide JOB PARTS
		grid_BasicReport.Visible = false;
		grdJobPart.Visible = false;
		//Make One Level BOM visable

		grdBOMShort.Visible = true;
		grdBOMShort.Location = topGridLoc ;
		grdBOMShort.Size = topGridSize ;
		dqa_BOMShort = new DynamicQueryAdapter(oTrans);
		edv_BOMShort = new EpiDataView();
		edv_BOMShort.dataView = new DataView(dqa_BOMShort.QueryResults.Tables["Results"]);
		oTrans.Add("edv_BOMShort", edv_BOMShort);

		QueryExecutionDataSet parameters = new QueryExecutionDataSet();
		DataRow parameterRow1 = parameters.ExecutionParameter.NewRow();
		parameterRow1["ParameterID"] = "ParentPartNum";
		parameterRow1["ParameterValue"] = txtPartNum.Text;
		parameterRow1["ValueType"] = "x(10)";
		parameterRow1["IsEmpty"] = false;
		parameterRow1["RowMod"] = "";
		DataRow parameterRow2 = parameters.ExecutionParameter.NewRow();
		parameterRow2["ParameterID"] = "ParentPartRev";
		parameterRow2["ParameterValue"] = cboRevisions.Text;
		parameterRow2["ValueType"] = "x(50)";
		parameterRow2["IsEmpty"] = false;
		parameterRow2["RowMod"] = "";
		dqa_BOMShort.ExecuteDashboardParameterized(dqa_BOMShort.RuntimeQuery, parameters);
		edv_BOMShort.dataView = new DataView(dqa_BOMShort.QueryResults.Tables["Results"]);

		DataTable results = dqa_BOMShort.QueryResults.Tables["Results"];
		grdBOMShort.DataSource = results;

		grdBOMShort.DisplayLayout.Bands[0].Columns["PartMtl_MtlSeq"].SortIndicator = Infragistics.Win.UltraWinGrid.SortIndicator.Ascending;

		spNotifyUsers.Status = ( Ice.Lib.Framework.StatusTypes )0;
		spNotifyUsers.EnabledCaption = "";
		spNotifyUsers.Refresh( );


(Calvin Krusen) #2

Drop the BAQ into a fresh dashboard and see if the unexpected results persist

(Ken Nash) #3

Same bad results.

New Dashboard

BAQ Designer

(Calvin Krusen) #4

So it’s not the code calling the BAQ and passing it to the dataview.

Curious if it does the same as a deployed dashboard

And does the BAQ have parameters? And are any set to ignore if null?

(Haso Keric) #5

Make sure you have the right BAQ… Epicor during a dashboard import sometimes allows you to have a “All Companies” BAQ and then it creates a Local BAQ with the SAME BAQ Name without “All Companies” checked. It’s hard to find in a Dashboard…

So Make sure you do a good search within BAQ Designer, All Users, Shared / Unshared, All Companies / Not All Companies… See if you have another hidden one with the same name, or just rename your BAQ then add it back to a Dashboard any other name than ETK-BOMShort

I had a similar issue, I modified a BAQ it all looked awesome, until the Dashboard ran an older BAQ, so when I deleted My BAQ the other one showed up, it was odd… Back-up your ETK-BOMShort and then delete it =) see if there is another one. This may be a bug when using Dashboard Maintenance to Import. I had to delete the local ones for each Company so the All Companies one was used.

But then Again this might only happen in a MC Environment, don’t know - just double check. Rename BAQ See if that helps.

Obviously I wouldnt see another users if they didnt share it, so maybe someone from your colleagues managed to clone it with the same name who knows :slight_smile:

(Ken Nash) #6

Here is what I see.

deleted BAQ.

Load the form. got an error, which is expected.

added baq back.

Now BAQ is returning all of the records. crazy

Thanks for the idea of backing up and deleting.

(Haso Keric) #7

Awesome! Must have gotten corrupt. Never had that happen.