Wednesday, July 1, 2009

Copy Fields for Jocelyn

Here's what the Calculated Fields section looks like for the Direct Deposit Earnings Statement:
This to answer Jocelyn's question on Copying calculated fields.

CalculatedFields
{
CalculatedField "SickAvail"
{
EvaluateAfter ""
Expression " ( 'UPR_WORK_Check'.'Sick Time Available' - 'UPR_WORK_Check'.'Sick Time Hours' ) * 0.01000 "
ResultType "Currency"
}
CalculatedField "VacAvail"
{
EvaluateAfter "SickAvail"
Expression " ( 'UPR_WORK_Check'.'Vacation Available' - 'UPR_WORK_Check'.'Vacation Hours' ) * 0.01000 "
ResultType "Currency"
}
CalculatedField "Sick Time Total"
{
EvaluateAfter ""
Expression " ( 'UPR_WORK_Check'.'Sick Time Available' - 'UPR_WORK_Check'.'Sick Time Hours' ) * 0.01000 "
ResultType "Currency"
}
CalculatedField "Vacation Time Total"
{
EvaluateAfter "Sick Time Total"
Expression " ( 'UPR_WORK_Check'.'Vacation Available' - 'UPR_WORK_Check'.'Vacation Hours' ) * 0.01000 "
ResultType "Currency"
}

Copy Calculated Fields in Report Writer

Yes you can! The secret is in the editing of the .package file.

Let's imagine you want to use the rw_SelectAddrLine user-defined function to create the address block in the SOP Blank Invoice Form. KB (862653) entitled "Description of the rw_SelectAddrLine Report Writer function" will show you that 9 calculated fields could be required if you want to use all of the available fields in the address block. If you like going through that drill, the process definitely works.

I prefer the copy and paste method. What you need to do is create a couple of the calculated fields as directed in the article and then export the modified report to a .package file. Open the package file using the text editor of your choice and then copy and past until you have what you need. For the SOP Blank Invoice Form here is the text you can past into the calculated field portion of your report.

The calculated fields below skip the 'Name' field (the first variable)
CalculatedField "Ship To Address Line 1" { EvaluateAfter "" Expression "'rw_SelectAddrLine'( 1 \"\" 'SOP_HDR_WORK'.'Contact Person''SOP_HDR_WORK'.'Address 1''SOP_HDR_WORK'.'Address 2''SOP_HDR_WORK'.'Address 3''SOP_HDR_WORK'.'City''SOP_HDR_WORK'.'State''SOP_HDR_WORK'.'Zip Code''SOP_HDR_WORK'.'Country' ) " ResultType "String" } CalculatedField "Ship To Address Line 2" { EvaluateAfter "" Expression "'rw_SelectAddrLine'( 2 \"\" 'SOP_HDR_WORK'.'Contact Person''SOP_HDR_WORK'.'Address 1''SOP_HDR_WORK'.'Address 2''SOP_HDR_WORK'.'Address 3''SOP_HDR_WORK'.'City''SOP_HDR_WORK'.'State''SOP_HDR_WORK'.'Zip Code''SOP_HDR_WORK'.'Country' ) " ResultType "String" } CalculatedField "Ship To Address Line 3" { EvaluateAfter "" Expression "'rw_SelectAddrLine'( 3 \"\" 'SOP_HDR_WORK'.'Contact Person''SOP_HDR_WORK'.'Address 1''SOP_HDR_WORK'.'Address 2''SOP_HDR_WORK'.'Address 3''SOP_HDR_WORK'.'City''SOP_HDR_WORK'.'State''SOP_HDR_WORK'.'Zip Code''SOP_HDR_WORK'.'Country' ) " ResultType "String" } CalculatedField "Ship To Address Line 4" { EvaluateAfter "" Expression "'rw_SelectAddrLine'( 4 \"\" 'SOP_HDR_WORK'.'Contact Person''SOP_HDR_WORK'.'Address 1''SOP_HDR_WORK'.'Address 2''SOP_HDR_WORK'.'Address 3''SOP_HDR_WORK'.'City''SOP_HDR_WORK'.'State''SOP_HDR_WORK'.'Zip Code''SOP_HDR_WORK'.'Country' ) " ResultType "String" } CalculatedField "Ship To Address Line 5" { EvaluateAfter "" Expression "'rw_SelectAddrLine'( 5 \"\" 'SOP_HDR_WORK'.'Contact Person''SOP_HDR_WORK'.'Address 1''SOP_HDR_WORK'.'Address 2''SOP_HDR_WORK'.'Address 3''SOP_HDR_WORK'.'City''SOP_HDR_WORK'.'State''SOP_HDR_WORK'.'Zip Code''SOP_HDR_WORK'.'Country' ) " ResultType "String" } CalculatedField "Ship To Address Line 6" { EvaluateAfter "" Expression "'rw_SelectAddrLine'( 6 \"\" 'SOP_HDR_WORK'.'Contact Person''SOP_HDR_WORK'.'Address 1''SOP_HDR_WORK'.'Address 2''SOP_HDR_WORK'.'Address 3''SOP_HDR_WORK'.'City''SOP_HDR_WORK'.'State''SOP_HDR_WORK'.'Zip Code''SOP_HDR_WORK'.'Country' ) " ResultType "String" } CalculatedField "Ship To Address Line 7" { EvaluateAfter "" Expression "'rw_SelectAddrLine'( 7 \"\" 'SOP_HDR_WORK'.'Contact Person''SOP_HDR_WORK'.'Address 1''SOP_HDR_WORK'.'Address 2''SOP_HDR_WORK'.'Address 3''SOP_HDR_WORK'.'City''SOP_HDR_WORK'.'State''SOP_HDR_WORK'.'Zip Code''SOP_HDR_WORK'.'Country' ) " ResultType "String" } CalculatedField "Ship To Address Line 8" { EvaluateAfter "" Expression "'rw_SelectAddrLine'( 8 \"\" 'SOP_HDR_WORK'.'Contact Person''SOP_HDR_WORK'.'Address 1''SOP_HDR_WORK'.'Address 2''SOP_HDR_WORK'.'Address 3''SOP_HDR_WORK'.'City''SOP_HDR_WORK'.'State''SOP_HDR_WORK'.'Zip Code''SOP_HDR_WORK'.'Country' ) " ResultType "String" } CalculatedField "Ship To Address Line 9" { EvaluateAfter "" Expression "'rw_SelectAddrLine'( 9 \"\" 'SOP_HDR_WORK'.'Contact Person''SOP_HDR_WORK'.'Address 1''SOP_HDR_WORK'.'Address 2''SOP_HDR_WORK'.'Address 3''SOP_HDR_WORK'.'City''SOP_HDR_WORK'.'State''SOP_HDR_WORK'.'Zip Code''SOP_HDR_WORK'.'Country' ) " ResultType "String" }

Thursday, May 7, 2009

Monday, February 9, 2009

Convergence 2009

Who's coming to Convergence? I'll be there and I hope you all will stop by the Hands-on Labs and say 'hello'.

My friend and fellow MVP Mark Polino will be presenting a fact-filled and fun session - 50 tips in 50 minutes. He's a blast, and his session should not be missed!

I still use the image on his last slide from 'SQL Saturday' as my splash screen. "Microsoft - change the world or go home"

If you copy any .bmp file into the GP folder and name it 'splash.bmp' it will display while Dynamics GP is loading.

Look out New Orleans! GP is coming to town!

Leslie

Problem ascertaining product version

Have you ever launched Dynamics GP Utilities and received the error below?

Error message when you access Microsoft Dynamics GP 10.0 Utilities: "There was a problem ascertaining product version information. Microsoft Dynamics GP Utilities will now exit. Check DUinstall.log for more information"

KB article 952054 discusses the error, but doesn't tell you how to fix it. I've had this come up a couple of times. In both cases the client was attempting their own update. Usually they were changing servers or upgrading to SQL 2005 at the same time.

The fix is in. When you are moving your installation of GP, restore the databases FIRST and then install the software. If you do it the other way around you will get this error message and then it's difficult to diagnose.

Remember - databases first, then application.

I hope this helps someone out there in GP-Land.

Kind regards,

Leslie