Using Macros in Sage 300 Construction

Feb 18, 2019

Sage 300 CRE tips and tricks

A long over-looked piece of the core Sage 300 Construction and Real Estate products are the Macros.  Macros are available in all the core accounting modules except Inventory, Purchasing and Service Management.

Macros can be used to automate a series of tasks.  Here are just a few examples:

  • Running a group of reports all at the same time
  • Importing Accounts Payable or Accounts Receivable Invoices
  • Importing Direct Costs into Job Cost

Macros can be run On-Demand (when you choose) or by scheduling them to run at a specified time using Microsoft Scheduler.

Here’s a closer look at using Macros in Sage 300 Construction.

Example of a Macro in Payroll

Let’s use an example where the payroll department runs a series of Payroll Reports at the end of each Pay Period.  For our example, the user runs the following reports at the end of each Payroll Period:

  • Check Register
  • Deposit Summary
  • Deduction Register
  • Fringe Register

Rather than selecting an running each report individually, we can create a Macro and then at the end of each Pay Period, simply select the Macro instead of selecting each report separately.

Since we are going to be running Payroll related reports, we will create our Macro from Payroll following these steps:

Open the Payroll Application > select Tools > select Macros

On the next screen, choose the Add Step button since this is a new Macro.

This window will then appear:

adding a new macro step

From here, select the task that should be executed.  In this case, Reports, Pay Period Processing, Check Register, as shown below.

macro menu

Continue with this step in the Macro, just as if you are running the actual report.  Select the files(s) to be used with this report. In this case, we selected the Current PR Transaction File, then click OK to continue.

data file selection

As seen below, this report prompts for a Report Date and a Period End Date Range.  Enter as appropriate and then select OK.

check register

Since this report prompts the user for the Report Date and the Period End Date Range, we are prompted to “Allow prompt field values to be changed at macro run time?“.

Since we will be running this Macro after each Pay Period and because we want the Macro to reflect the Current Pay Periods Check Activity, we will need to be able to enter the current Pay Period End Dates when running the Macro.  Answer Yes.

Now select “Continue with remaining steps in macro” if the Macro is unsuccessful.  In this case, it may make sense to continue.  If running a Macro to import and post Imported Accounts Payable Invoices, we may not want to continue if the Macro fails.

Click OK to continue

Macro completion

We now have recorded our first step in our Macro.

Completed Macro

Since we determined we will run additional reports, I will add the reports using the same functionality as described in the previous pages.

For the sake of space, below are the summary steps I took to record adding the following reports:

To add the Deposit Summary

  • Select Add Step
  • Select Reports – Pay Period Processing – Deposit Summary
  • Select Current as the PR Transaction File, then click OK
  • Enter the Period End Date Ranges, then click OK
  • Answer Yes to Allow prompt field values to be changed at macro run time?
  • Answer Yes to continue if the Macro Fails

We now have two steps in our Macro:

completed macro deposit summary

To add the Deduction Register

  • Select Add Step
  • Select Reports – Register – Deduction Register
  • Select Current as the PR Transaction File, then click OK
  • Enter the Period End Date Ranges, then click OK
  • Answer Yes to Allow prompt field values to be changed at macro run time?
  • Answer Yes to continue if the Macro Fails

We now have three steps in our Macro:

macro deduction register

To add the Fringe Register

  • Select Add Step
  • Select Reports – Register – Fringe Register
  • Select Current as the PR Transaction File, then click OK
  • Enter the Period End Date Ranges, then click OK
  • Answer Yes to Allow prompt field values to be changed at macro run time?
  • Answer Yes to continue if the Macro Fails

We now have all four steps in our Macro:

fringe register macro

Now click the Save As button at the top of the window to save the Macro.

Enter the file name to save the Macro as.  By default, the folder opened, is the data folder where the Company Data is located.  In most cases, this should be where the Macros are stored.

Click Save to continue.

saving macro

Once the Macro has been saved, click the Close button back on the Macro screen.

Running the New Sage 300 CRE Macro

To run the new Macro, follow these steps.

From the Payroll menu, choose Tools and then Macros.

sage 300 cre payroll menu

On the Macros screen that appears next, choose the Open button at the top.

On the next screen that appears, Select the Saved Macro.  In this example, you’ll choose Weekly Payroll Reports.mac.  Click Open to continue:

choose macro file

Once the Macro is opened, select the Run button at the top of the Macros screen:

run macro

Since our Macro contains multiple reports – each prompting for Period End Date Ranges – enter the appropriate Period End Date Ranges for each Report.  Click OK after entering the dates for each report.

Check Register

check register

Deposit Summary

deposit summary

Deduction Register

deduction register

Fringe Register

fringe register

After entering the date ranges for the final report.  All reports will be processed and printed, in background tasks.

macro background tasks

Things to Note About Macros

If you have “Print to File” selected as the system default, you will be prompted to enter the appropriate file name for each report being run within the Macro.

You can set the default Printer Options while recording the Macro, just is if you were printing the report, in real time.

As you have seen, in this case, when running the Macro, the user is required to enter the Period End Date Range to include on each report. You may want to consider modifying each report to have the report automatically include only the most recent Pay Period End Date, thus eliminating the need to enter the date ranges when running the Macro.  The original reports will still be available to run on demand, while the Macro would use the newly modified reports   Contact your Sage Consultant if you need assistant in modifying any of these reports.

The steps included in the Macro can be printed by following these steps:

  1. From the Tools Menu, select Macros
  2. Click Open, select the desired Macro, and then click Open
  3. From the File Menu, select Print, make the Print Selections required
  4. Click Start

Reports can be emailed from the Macros by selecting the Send Button from within the Print Hub, when recording the Macro. Select the SEND button, enter the email info, click Send.  Note, when sending from Sage through Outlook, you will be prompted to Allow Outlook to continue.

Need Help with Sage 300 CRE Macros?

Leave your name below to get in touch.

One of our Sage Construction software consultants will follow up shortly to offer assistance.

ARTICLES BY TOPIC


GET OUR NEWSLETTER

GET OUR NEWSLETTER

Join 12,000+ other Contractors and Construction Pros that get our free tech tips delivered straight to their inbox!

Success! Thanks for subscribing and keep an eye on your inbox for our next article.

Share This