Internal Variable for Date

Moderators: Moderators, Tech Support

Post Reply
Lee L
Posts: 24
Joined: Fri Sep 29, 2006 4:50 pm
Location: St Johnsbury, VT
Contact:

Internal Variable for Date

Post by Lee L »

In the "Custom Reports Library" thread, Jeff said:
That said though, I assume you are looking for the month range that was entered when going in to the custom reports in fund accounting. Those months are stored as a two fiscal month objects and I just checked are still in scope during the report layout.

1. Add a field object to the report layout.
2. In the expression enter the following:
Code: m.pofrom.getchardate() + ' - ' + m.poto.getchardate()

If you added the field object to the title band, you should now have the text like "January 2005 - June 2005" on the top of your report. Keep in mind this is a very advanced topic and because you are referencing internal variables in the program, this may change in future version of PowerChurch Plus.
In version 9, what would be that same variable for a custom report in Music Library (Record Keeping)? I'm trying to make a custom report showing songs used during a given period, showing only enough of the fields to identify which version of the song was used. It would be helpful to the recipient of the report to know what date range is covered by that particular printing.
I know the variable above doesn't work, because I tried it - unknown variable. I'm making the custom report, rather than using a standard report, to save paper - one line per song, rather than 7.
Thanks!
Lee L
Union Baptist Church

Lee L
Posts: 24
Joined: Fri Sep 29, 2006 4:50 pm
Location: St Johnsbury, VT
Contact:

Post by Lee L »

Perhaps my original post is unclear. The "m.poto.getchardate" variable is for accounting; what is the similar date variable for Music Library? I tried the accounting variable, but it wasn't recognized in the Record Keeping module. Is this the wrong place to ask this question? Would it be more suitable to call tech support for this?
Again, thanks for any help, and I apologize for any offense.
Lee L
Union Baptist Church

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

Post by Zorak »

Hi Lee, no offenses, just a tough question.

To be able to pull information from your query, such as the from and to dates, you would need to do the following:

Code: Select all

aCondition[1,6]
This would print "( Last Used ranges from 10/01/2006 to 10/31/2006 )"

The 1 listed above represents the line number of the query. So, if you have three different conditions in the query and want to print the second one, it would be aCondition[2,6].

You can use a substr() to select only certain characters of that string.

Code: Select all

substr(aCondition[1,6],25,25)
This would print "10/01/2006 to 10/31/2006"
The above substr code reads as the following, start at the 25th character of the aCondition[1,6] string, and report the next 25 characters.

For further example, the following:

Code: Select all

substr(aCondition[1,6],3,21)
Would print "Last Used ranges from"

Lee L
Posts: 24
Joined: Fri Sep 29, 2006 4:50 pm
Location: St Johnsbury, VT
Contact:

Post by Lee L »

Thank you so much! I didn't realize it would be so different from the one in accounting, so thought I was asking an easy question. :oops: I really appreciate your answers, and your attention to the forum.
Lee L
Union Baptist Church

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

Post by Zorak »

No problem, Lee.

The aCondition[1,6] is something that you can use anywhere in custom reports, no matter what module you are working in. It is dealing directly with the query conditions.

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

Post by NeilZ »

In other words:

It will pull the dates you enter when you're setting up the initial query filters, correct ??

Nice !!
Neil Zampella

Using PC+ since 1999.

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

Post by Zorak »

Actually, it will pull the plain english query line entirely. The example was regarding a "between dates" condition.

So, it could also pull "( Household Key Last Name is not an empty field )" or anything else that you have as a query condition.

Post Reply