Jump to content

Recommended Posts

Posted

Here is a good one. Our PERIODs are YYYMM. So 202107 would be July 2021.

We have a report that prompts for: PERIOD. It them selects based on:

tblname.PD EQ &PERIOD OR tblname.PD EQ &PERIOD-100.

This yields data as of a specified period and that of the same month but a year prior.

Ex: 202107 and 202007.

The report does some counting etc and ends up with three defined columns: CURRENT, PRIOR and DELTA shown on the report.

I want the column headers to be more specific. I right clicked the CURRENT columns title and tried changing it from: Current to: &Period. It worked great. I now see 202107, Prior and Delta on my report.

I next right clicked the PRIOR columns title and tried changing it from: Prior to &PERIOD-100.

That did not work so well.

The column title shows as: 202107-100 when the report is run.

Is there a way I can make this work

Posted

I would suggest calc-ing the period - 100 with a function like AYM.

This very much depends on if this is IA/Designer/App Studio or hand coded.

Another option would be to create a new field (DEFINE) in the master with 100 days added (Still need a function), then test with &PERIOD with the new field.

Posted

Columns titles are defined as a text when used so, applying calculation on them wont work.

You need to have them defined prior to use.

What you can do is

-SET &PRIORX = &PERIOD - 100;

and then use &PRIORX in the report columns title

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...