Allow null in BAQ Report Options Field


(Alice Elizabeth Smith) #1

Hello all,

I have a BAQ Labor report that was originally created with option fields for part # and date range. It has been requested that an option field by added for employee number. I added it and it works great when an employee number is provided but we would like the flexibility to run the report both ways, with or without an employee option entered. The BAQ options field doesn’t appear to allow a null value. Am I mistaken?

1

Thanks,

Alice


(Chris Conn) #2

Parameters in your BAQ should have an option to ignore nulls


(Alice Elizabeth Smith) #3

Thank you. Although I am unfamiliar with how I would add the parameter within BAQ designer. Will I be adding it to the appropriate table within the design window?


(Chris Conn) #4

You can access them after you add a parameter as a criteria, or you can manually open the parameter menu in the BAQ editor from the menu


(Mark Damen) #5

If you did it as a Filter instead, it would run for all employees by default but you have the option of going to the filter tab and selecting one, or many.


(Alice Elizabeth Smith) #6

I was thinking of that, but I appear to have limited options for filtering. Although employee num is selected in BAQ, it does not appear in filter dropdown. Do you know what dictates which fields are available in filter options?


(Brian Garver) #7

Only key fields are available for filters. The BAQ will need to have the EmpBasic table included and the EmpBasic.EmpID field as a selected field. It should then be available as a filter.


(Alice Elizabeth Smith) #8

Thank you! That is useful info. I will try that route.


(Bruce Ordway) #9

Some option data types want to auto-populate with a default value when the BAQ report form loads.
e.g. date with today’s date, integer with a zero, etc…

However, you could add a customization to your BAQ Report form to set these types to NULL.
Not sure this is what you want but, added an example “form load” snippet below.

private void BAQReportForm_Load(object sender, EventArgs args)
{
edvReportParam.dataView[edvReportParam.Row]["Number01"] = 1;
edvReportParam.dataView[edvReportParam.Row]["Number02"] = DBNull.Value;
}

image

The form load, is now overriding any defaults and that you can run the report with the “blank” field.
If Number02 gets populated for any reason, you’d need to close the form and reopen it to reset it to NULL.