Friday, June 20, 2014

GP 2013 Web Client trouble

"The host name cannot contain special characters such as an asterisk (*)."

That is the message we were getting after the SSL certificate we used for our demo GP 2013 web client expired and was replaced.

The problem occurred when we tried to replace the certificate with an updated one.  The install was giving us trouble.  We received the message when we tried to select the certificate on installation.

What would happen is we would select the certificate, which was installed on port 443 of IIS just fine, and the web client installer would fill in the "Host Name" from the certificate.

The problem is it would fill in the Host Name along with OU and CN reference in a comma-delimited string.


Look closely at the data in the Host Name field - you can see it starts to run on with extra characters above and beyond the fully qualified domain name of the server.  THAT is the cause of the error we were getting.


It took us much tail chasing but we found if you cleared the rest of the data after the server FQDN then the error goes away and the install completes.



Tuesday, June 17, 2014

Dynamics GP Account Framework

One of the strengths of Dynamics GP is its flexibility in accommodating differing GL account formats.  To support this you must declare on installing GP the size of the account framework that is needed to contain that account format.  Back in the old days (anyone remember Btrieve?) you made the framework only as large as you needed it to be because if you made it too large you paid a performance penalty.

Now that we are in SQL Server the framework does not bear that much of a burden so we are free to pick and choose as large a framework as we need.  There are limits to what GP allows when you define the framework but we've generally settled on 66 characters in 8 segments.  This choice defaults to 8 characters per segment and that works for all of our clients.

The reason the framework is so important is because it is tied to the underlying table formats.  You must declare your framework as almost the first thing you do after the installation.  Here are the typical high-level installation steps:

1. Install Dynamics GP software.
2. Run GP Utilities and create your companies.
3. Run GP and configure your companies.

Again that is high-level, there's plenty of detailed steps involved in each of these.  But step 2 involves the declaration of your account framework and I'd argue it's more important than anything else you do.  Here's why.

The account framework sets the boundaries of the general ledger account number you can configure in GP.  Before you even select GP as a solution you should be firm in what you require for your account number format.  Such knowledge stems from an in-depth understanding of your business and financial reporting needs.  A wrong decision here could be expensive - it may help to engage a GP consultant that has expertise in account design.

Regardless of the account number format you choose, unless it put you over the framework I mention above (and I'd love to hear from you if you do) you could use the framework I suggest above.  You should have no problem defining your account format inside of that.

Here comes the interesting part of this.  If you are moving from one framework to another things get really sticky.  The reason is that GP extends its schema to match the framework you choose.

This is the real reason why this decision is so important.  If you are trying to move a company database from one framework from a different one you simply cannot do so unless you change the schemas to match.

The Account Master table, GL00100, is a great showcase for this.  If you look in this table you will see a number of columns right up-front named ActNumbr_1, ActNumbr_2, etc.  The length of these columns is defined by the account framework.  For reasons I've forgotten GP rounds up to the next odd number.  The number of these columns is also declared in this framework.

If you declare a maximum account length of 15 characters in 4 segments of length 3, 6, 4 and 2 then you will get ActNumber lengths of 3, 7, 5 and 3.

My suggested universal framework of 66 characters in 8 segments of 8 characters each results in 8 ActNumbr columns of 9 characters each.  This would easily contain the 4 segment account framework defined in the previous paragraph plus allow much larger account number formats in other companies that might be required.

When you install the GP client you run Utilities the first time before you use it.  What this does is connect to the Dynamics database and read the account framework so it knows what column lengths it needs to accommodate.  When you introduce a database with a different column length that that defined by your framework the GP client will protest with a bunch of different errors and will basically not work with that company.

If you run into this situation there is only one solution: Re-Formatter from Corporate Renaissance Group.  It will allow changing your account framework from one to another.  Worth every penny if you need to do this and highly recommended.

So choose your account framework carefully.  And if all else fails go to www.crgoup.com.



Tuesday, June 10, 2014

Concatenating row data in SQL Server

Saw this T-SQL challenge coming but hated to have to do it because I know how hard it is.

To meet the requirements of a third party system at a client I had to string together multiple values into a single row.  This one is a challenge as illustrated by an excellent article that shows many different ways to accomplish this in SQL.

The "use case" example here is we have one check that pays many invoices.  So we need to output the check information with the related invoice information (number, date) strung together in a semi-colon separated string.

This is not something Transact-SQL is able to manage directly.  Instead you need to pick one of the work-around options from the aforementioned article and go with it.

I first tried the "Table valued UDF with a WHILE loop", but that only returned a single invoice date when I had three of the same invoice dates because it used the MIN() function.

My next choice, that seems to be working so far, is "The blackbox XML method" without the "DISTINCT" clause, again to avoid eliminating duplicate values.  This one uses the FOR XML PATH () clause in SQL

Here is an example:

Check # 123 dated 5/23/2014 pays invoices R21, D44 and X99 dated 3/31/2014, 3/31/2014 and 4/23/2014.  The output should look like this:

Check: 123
Date: May 23, 2014
Invoice Number: R21; D44; X99
Invoice Dates: March 31, 2014; March 31, 2014; April 23, 2014

In essence we are flattening a one-to-many relationship retaining the unique values on the many side.

I'm hoping this technique holds up in testing.

Wednesday, June 4, 2014

Watermarks in SQL 2008 R2 Reporting Services

I used to think it was a lot harder to add watermarks to an SSRS report but in this version it's not hard at all.  After all the watermark is just a "background image" and that is fairly easy to add to a report.
  1. Create or obtain an image file (jpg, png, bmp) containing the watermark you desire.
    • In my case I was placing a "COPY" watermark under a check image.
    • I used Paint to create this image file.
      • Set the Image Properties according to your SSRS page size.
      • I set the Units to "Inches" and the Width and Height according to my margins.
      • As I set .25" margins on all sides of the 8.5x11" report page my width was 7.5 and height was 10.
    • Save the image file.
  2. Import the image file into your SSRS report.
    • In the Report Data pane add the image to the Images folder.
  3. Right click the background of the SSRS report to get Body Properties.
    • Set the Background Image accordingly.
    • "Select the image source" to "Embedded".
    • "Use this image:" drop down should have your imported image file.
The image should show as your background under your report objects.  Note that you may have to set the BackgroundColor properties of objects overlaying the image in the report to "No Color" if they obscure the image.





Tuesday, June 3, 2014

Dynamics GP 2013 R2

This product is RTM and ready for download.  I'm installing it now in a new virtual with Fabrikam and hope to have results soon.


I have a couple stalled GP 2013 upgrades I'm considering bumping to this release.


In the meantime the GP support blog has the goods!

GP 2013 and Terminal Server

Just found reference to some good Terminal Server Dex.ini settings on this blog.

Also a list of Dex.ini settings can be found here.

I just put the DefaultLastUser=FALSE to work at a client and it worked perfectly.