Nav2015 - Make Word Layout Non-Editable when Running Report

izzySzabo
Member Posts: 3
Hi all,
I am playing around with word layouts for reports in Dynamics Nav - 2015.
I have a report (based on standard 205 - Order Confirmation). When I run the report, I click on 'Preview' and it brings up the word document for me filled in with some details (variables I put in) ready to be edited. -- But Editing this word document makes no sense in my case and could cause problems with data consistency if any values were accidentally(or on purpose) changed.
So I'm wondering how do I make this word document non-editable? Or how do I solve this issue, where the data in the report shouldn't be changed by the user when this report is run?
(NOTE: this word document can also be opened from the 'Print...' dropdown button on the request page)
Thanks,
Izzy
I am playing around with word layouts for reports in Dynamics Nav - 2015.
I have a report (based on standard 205 - Order Confirmation). When I run the report, I click on 'Preview' and it brings up the word document for me filled in with some details (variables I put in) ready to be edited. -- But Editing this word document makes no sense in my case and could cause problems with data consistency if any values were accidentally(or on purpose) changed.
So I'm wondering how do I make this word document non-editable? Or how do I solve this issue, where the data in the report shouldn't be changed by the user when this report is run?
(NOTE: this word document can also be opened from the 'Print...' dropdown button on the request page)
Thanks,
Izzy
0
Answers
-
We are handling this by actually not giving .docx to the user, but silently jumping to .pdf for the reports that are supposed to be "read-only".
The users then have a clear convention - when it comes in Word, it's ok to be edited, if in PDF, it's a strict-content document.
It's done in Codeunit 9651 Document Report Mgt., e.g. like so:OutStrWordDoc := NAVWordXMLMerger.MergeWordDocument(InStrWordDoc,InStrXmlData,OutStrWordDoc); COMMIT; // custom code >> IF CustomReportLayout."Disable Word Preview" THEN IF ReportAction = ReportAction::Preview THEN ReportAction := ReportAction::SaveAsPdf; // custom code <<
Obviously you need some setup where you specify the behavior, in our case it's the custom "Disable Word Preview" checkmark in Custom Report Layouts, which only super-users are allowed to alter just for emergency.
---
PS.
I'm in love with Word reports - and avoiding RDLC as much as possible in recent projects.
We're currently doing a report-heavy NAV upgrade from 3.60 to 2015 for a customer having like everything coming out from NAV - from 5 kinds of contracts to 7 sorts of invoices and attorney and warning letters etc., >100 document reports total. And Word is the life-saver.
Yes, it's cumbersome to do those show/hide/if/else things for Word, as Word does not have ANY means of having report logic programmed in, and every bit of logic must be in the NAV dataitems, but this is such a great thing for maintainability and code clarity.
The second blessing of Word - for really complex or semi-custom printouts you can have NAV generate the report "only so far", and leave the rest to the user, in a Word that anyone can handle. As an example, we recently did a product catalog in Word generated from NAV (some 300 pages), which was then processed by some VB Macros, had TOC added (Word functionality), manually adjusted for prettiness, and finally went to the printhouse. Extends your borders so much.
And the third - you can actually train your customers to adjust/customize those Word layouts themselves, so it's finally easier for them to just do it instead of requesting another development done.1 -
Thanks!
This might just work :thumbsup:0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions