Archives

Great Links

It's Beginning to Look a lot Like Christmas

I’ve always loved Christmas Lights, but some people go overboard.

M2M can’t be decorated like that, but you can add a touch of holiday spirit. Follow the directions below and you can have your active cell indicator switch daily from green to red, the colors of Christmas.

Want to try it? Simply follow these steps:

Download this Zip file and unzip it. Essentially the colors.prg will change the color of the active control on M2M screens for every user. It flips them back and forth between red and green if run in the month of December. If run in any other month, it changes the color back to the default yellow.

You should try any code first on your test server. Now is a good time for the disclaimer:

Important: All information on this site is provided “as is” for informational purposes only.
In particular, all code samples are provided “as is” without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

If you should decide to use any of the code from this site, make sure you test it thoroughly on a test company (or better yet a test server) before you ever use it on your live data.

Copy the Visual FoxPro program files colors.prg and colors.FXP to your report program file directory. For example, mine is L:\M2MData\Reports\Prgs.

Next we have to create a “blank” report in Made2Manage. Open the RPMAKE screen, the simplest way to do so is to click Transfer and quickly type RPMAKE and then enter.

Click Add, enter a report ID such as “Colors” and a description such as “Holiday Colors.”

Add a “Default Data Source” by clicking Browse and navigating to colors.prg and then save the report.

Click on the Selections tab and click Add. Enter anything at all for selection name such as “Trash”. M2M reports will not run without a selection, but it doesn’t need to be valid.

As a test, open the report you created by clicking Transfer and then COLORS and run the report. Since the report isn’t printable, you will get the following screen.

Click OK to close, exit Made2Manage, and log back in to re-set your settings.

Open any form you normally would such as the Sales Order (SO) screen and click modify. The background of the control will now be light red. If you run the report and re-start M2M again, your highlighted control will be green.

How can you make the colors automatically switch every day for the month of December? Follow the instructions found in my Command Scheduler article to run this report each night.

When adding to Command Scheduler do not forget to set the frequency to “Daily.”

Besides being fun and festive for the holiday season, this type of customization can have a practical use as well. For example, one of the companies I work with doesn’t use calendar months but instead uses a system they call Red Fridays. The Red Fridays are determined before the year begins and each month ends with one. These can be found on the Accounting Years screen (AYRS). Anyway, I’ll adapt the code to change the background color to red on the last day of the period by querying the GLRULE table, and default it to yellow for the rest of the month.

Incidentally, if you decide you want to change your users default color back to yellow, simply substitute the yellow.prg and yellow.fxp files (after copying them to your report prgs folder) in your Holiday Colors report and run it. This will return everyone back to normal.

A big thank you goes to Ray at NightScaping for his help with the VFP code.

3 comments to It’s Beginning to Look a lot Like Christmas

Simple, but kicks up a little bit extra for the users. I don’t know that my company will go for it or not, but if it were my choice, then I would go ahead and implement it just to liven things up a bit.