So, we did the normal things...
- Made sure the field printed fine on the report writer report (it did)
- Removed and re-added the XML source to the Word template
- Removed and re-added the field to template
- Added static text to the template to make sure we were printing the right template (we were)
But then I remembered a blog post that I had read about making sure that fields were associated with the section that are printing in. When you are looking at the field pane, you will notice that fields are displayed based on the section (this is derived from the report writer report itself, so wherever the field is on the standard report- that is where it shows in the field pane).
So, to ensure that fields are in the correct sections on the template, you can click on Design Mode (located on the Developer pane). It switches the view to something like this...
What I noticed when I did this is that the shipping method field in the header row was actually from the Comment 3 section. Notice that all of the other fields in that section are from the Report Header. So I removed the errant field, and the PO worked great! Then we added the field back, but this time we made sure we added the Shipping Method fields from the Report Header section.
In a standard report writer report, we can drag fields in to any section on the report. But when working with the Word templates, it seems like you want to add fields to the section that they are defined in. So if the field is not available within the section where you want to add it, you would want to add the field to that section on the standard report writer report and then delete/re-add the XML source to update the field list.
I just wanted to share the Design View option, as this is a quick way to check and make sure your fields align to the sections and won't cause any undesired sorting issues when you generate the template.
Christina Phillips is a Microsoft Certified Trainer and Dynamics GP Certified Professional. She is a supervising consultant with BKD Technologies, providing training, support, and project management services to new and existing Microsoft Dynamics customers. This blog represents her views only, not those of her employer.
2 comments:
Great info on the sections--I didn't realize this was the case with templates. However, I am having the same issue in getting the shipping method added to the PO Blank form. There are two captions listed under Report Header, but no fields listed for the same!
I have added the field to the PO through Report Writer, but other than generating the modified report through template generator (a process I would like to avoid) I cannot see how to access that field!
Thanks!
Have you gone through the process of generating the report writer report to XMl and then removing/re-adding the xml source in the word template? You would have to do that to see the new field. Check out this post, http://dynamicsgpland.blogspot.com/2011/10/adding-fields-to-word-templates.html.
Post a Comment