Pass selection from BAQ Report dialog box to BAQ

I’ve been struggling with this for days…

Does anyone know of a way to have a selection from a BAQ Report dialog box pass to the BAQ when it runs? I think I have tried everything I could think of with no success.

The last thing I was looking at trying to do was pass the data in the DynamicReport to the DynamicQuery, but couldn’t find a link.

Any help is appreciated as I’m about to give up.

Are you talking about entering the report parameters for a BAQ report?

Potentially. I have created a BAQ and then created a BAQ Report. I added the report to the menu so when a user goes to run it, they get the standard dialog box like any standard reports. I want the user to be able to select information in the dialog box and have that passed to the BAQ behind to generate the SSRS report.

I thought of a question that I don’t know the answer to that is related to this.

When you create a BAQ Report and apply an Option or Filter to it. Does the field you select have to be in the Top Level query?

Does any one know how to do this?

Or is it not possible?

Or have I done a poor job explaining what I am looking for?

If you mean can you create a filter on a field in an inner subquery that does not display a value in the top level query, then I do not believe there is a way to do that through the normal interface. I believe what the filter is doing is selecting a subset from the populated result set of the original query and then copying that data to the report database. Consequently it would only be able to filter on fields within that result set. Can you explain with a concrete example what you are trying to accomplish and maybe there is another way.

Thanks for responding. I will do my best.

I created a BAQ that has some subqueries and a top level. The very first query in the BAQ is a CTE that calculates out dates based off of constants.today. The dates I am calculating are beginning of week, month, quarter, year. Instead of having to be locked into only being able to run the report using the constants.today, I would like to be able to run it on a user selected date. The report is for sales so I find myself constantly having to alter the BAQ to run for other dates when someone loses the original report.

I thought that there would be some way to add an option to the BAQ Report and have that filter the query before it runs. I’m not sure how the BAQ Report, System Agent, and BAQ work together. I’ve been poking around and have not found a way yet.

If I were tasked to do this as a consultant I would most likely choose to do it as a custom SSRS report using the Epicor database as a datasource but doing what you are doing with calculations and parameters in a stored procedure that will provide data to the report.