Put fiscal year date in a report title

Moderators: Moderators, Tech Support

Post Reply
John Dykema
Posts: 320
Joined: Sun Sep 28, 2003 5:37 pm
Location: First Cutlerville Christian Reformed Church
Contact:

Put fiscal year date in a report title

Post by John Dykema »

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

NeilZ
Posts: 10209
Joined: Wed Oct 08, 2003 1:20 am
Location: Dexter NM
Contact:

Re: Put fiscal year date in a report title

Post by NeilZ »

John Dykema wrote:
Thu Jul 09, 2020 7:45 pm
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
Did you try this?

YEAR(DATE()) "-" (YEAR(DATE())+1)
Neil Zampella

Using PC+ since 1999.

John Dykema
Posts: 320
Joined: Sun Sep 28, 2003 5:37 pm
Location: First Cutlerville Christian Reformed Church
Contact:

Re: Put fiscal year date in a report title

Post by John Dykema »

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

NeilZ
Posts: 10209
Joined: Wed Oct 08, 2003 1:20 am
Location: Dexter NM
Contact:

Re: Put fiscal year date in a report title

Post by NeilZ »

John Dykema wrote:
Fri Jul 10, 2020 1:33 pm
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

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.

Zorak
Tech Support
Tech Support
Posts: 3006
Joined: Thu May 13, 2004 9:59 am
Location: PowerChurch Software
Contact:

Re: Put fiscal year date in a report title

Post by Zorak »

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)

John Dykema
Posts: 320
Joined: Sun Sep 28, 2003 5:37 pm
Location: First Cutlerville Christian Reformed Church
Contact:

Re: Put fiscal year date in a report title

Post by John Dykema »

Neil's second formula works and returns "2021" but putting the 2020 formula in does not fly.
Zorak's Transfomer works :) . Thanks. much, John.

NeilZ
Posts: 10209
Joined: Wed Oct 08, 2003 1:20 am
Location: Dexter NM
Contact:

Re: Put fiscal year date in a report title

Post by NeilZ »

John Dykema wrote:
Fri Jul 10, 2020 4:30 pm
Neil's second formula works and returns "2021" but putting the 2020 formula in does not fly.
Zorak's Transfomer works :) . Thanks. much, John.
Transformers .. I could make a joke here :)
Neil Zampella

Using PC+ since 1999.

Post Reply