Cannot Hide Birth Year in Custom Report

Moderators: Moderators, Tech Support

Post Reply
lmconn
Posts: 56
Joined: Mon May 13, 2013 12:41 pm
Location: Dothan, AL

Cannot Hide Birth Year in Custom Report

Post by lmconn »

Hello, this is my first post so please bear with me.

Using PC 11.5 on a Windows 7 computer. Accessing the files over a network (haven't had problems with this).

My problem is that the default code for hiding the birth year in a report is not working. When I use SUBSTR(DTOC(born),1,5) it displays "mm/dd" in each field instead of the correct data. This is a custom report under Activities & Skills. I've been able to figure out other expressions, but this one's driving me crazy.

Any ideas? Or am I just doing something wrong?

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

Re: Cannot Hide Birth Year in Custom Report

Post by NeilZ »

lmconn wrote:Hello, this is my first post so please bear with me.

Using PC 11.5 on a Windows 7 computer. Accessing the files over a network (haven't had problems with this).

My problem is that the default code for hiding the birth year in a report is not working. When I use SUBSTR(DTOC(born),1,5) it displays "mm/dd" in each field instead of the correct data. This is a custom report under Activities & Skills. I've been able to figure out other expressions, but this one's driving me crazy.

Any ideas? Or am I just doing something wrong?
I'm going to ask the obvious question: is BORN the actual data item ??
Neil Zampella

Using PC+ since 1999.

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

Re: Cannot Hide Birth Year in Custom Report

Post by Zorak »

That looks right to me, so I created a new report, pasted your expression into a field on the report and it printed the actual month/day of the birthdays in the list. "Born" is one of the built-in date fields, the name of the Birth Date field and not something that you can change, so it shouldn't be an issue with the name of the field.

In researching a little further, I was able to recreate this by entering MM/DD in the "Format Expression" field on the Format tab of the Field Properties screen. Double click on the field in the Report Designer to get there.

lmconn
Posts: 56
Joined: Mon May 13, 2013 12:41 pm
Location: Dothan, AL

Re: Cannot Hide Birth Year in Custom Report

Post by lmconn »

PC gives me "Qmf_temp.born" for the field, which works fine by itself. When I change it to SUBSTR(DTOC(Qmf_temp.born),1,5) it returns "mm/dd". I've tried leaving it SUBSTR(DTOC(born),1,5), but that returns the same thing "mm/dd".

lmconn
Posts: 56
Joined: Mon May 13, 2013 12:41 pm
Location: Dothan, AL

Re: Cannot Hide Birth Year in Custom Report

Post by lmconn »

Zorak wrote:In researching a little further, I was able to recreate this by entering MM/DD in the "Format Expression" field on the Format tab of the Field Properties screen. Double click on the field in the Report Designer to get there.
Aha! Now I've got it to working. Here are some things I tried:
1. Changed the expression to SUBSTR(DTOC(born),1,10), just to see what I would get. It displayed "mm/dd/1900", actually printing the year of the data, but not the month or day, which is weird.
2. Went to the Format tab and changed it to "MM/DD/YYYY", which returned "MM/DD/1900." Still incorrect, but it changed the case of the Ms and Ds.
3. Finally went into the Format tab and just deleted all the text in the "Format Expression:" field. This returned "01/01/1900", the actual date in the person's data. Which is correct.
4. Went back and fixed the expression to SUBSTR(DTOC(born),1,5), which now displays only the month and day of birth.

Thanks to everyone for pointing that out and helping me figure it out.

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

Re: Cannot Hide Birth Year in Custom Report

Post by Zorak »

Sorry, I should have made the last sentence in my post "Clear the Format Expression field out if you have typed anything in there." :)

Post Reply