Schulz Consulting

Consulting and Upgrades

  • Home
  • Services
  • Contact

How to show country names on forms using older MAS 90 and MAS 200 versions

July 30, 2009 by Wayne Schulz

mas90 country code information.jpg

To create country code on MAS90 and MAS 200 forms:

Earlier versions of MAS 90 and MAS 200 (typically prior to version 4.10 or 4.20) did not allow for easy linking of the country code name to the code itself.

While the country code could be placed on forms (Sales Orders, Purchase Orders, Checks) – the name of the country was not as easy to place for a few reasons –mainly that the data file required to pull the name from was not readily linkable.

Below is a workaround solution that you may find useful. It is primarily for MAS90 or MAS200 (it works on both) versions prior to 4.1 – so if you are using a later version you probably don’t need this procedure because Sage has wisely added country name to the tables that your forms are using.

All steps below require using Crystal Report Writer – which is included with your Sage MAS90 or MAS 200 product disks.

These are not beginner instructions – and assume some intermediate level comfort with Crystal Reports. Backup all your

For this example, assume that we are going to create a form for the ship to and bill to codes. The same logic here with slight modification can apply to any form with a bill/ship field.

Note: Technical information on creating a Crystal Sub report that shares variables is available from:

NOTE: Unfortunately links below to Crystal Reports technical documents appear to have been broken since Business Objects was acquired by SAP.

http://support.businessobjects.com/library/kbase/articles/c2007600.asp

1. Create a page header A that is above the main details (Note: It is important that this comes at the top of the page so that the shared variable calculates before the body of the report. If you do not put it at the top the whole thing doesn’t work). You will need to create a new header (Right click in the HEADER section area and select Insert Section Below. Once that section is created, right click on the section area again on the left side and select MOVE – then you can move it up).

2. Create a sub report for each Bill-To/Ship-To code. These will be placed into the page header created above.
a. Cty_ship
b. Cty_bill
c. Note: Link these back to the main table on the report. You’ll probably want to look in the Database – Visual Linking Expert to see what table is being used to hold your address information.

3. Within each of these subreports:

a. Create a formula as follows (Note: Vary the variable name depending on whether you are creating a bill to or ship to)

b. Place the above formula in the body of the subreport in the details section. Once on the report, right click the formula, select format field, then font, change the font to WHITE (or any shade that won’t show on the report)

c. Place the SY_Country.CountryName in the body of the subreport in the details section. Change the font to white so it doesn’t print on the final report.

d. Leave the Details section viewable – all other sections should be suppressed – ie headers/footers. (Note: If you suppress the details section this won’t work – so be sure to leave it viewable. The way to get around seeing the data on the report is to later change the font to white and make the field very tiny).

e. Make sure your subreport is linked from the SO1_SOEntryHeader.ShipToCountry to the SY_Country.CountryCode

f. When you’ve placed both sub reports into the header section you created above, right click on each subreport and de-select the “can grow” checkbox. (Note: If you do not remove the check you may get a “page size exceeded” message)

4. Within the main report create two variables
a. Country_bill
b. Country_ship

5. Now you can put this variable into your main report formula and the value from the subreport is carried over. The following is the example of it being worked into the @ship to address formula which is standard in the Sage SO Order and Invoice form.

6. Sample formula which has been modified with the new variable.

7. Important: Place the new variables onto the report in the main header section (NOT the sub report) – you can make the white fonts so they don’t print. You must make them viewable (Cannot suppress or this does not work).

BACKGROUND NOTES ON THIS ISSUE:

Q: Client wants to display the Country Code in the forms (SO Orders, Invoices, Purchase Orders, Checks).

A: (Prior to version 4.1 and 4.2) There is no simple way to do this in MAS90/MAS200 — though there are two standard approaches.

The first approach to adding MAS90 country names on forms

Use Alias Tables — this would allow for a table to be used in a report more than once. You give each table an “alias” and it would then allow you to link it to separate fields. This would be needed for the Country Code field because it is potentially a different result for either the Bill To or Ship To.

The problem in MAS90 4.x+ with the Alias Tables is that there is a bug of some sort preventing them from linking to the SY_Country field. This is documented in the Sage KB with the workaround to use a subreport (an ok solution but the country name is impossible to properly line up since it is a free floating field).

The better solution is to use shared variables within the report. Basically this involves creating a new section (header) at the top of the report (important because the variable has to be created before the rest of the report). Then you declare the variables as shared and they can be read from the header on down to the main body.

I did this through the SO and it seemed to work.

Here is the link to the Crystal KB article showing how to create shared variables:

http://support.businessobjects.com/library/kbase/articles/c2007600.asp

On the subreport, you have to create a main subreport, a formula (put this on the subreport) and a shared variable (reference this on the main report).

In the main report you have to create a formula, call up the shared variable (see the Crystal KB for syntax) and then use it in the address formula. Do not forget to put the formula itself onto the form or the value won’t compute.

You want to make the font be white on white. Do NOT suppress and printing or the calculation does not work. If you make it very small you can hide it on the form.

IMPORTANT NOTE: This information is being made available “AS-IS”. Prior to making any changes on your system be sure you have a backup of all forms being modified.

Subsequent upgrades to MAS 90 or MAS 200 table structures may render some (or all) of these instructions obsolete. Sage may also fix bugs that we’ve referred to above. These instructions are meant to serve as a starting point for your own use – and not as a detailed step by step guide to resolving any particular issue. We take no responsibility for updating these instructions. We are not able to provide support (except for our own MAS 90 support clients) on implementing these instructions.

Share this:

Filed Under: Crystal Reports, Hidden Options, Knowledgebase, Sage 100 ERP, schulz consulting, Tips and Tricks Tagged With: country code, Crystal Reports, forms, how to, mas200, sage, Sage 100 ERP, schulz consulting, Wayne Schulz

Secure cloud hosting for Sage 100
Call 1-888-244-6559 (toll-free)

About Wayne Schulz

Wayne Schulz is a Sage 100 Consultant located in Connecticut. He has worked with Sage 100 since 1986 and provides advanced support to companies located throughout the United States. If you are experiencing an issue with Sage 100 and would like to schedule a support session - please request assistance here or call 860-657-8544.

Access Sage 100 in the cloud today. 3rd party applications supported Available 24/7 from anywhere. Dedicated hosts

Call 1-888-244-6559 (toll-free)

Search Our Site

Sage 100 Newsletter

Sage 100 News

  • When Will Sage 100 2023 Be Released?
  • Sage 100 Updated TLS 1.2 Licensing Requirements ( February 2023 )
  • Shipment Tracking Functionality Restored to Sage 100
  • How To Edit 1099 Totals In Sage 100
  • How to Reconcile Sage 100 Accounts Payable Detail to the General ledger
  • Sage 100 Year-End 2022 Training Series
  • Minimum Sage 100 Versions for E-Filing for Tax Year 2022
  • What Are The Differences Between These Sage Fixed Asset Versions: Lite, Single-User, Network and Premier?
  • Sage 100 Paperless Email Electronic Delivery Failing With Rackspace
  • How To Check Sage 100 Compatibility with Avalara’s TLS 1.2 Requirement

Contact Us

Schulz Consulting
Connecticut Office
Click Here To Contact Schulz Consulting
Email Us
Available remotely nationwide.
We are a local branch of DSD Business Systems Connecticut.

Copyright © 2023 · Parallax Pro Theme on Genesis Framework · WordPress · Log in