“HOW-TO” DEVELOP A WORD LAYOUT REPORT IN VISUAL STUDIO CODE Nice question in Microsoft Dynamics BC Community about report development in Visual Studio Code: “How to modify an existing report in Business Central?” .Is there any way to development tools will be used by partners to modify standard Reports and build/modify custom Reports in Rdlc or in Word Layout? Word Layout reports (my opinion) are a great choice for “ Document Report s”, in my next new book “Implementing Dynamics NAV & Dynamics 365 Business Central” i will talk also about Reporting topics. Now, in this case, i would to talk about “How to modify an existing Word Layout report in Business Central” . Scenario example I have an old World Layout report in Dynamics NAV 2018 that I want to convert to Visual Studio Code: in this case is the “ Sales Invoice Report ” named “SIR_WL” (Sales Invoice Report – Word Layout) “HOW-TO” CREATE A NEW WORD LAYOUT REPORT IN MSDYN365BC CONVERTING A DYNAMICS NAV REPORT To create a new report based on an existing report (for example in Dynamics NAV 2018), you need to use Visual Studio Code (and Microsoft AL Language Extension) for creating the Dataset and the RDLC\Word layouts , then you can customize the layouts with standard tools like Report Builder (for RDLC Reports) or Microsoft Word (for Word Layout reports). Develop in Local Sandbox You can use a local development sandbox for develop new reports, from here, you can open C/SIDE and export the report as TXT object. You can create that locally (by installing Docker and pulling microsoft/bcsandbox:latest) or use an Azure VM template (available here: aka.ms/bcdeveloperpreviewext) Take a look here https://robertostefanettinavblog.com/2018/06/25/how-to-business-central-sandbox-environments/ STEPS TO CONVERT AN EXISTING REPORT TO MICROSOFT “.AL” FILE FOR VS CODE #1 – (Re)generate SYMBOLS (if you have errors on Visual Studio Code) Example: finsql.exe Command=generatesymbolreference, Database=”Demo Database NAV W1 (13-0)”, ServerName=mvpdockers\SQL2016EXP #2 – From your local Development Sandbox (Docker, Azure etc.), export the report as TXT File to New Syntax Example (on report 50000) finsql.exe Command=ExportToNewSyntax, File=report50000.txt, Database=”Demo Database NAV W1 (13-0)”, ServerName=mvpdockers\SQL2016EXP,Filter=Type=report;ID=50000 #3 – Convert the report from New Syntax to “.AL” file with “Txt2AL tool”. This will give you a .al file (dataset) and .rdlc file (Rdlc layout) or .docx (Word layout) Example (on report 50000) txt2al.exe –source=”C:\FILES\REPORT_SOURCES” — target=”C:\FILES\REPORT_CONVERTED” after you can find report50000.al file in the target folder, after import the AL files in VS Code and modify them as per your needs (develop on Vs Code). FOLDER #4 – Add a subfolder named “layouts” in the project. Build the report, using Ctrl+Shift+B , this will generate the RDLC and WORD layouts folders and file. Import the Word Layout report from NAV 2018 in this folder if you have one ready to use. SAMPLE: Report 50110 “Sales – Invoice WL” REPORT LAYOUTS ARE NOW in “LAYOUT FOLDER” #5 – EDIT THE REPORT’S LAYOUT IN MICROSOFT WORD #6 – PUBLISH ANS INSTALL “.APP” REPORT PUBLISH “.APP” report Publish-NAVApp –ServerInstance DynamicsNAV130IT –Path “C:\Users\vmadmin\Documents\AL\ReportSalesInvoiceWL\Roberto Stefanetti_ReportSalesInvoiceWL_1.0.0.1.app”-SkipVerification INSTALL “.APP” report Install-NAVApp –ServerInstance DynamicsNAV130IT –Name “ReportSalesInvoiceWL” CHECK in extension management if extension is not installed > install manually OR Upload the report in Microsoft Dynamics 365 Business Central using Upload “.APP” in Extension Management manually #7 – CONFIGURE REPORT “50110” Sales Invoice WL in Custom Layout Report “SALES INVOICE REPORT-FATTURA” IN ACTION LINKS OLD POST LINKS https://robertostefanettinavblog.com/2018/01/05/creation-of-reports-using-al-extension-in-microsoft-dynamcis-nav-development-preview/ https://robertostefanettinavblog.com/2018/06/24/how-to-create-a-report-on-bc/ MY FREE EBOOK about development in VsCode & Microsoft AL Language Extension: you can download my Free Ebook from Lulu.com (nice section about report development ) http://www.lulu.com/shop/http://www.lulu.com/shop/roberto-stefanetti/nav-modern-technology-notes-from-cal-to-microsoft-al/ebook/product-23535099.html Source https://robertostefanettinavblog.com/2018/09/30/how-to-develop-a-word-layout-report-in-visual-studio-code/
↧