PC+ v 11, Windows 10
I know this cannot be hard but the Syntax monster keeps beating me up.
I'm trying to put 2020-2021 in the title of a couple reports.
I get as far as entering YEAR(DATE()) in and yes that gives me 2020, no problem.
I cannot get the '-' and the rest in without an error.
I try YEAR(DATE()) "-" YEAR(DATE())+1 but no go.
I'll use these reports year after year in the future, too.
I have the Custom Reports Tutorial Workbook and have searched but cannot find it. Please advise.
Also could you point out where in the book I can find similar statements?
Thanks, John
Put fiscal year date in a report title
Moderators: Moderators, Tech Support
-
- Posts: 332
- Joined: Sun Sep 28, 2003 5:37 pm
- Location: First Cutlerville Christian Reformed Church
- Contact:
Re: Put fiscal year date in a report title
Did you try this?John Dykema wrote: ↑Thu Jul 09, 2020 7:45 pmPC+ v 11, Windows 10
I know this cannot be hard but the Syntax monster keeps beating me up.
I'm trying to put 2020-2021 in the title of a couple reports.
I get as far as entering YEAR(DATE()) in and yes that gives me 2020, no problem.
I cannot get the '-' and the rest in without an error.
I try YEAR(DATE()) "-" YEAR(DATE())+1 but no go.
I'll use these reports year after year in the future, too.
I have the Custom Reports Tutorial Workbook and have searched but cannot find it. Please advise.
Also could you point out where in the book I can find similar statements?
Thanks, John
YEAR(DATE()) "-" (YEAR(DATE())+1)
Neil Zampella
Using PC+ since 1999.
Using PC+ since 1999.
-
- Posts: 332
- Joined: Sun Sep 28, 2003 5:37 pm
- Location: First Cutlerville Christian Reformed Church
- Contact:
Re: Put fiscal year date in a report title
Neil, thanks for the quick return.
I copied your code and still get a Syntax error. Sorry.
Maybe I'll have to just type in the years I want for in the title. I think I did one like that years ago but will have to relearn how to except text that I can put into the title.
John
I copied your code and still get a Syntax error. Sorry.
Maybe I'll have to just type in the years I want for in the title. I think I did one like that years ago but will have to relearn how to except text that I can put into the title.
John
Re: Put fiscal year date in a report title
John Dykema wrote: ↑Fri Jul 10, 2020 1:33 pmNeil, thanks for the quick return.
I copied your code and still get a Syntax error. Sorry.
Maybe I'll have to just type in the years I want for in the title. I think I did one like that years ago but will have to relearn how to except text that I can put into the title.
John
Sorry John ... it was worth a shot ... however, I just looked at what I put there. Try adding another set of parenthesis like this:
((YEAR(DATE())) + 1 )
Not sure if that would work or not, but it adds another set of parentheses which 'should' allow the function to return a result, then add 1.
Neil Zampella
Using PC+ since 1999.
Using PC+ since 1999.
-
- Tech Support
- Posts: 3099
- Joined: Thu May 13, 2004 9:59 am
- Location: PowerChurch Software
- Contact:
Re: Put fiscal year date in a report title
This is tested and will work. Once you get the syntax worked out, it doesn't like appending numbers and strings together, you get an Operator/Operand Type Mismatch error, so you have to convert (TRANSFORM) the numbers to strings.
Code: Select all
TRANSFORM(YEAR(DATE()))+" - "+TRANSFORM(YEAR(DATE())+1)
-
- Posts: 332
- Joined: Sun Sep 28, 2003 5:37 pm
- Location: First Cutlerville Christian Reformed Church
- Contact:
Re: Put fiscal year date in a report title
Neil's second formula works and returns "2021" but putting the 2020 formula in does not fly.
Zorak's Transfomer works
. Thanks. much, John.
Zorak's Transfomer works

Re: Put fiscal year date in a report title
Transformers .. I could make a joke hereJohn Dykema wrote: ↑Fri Jul 10, 2020 4:30 pmNeil's second formula works and returns "2021" but putting the 2020 formula in does not fly.
Zorak's Transfomer works. Thanks. much, John.

Neil Zampella
Using PC+ since 1999.
Using PC+ since 1999.