Current Year and Last Year report

We would like to create a BAQ Report to show invoice totals for this year and last year.

We would like to prompt the user with a single “As Of Date” using a parameter and then use the parameter date to calculate back one year.

I do not see where I can use a Parameter in a Formula.

Is there some trick to this?

Thanks - DaveO

@DaveOlender

This might help

1 Like

Mr. Prashanth: That is excellent - Thank you so much.

DaveO

Mr. Prashanth: It looks like if you have a subreport in the query I am not allowed a reference to the parameters.

Make sure the parameter is marked “Mandatory”. I think that’s a requirement to use it in an expression.

Mr. Zack: Thank you for the suggestion.

The “Mandatory” check did not allow me to see any of my my parameters.

However, i appreciate the suggestion - i did not think to try that.

DaveO

You may have to use Sub-query Criteria to apply a parameter.

EDIT

Whoops … I didn’t realize you wanted to use it in a formula.

Mr. Calvin: Thank you for the reply.

Yes - i am prompting the operator for the “EndDate” and I need to calculate the “StartDate” based on the “EndDate”.

Since i am unable to reference the EndDate prompt it is turning out very hard to calculate the start date.

Thank you again,
DaveO

Are you calculating the start date for displaying purposes? Or is it for filtering the results of the subquery?

If it is the later, you could add subquery criteria with an expression, to filter subquery records that are sent to the top level query.

edit

And did you try just using the parameter in the format shown for the top level (even though it’s not in the expression builder). @endate (or whatever your parameter name is)