robert fuschetto Posted November 8, 2021 Posted November 8, 2021 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
Chad Smith Posted November 8, 2021 Posted November 8, 2021 Did you try storing &PERIOD-100 in a different variable and use that instead.
Warren Hinchliffe Posted November 8, 2021 Posted November 8, 2021 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.
Martin Yergeau Posted November 9, 2021 Posted November 9, 2021 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
robert fuschetto Posted November 9, 2021 Author Posted November 9, 2021 MartinY: SET &PRIORX = &PERIOD - 100; and then use &PRIORX in the report columns title That worked! Thanks!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now