Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Suppressing Address 2 field on any Project Accounting Invoice Format


View products that this article applies to.

TechKnowledge Content

Question:

How do I suppress the Address 2 field on any Project Accounting Invoice Format?

Answer:

First, open Report Writer, (Tools - Customize - Report Writer), and locate the Invoice Format you are using. Open the report. From the Report Definition window, click on Layout and go into the Toolbox. From the drop-down box, choose Calculated Fields. Create the following three calculated fields. (Click on New to create a new calculated field.)

Calculated Field 1:

Name: citystatezip

Result Type: String

Expression Type: Calculated

Calculated Expression:

1. From the Functions tab, select System Defined, and choose STRIP. Click Add.

2. From the Fields tab, select the PA Bill HDR TEMP or PA Invoice Format HDR TEMP (This file will depend on the Invoice Format Type you are using) with the field being City. Click Add.

3. Click on CAT in the operators group.

4. From the Constants tab, the type will be String. Click the space bar the number of spaces you want between the city and state field. Click Add. It will add ''.

5. Click on the CAT button.

6. From the Function tab, choose STRIP. Add.

7. From the Fields tab, select the PA Bill HDR TEMP or PA Invoice Format HDR TEMP with the field being State. Add.

8. Click on the CAT button.

9. From the Constants tab, the type will be String. Click the space bar the number of spaces you want between the state and zip code field. Click Add. It will add ''.

10. Click on the CAT button.

11. From the Functions tab, select STRIP. Add.

12. From the Fields tab, select the PA Bill HDR TEMP or PA Invoice Format HDR TEMP with the field being Zip.

13. Click OK to save the calculated field.

The expression should look like this:

STRIP(PA_Billing_HDR_TEMP.City ) # " " # STRIP(PA_Billing_HDR_TEMP.State ) # " " # STRIP(PA_Billing_HDR_TEMP.Zip )

OR

STRIP(PA_Invoice_Format_HDR_TEMP.City ) # " " # STRIP(PA_Invoice_Format_HDR_TEMP.State ) # " " # STRIP(PA_Invoice_Format_HDR_TEMP.Zip )

Calculated Field 2:

Name: Address2calc

Result Type: String

Expression Type: Conditional

Conditional Expression:

1. From the Fields tab, select the PA Billing HDR TEMP or PA Invoice Format HDR TEMP file with the field being Address 2. Add.

2. Click on the = in the Operators group.

3. From the Constants tab, the type will be String. Do not type in any values; click Add (will add '''').

4. Add the following True and False Case entries:

True Case:

From the Fields tab, select Calculated Fields. From that, select the citystatezip. Click Add.

False Case:

From the Fields tab, select the PA Billing HDR TEMP or PA Invoice Format HDR TEMP with the field being Address 2. Click Add.

5. Click OK to save the calculated field.

Calculated Field 3:

Name: newcitystatezip

Result Type: String

Expression Type: Conditional

Conditional Expression:

1. From the Fields tab, select the PA Billing HDR TEMP or PA Invoice Format HDR TEMP file with the field being Address 2. Click Add

2. Click on the = in the Operators group.

3. From the Constants tab, the type will be String. Do not type in any values; click Add (will add '''').

4. Add the following True and False Case entries:

True Case:

From the Fields tab, select the PA Billing HDR TEMP file with the Field being Country. Click Add.

False Case:

From the Fields tab, select the Calculated fields with the field being citystatezip. Click Add.

5. Click OK to save the calculated field.

Calculated Field 4:

Name: country

Result Type: String

Expression Type: Conditional

Conditional Expression:

1. From the Fields tab, select the PA Billing HDR TEMP or PA Invoice Format HDR TEMP file with the Field being Address 2. Click Add.

2. Click on the = in the Operators group.

3. From the Constants tab, the type will be String. Do not type in any values; click Add (will add '''').

4). Add the following True and False Case entries:

True Case:

From the Fields tab, select the PA Billing HDR TEMP or PA Invoice Format HDR TEMP file with the field being Country. Click Add.

False Case:

From the Fields tab, select the Calculated fields with the field being newcitystatezip. Click Add.

5. Click OK to save the calculated field.

Calculated Field 5:

Name: newcountry

Result Type: String

Expression Type: Conditional

Conditional Expression:

1. From the Fields tab, select the PA Billing HDR TEMP or PA Invoice Format HDR TEMP file with the field being Address 2. Click Add.

2. Click on the = in the Operators group.

3. From the Constants tab, the type will be String. Do not type in any values; click Add (will add '''').

4. Add the following True and False Case entries:

True Case:

From the Constants tab, the type will be String. Click Add.

False Case:

From the Fields tab, select the PA Billing HDR TEMP or PA Invoice Format HDR TEMP file with the field being country. Click Add.

5. Click OK to save the calculated field.

Remove the Address 2 and City-State-Zip Code from the Report Layout. Replace them with the calculated fields Address2calc and newcitystatezip and newcountry.

Close out of the Layout and save your changes. Go back to Dynamics, (File - Great Plains Dynamics, and grant security to the modified report (Setup - System - Security).





This article was TechKnowledge Document ID: 20520

↑ Back to the top


Keywords: kb, kbhowto, kbinfo, kbnosurvey, kbMBSMigrate, kbMBSPartner, Bemiskb871835

↑ Back to the top

Article Info
Article ID : 871835
Revision : 1
Created on : 3/11/2017
Published on : 3/11/2017
Exists online : False
Views : 228