Tampilkan postingan dengan label Word Templates. Tampilkan semua postingan
Tampilkan postingan dengan label Word Templates. Tampilkan semua postingan

Minggu, 28 Desember 2014

The Dynamics GP Blogster Best Articles of 2014

The Dynamics GP Blogster Best Articles of 2014

How about this 2014 year, ah? Two major releases in Microsoft Dynamics GP 2013 R2 only to top off the year with the recent release of Microsoft Dynamics GP 2015. More than 30 new features in 2013 R2 (over 150 if you include those released in GP 2013 RTM) and now over 120 new features in Microsoft Dynamics GP 2015, including the cornerstone .NET interoperability and Service Based Architecture components, it's no wonder why the Microsoft Dynamics GP Product Management and Product Development teams deserve a massive showing of the hands on this one! Congratulations team on a job well done.

Let's not forget about the events either: the wildly successful Microsoft Convergence 2014 Atlanta, the hugely concurred GPUG Summit 2014 St. Louis, and what's got to be the most anticipated partner event since the days of Stampede, reIMAGINE 2014 in Fargo. All these events drove the vision of t

Travel was also off the chain for me: Johannesburg, South Africa; St. Louis, Missouri; Fargo, North Dakota; Boston, Massachusetts; Las Vegas, Nevada; Green Bay, Michigan; Kansas City, Missouri; Shreveport, Louisiana; and the list goes on! Over 70,000 miles of airline travel, 100+ nights of hotel lodging, and tons of driving miles, ah!... and the ALS ice bucket challenge in between.

Nonetheless, every year I try to bring interesting topics to the blog, an insight into the events I attend, and definitely, those troubleshooting and development articles that are life savers when you need them most. So without further due, here's a sample of some of the best articles you liked throughout the year (in no particular order)


No.
Article
1Word Templates: We can't open template because we found a problem with its contents. Just recently I was working on a Sales Invoice Word Template customization for a customer and ran into a strange issue when attempting to print a batch of invoices for customers assigned to this template... Read more.
2Web Client Wednesday - You receive ArgumentNull_Generic exception when clicking an option on the Navigation Bar. In good measure, here at Intelligent Partnerships we eat our own dog food. As of January 1, 2014 we completed our internal rollout of Microsoft Dynamics GP 2013 and web... Read more.
3Microsoft Dynamics GP 2013 Virtual Machine image from the Windows Azure Gallery.
In my previous article, Part 1 of the series, I talked about provisioning a Microsoft Dynamics GP 2013 development environment from the Windows Azure gallery.  If you are already an MSDN subscriber and... Read more.
4Preventing Visual Studio Tools customization processes from being terminated by Microsoft Dynamics GP. Just recently I ran into a case on the Microsoft Dynamics GP Partner Forum where the ISV developer was dealing with a potentially long standing process to be executed from... Read more.
5Working with the Dex.ini Settings in Microsoft Dynamics GP 2013. Dex.ini settings have always existed to provide developers and end-users with ways to set a number of preferences for their Microsoft Dynamics GP application without the need of additional development or customizations... Read more.
6Using Microsoft Dynamics GP Business Intelligence deployment utility to deploy custom SSRS reports. In the previous installment, I outlined a technique to deploy your custom SQL Reporting Services reports using the standard Business Intelligence deployment utility provided by Microsoft... Read more.
7Deploying Business Analyzer Companion App Services on Windows Azure Service Bus. If you are not using Business Analyzer today, shame on you. Last year sometimes I wrote a small article on how to deploy the Business Analyzer Windows 8 application on a personal laptop, which is typically... Read more.
8Microsoft Dynamics GP 2015 Developer's Preview: .NET Framework Interoperability - Part 3. In part 2 of the series, I delivered a brief primer on the service architecture in Microsoft Dynamics GP 2015 and how you are able to consume services natively created with Dexterity. There are two types... Read more.
9Working with Dex.ini Settings to customize the Microsoft Dynamics GP Connect gadget. Have you ever wanted to wake up with The Dynamics GP Blogster page as the centerpiece of your Microsoft Dynamics GP application homepage? Or how about your favorite online news outlet? What if you...Read more.
10Microsoft Dynamics GP backups with Windows Azure Blob Storage Service - Follow up. As a follow up to my post yesterday (see Microsoft Dynamics GP backups with Windows Azure Blob Storage Service), an issue has been identified with Microsoft Dynamics GP 2015 running on SQL Server 2014...Read more.


2015 is sure to be a very exciting year for the Dynamics GP community. Right off the bat I can think of Convergence 2015 in Atlanta, GPUG Summit in Tahoe-Reno, NV, reIMAGINE in Fargo, ND, the upcoming release of Microsoft Dynamics GP 2015 R2 with another iteration, Dynamics GP 2015 R3, close to the end of 2015. So lots and lots to talk about.

Personally, I start the year with a business trip to Ireland, I already have commitments with Dynamic Partner Connections, and tons of webinars in conjunction with GPUG. So please stay tune to hear from those.

Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.intelligentpartnerships.com/

Selasa, 28 Januari 2014

Word Templates: We can't open template because we found a problem with its contents

Just recently I was working on a Sales Invoice Word Template customization for a customer and ran into a strange issue when attempting to print a batch of invoices for customers assigned to this template.

When printing the entire batch of invoices, the following error would appear:


Once the OK button was clicked, Word would proceed to display the following error message: "Word found unreadable content in "Template.docx". Do you want to recover the contents of this document? If you trust the source of this document, click Yes.".


Upon clicking the Yes button, Word would go to work and "recover" the document in perfectly good condition with the invoices matching to the penny.

What makes this even more puzzling is, if you print each invoice individually from the Sales Transaction Entry window, there would be no error and invoices would print fine.

Solution

To troubleshoot this issue, one just needs to focus on the original error - I assume the second error is simply a consequence of the first - specifically, on the Details where Word is specifically complaining about the header6.xml section. Also, part of finding the solution is understanding how the actual documents are generated from the templates.

To render a report from a template, Microsoft Dynamics GP uses Open XML, which uses a set of APIs to stream data into ZIP and XML standards - a DOCX is nothing more than a structured zip file containing a bunch of XML documents that define the structure and content of the document in question. The vehicle to stream the data into a template of course, is Report Writer.

With that said, when you look at the error, it clearly indicates that there's an issue with the way part of the formatted XML is being generated (as referenced by header6.xml). Troubleshooting 101, always suggests to test a standard unmodified template to see if the behavior persists and compare the standard unmodified template to the modified template causing the issue.

In looking at the original template, I immediately identified the difference between the original body section of the template...

Original Template

... and what my modified template was showing:

Modified Template of Original

As you can tell, the modified section of the body is missing the Serial/Lot and Item Notes row sections. When Microsoft Dynamics GP tries to stream data from Report Writer to the template, it is clear that this missing section will cause the XML data to be formatted incorrectly since the data exist in the stream, but there's no matching elements on the template. Since each section of the document is written one at a time and document by document, the resulting DOCX is saved each time each section is completed. Once the DOCX construction is finished, it will finish with an error message, which immediately forces Microsoft Word to go into recovery mode. Nonetheless, the recovery is of the last save operation, which still brings up the document.

Now, when an individual document is printed, it would seem that all XML tags are closed regardless of whether the data stream could be written to the appropriate template section. This is probably why no error is produced when an individual document is printed.

The solution in this case was to recreate the template and leave the previously removed sections intact. In my customer's case, they had no serial numbers to worry about, but had the occasional note that will print, so leaving these in the document was probably a good idea to begin with.

Until next post!

MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/