These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#35041 - 02/20/11 02:55 AM PSM/PP Calendar Application
cube Offline
OL User

Registered: 09/03/10
Posts: 76

I need to implement a PSM application as described below.

It is a calendar for an auto servicing center. The auto servicing center will distribute this calendar to their customers after they service their cars. It will be the usual calendar with the months and their dates in a grid. Using VDP they want to highlight (circle, or point an arrow at) the day in the calendar on which the customers next service date falls for their car. The date will be available in the data stream e.g. 20/02/2011.

Can you please guide and point me in the right direction regarding how I can accomplish the above using PSM (as per the client requirement). If this is not possible in PSM (I have just started using it, so I am note sure yet), how about in PlanetPress.

I was suggested by a colleague to do the following, but I wonder if there could be a more manageable and efficient method.

The basic rule is to break the date into day & month.

Then on each month, you need to add 28-31 expressions which are positioned over each day.

The expression will be something like this..


So, when the data is true, the pointer - which could be any character, will show.

The hard part is creating variable expressions - each with it's own name on each day of each month.

Any input for a better method is much appreciated.

Thanks in advance.
There is no Knowledge that is not Power - MK

#35042 - 02/20/11 07:22 AM Re: PSM/PP Calendar Application [Re: cube]
Sander vd Berg Offline
OL Expert

Registered: 06/10/08
Posts: 207
Loc: Objectif Lune NL
I assume you have a separate layout for each month?

In that case you will only need 31 expressions since LAYOUT_NR can refer to the month.

The expressions can be simplified by introducing separate variables that extract the day and month part and return it as a numeric value.

@day01@: IF (@day_part@ = 1 AND @month_part@ = LAYOUT_NR(), ">", "")
@day02@: IF (@day_part@ = 2 AND @month_part@ = LAYOUT_NR(), ">", "")
@day_part@: VAL(LEFT([Date], 2))
@month_part@: VAL(MID([Date], 4, 2))

That said, with a separate layout for each month you still need 31 text boxes (or image boxes for a fancier effect) duplicated 12 times each.

Now assuming your database has one record for each recipient, I would suggest using a single layout and making everything variable.

In the layout properties, set Number of Copies to 12. You can then calculate the month index using PAGE_NR and MOD:

@day01@: IF (@day_part@ = 1 AND @month_part@ = @month@, ">", "")
@day02@: IF (@day_part@ = 2 AND @month_part@ = @month@, ">", "")
@month@: MOD(PAGE_NR() - 1, 12) + 1

Assuming you have a background PDF containing 12 pages, one for each month, you can simply set the Page Number expression of the image object to "@month@".

If you do it like this, you only need 31 expressions plus 31 objects for the markers.

#35080 - 02/23/11 04:09 AM Re: PSM/PP Calendar Application [Re: Sander vd Berg]
cube Offline
OL User

Registered: 09/03/10
Posts: 76
Hi Sander,

Thanks a lot for your detailed input. I will try it out in PSM.

However, I have managed to implement it in Planet Press. I have used a PDF file as background in PP which has the calendar in a grid, all months on one page. Then using PPTalk I move a red outlined box on top of the required date.

Thanks again for your efforts, really appreciate it.
There is no Knowledge that is not Power - MK