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 ALL LEVEL BOM
// 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);
dqa_BOMShort.BOConnect();
dqa_BOMShort.GetDashboardQuery("ETK-BOMShort");
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"] = "";
parameters.ExecutionParameter.Rows.Add(parameterRow1);
DataRow parameterRow2 = parameters.ExecutionParameter.NewRow();
parameterRow2["ParameterID"] = "ParentPartRev";
parameterRow2["ParameterValue"] = cboRevisions.Text;
parameterRow2["ValueType"] = "x(50)";
parameterRow2["IsEmpty"] = false;
parameterRow2["RowMod"] = "";
parameters.ExecutionParameter.Rows.Add(parameterRow2);
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( );
}