BAQ Report, Option on Calculated field?

Can a BAQ report use a Calculated field for an Option setting?

My BAQ has a calculated field ‘PUR_STK_1151’ which is a boolean, and is set when a PO type is PUR-STK, and a specific GL account is used.

The report can filter these out when it runs. But it’s used for an automatic email, and I don’t want the email sent when there’s “no data”.

Right now the BAQ includes the lines, which I hide in the report, so it’s not truly “No records selected”.
I want the BAQ to not return those lines at all.

Calvin

add it as a subquery criteria

My main query (and currently only), consists of
image

I want to exclude records when
(PORel.TranType='PUR-STK' and substring(TranGLC.GLAccount, 1, 4) = '1151' )

But only when running this via a BAQ report. The BAQ is also used in a Dashboard, and I want that condition ignored when running the dashboard.

Are you saying to make a sub-query of PORel (left join) TranGLC, containing a calculated field , then join the sub-query to main, and include the sub_query’s calculated field in main query’s displayed fields?

And that should be able to be filtered by the BAQ Report process?

That changes things a bit. Try adding a parameter that you call with you run the report. Click the ignore when blank checkbox so it returns everything for the dashboard baq.