To make it more simple for you guys to find and discover blogs post from the NAV team members we are combining our blogs into the NAV Team Blog, so we will no longer be posting on the NAV-REPORTING blog. All post from this blog have already been migrated to the NAV Team Blog.
If you still want to follow blogs especially on the reporting topic, please follow this link: http://blogs.msdn.com/nav/archive/tags/Reporting/default.aspx
You can also set up RSS feeds for only Reporting topics on the NAV Team Blog: http://blogs.msdn.com/nav/rss_tag_Reporting.xml
See you all at the NAV Team Blog.
Thanks,
Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV
Today Printer Selections Form 64 is not transformed to Printer Selections Page 64 since virtual table 2000000039 is not accessible from Role Tailored client.
I thought of different options for how we could get page 64 to work and decided to try the new Client Extensibility feature in NAV 2009, although this could also be done with filing a temporary table from COM.
I would like to share this option with you.
Page “70809 Printer Selections FactBox” is using a client-addin, based on C#, to read the local installed printers and offers the way to select the name and save it to NAV 2009.
Page “64 Printer selection” is enhanced with the new fact box.
You can download the files here:
You can use the file for your own risk. There is no support for it.
(Note: Before you can use the page 70809 you have to install the client extension library “printerslections.dll” on your machine. The easiest way to do this is using the Add-Importer from Christian. )
Thanks,
Rene - Microsoft Dynamics NAV MVP (navmvp@live.at)
In this post I would like to explore the possibilities to create an email from the Role Tailored client and attach an invoice as a PDF file to the email, unfortunately we have do not have this functional build into our Demo application, but let me show you how this can be do with little effort.
First I suggest you download the fob file which contains the 5 different options I will go through here.
When downloaded the fob file you will see that I have added 5 new actions
1. SendAsPDF(Use of codeunit to rename) recommended solution
2. SendAsPDF(Access to Server needed)
3. SendAsPDF(With Temp file name)
4. SendAsPDF(User prompted to save)
5. SaveAsPDFrecommended solution(if you just want the PDF file)
Let me go through the different options starting from the bottom, since I recommend option 1, but I would also like to share other options for doing this, since these might be valuable for you.
Option 5: SaveAsPDF
In this option you will get prompted if you want to open or save the PDF. The PDF file created will be based on the select Invoice in the Posted Sales Invoices List Place
In this option all I do is to have the server create the PDF file for me and use the new download function in NAV 2009 to retrieve the PDF file created on the server.
Option 4: SendAsPDF(User prompted to save)
In this option, you will first be prompted to save the file.
Here it is important to select to “”SAVE” the PDF file on the disk, to have the correct name of the PDF file. If you select to “OPEN” the PDF filename will be given a temp name.
After you have saved the PDF we now create the email message you will get 3 messages similar to this when this happens:
You get these message because we connect to an external component(Outlook) to the Role Tailored client. It is of course up to you if you want to set this to “Always allow”, but this would remove these messages, the next time you open the Role Tailored client.
When you have allowed these to run, email will be created with the PDF file attached.
In this option all I do is to download the PDF to the client and then use the Mail codeunit to create the email
Option 3: SendAsPDF(With Temp file name)
In this option, you will not be prompted to save the PDF file.
And the email will be created immediately. This would probably be the preferred compared to downloading this to the user disk, but we will use the PDF file created on the server, and since this file get a TEMP name, like this: “__TEMP__570eb0279b9d4b1fa837caf3a14acbf7” this option is not really good.
Let us look at the option 1 and 2 where this issue is solved.
Option 2: SendAsPDF(Access to Server needed)
In this option you will not be prompted to save the file either, but here the end user will need to have access the server folder where the PDF is stored on the server. In some situation you might want this, but for security reasons you might also not want to give this access to the all user.
Option 1: SendAsPDF(Use of codeunit to rename) recommended solution
Again in this option you will not be prompted to save the PDF file, but the PDF file will be automatically added to the email. In this option we have build a codeunit to rename the TEMP file created on the server, and end user will not need to have access to any folders on the server.
So all in all I recommend option 1 for attaching PDF file to an email. And once again I have made all the code available here, so feel to be explore how I build this. If you feel there is an option that I missed feel free to leave a commit or use the contact form Email.
Thanks,
Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV
We have now released Service Pack 1 for Microsoft Dynamics NAV. So you will now all be able to use the new Reporting features in this Service Pack. Previously I have described all new reporting features in this Service Pack. Please find all these features described here: What is new in Dynamics NAV 2009 SP1 for Reporting.
You can find the download for Microsoft Dynamics NAV 2009 SP1 here:
CustomerSource: https://mbs.microsoft.com/customersource/downloads/servicepacks/MicrosoftDynamicsNAV2009SP1.htm
PartnerSource:
https://mbs.microsoft.com/partnersource/downloads/servicepack/MicrosoftDynamicsNAV2009SP1.htm
Thanks,
Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV
The final Service Pack 1 for Dynamics NAV 2009 is now just around the corner, so with that I would like to share with you one of the new possibilities in the reporting area, Matrix reports.
First I will go through how to build a Matrix Report in NAV 2009 SP1, then I will demo some Matrix reports done by two of our MVPs of Dynamics NAV and one of our partners. In the end of this blog I will share all the Matrix reports. So if you are not interested in how to build a Matrix Report in NAV 2009 SP1 or already know how to do this in NAV 2009 SP1, this is the time for you to scroll to the bottom of this blog, if you just want to download the objects. :-)
If you are still here and have not scrolled to the bottom, let us get started building a Matrix Report.
Building Matrix Report in NAV 2009 SP1
In this walkthrough we will be creating a Matrix Report sorted with Items by Location.
When you have finished this Walkthrough you will understand how to build a Matrix Report in NAV 2009 SP1.
1. Select “New” in Object Designer with Report object selected
2. Add “Location” as Table
3. Select “Create a blank report“ and click “OK”
4. Insert “Location” as the first DataItem
5. Insert “Item” as the second DataItem, make sure to indent under the “Location” DataItem.
6. Save Report and give an “ID” and a “Name”
7. Now we have created the DataItems for this report, so now we need to create the Data Source for us to be able to create the Layout of the Report in Visual Studio. For this we need to go to the Section Designer. Open Section Designer
8. For now the Section Designer is Empty, so we need to add some Fields. We would need these fields:
· Items by Location – Title
· Code – Location
· Name – Location
· No. – Item
· Description – Item
· Inventory – Item
9. Make more space to have more fields in each of the Sections.
10. Add a Label with Caption=Items by Location
11. With “Location” Section selected, open Field Menu:
12. Open Field menu and select “Code” and “Name”
13. Add these 2 fields to the “Location, Body”
14. Navigate to the “Item , Body” and select “Field Menu” and select "No.", "Description" and "Inventory"
15. Add these 3 fields to the “Item, Body”
16. We have now created the Data Source for the report. Now we need to create the layout for this report.
Select “View / Layout”. Visual Studio will open.
17. In Visual Studio you will now see these elements in Data Source we can work with:
18. Lets us now design the layout.
19. In the toolbox select the Matrix control and drag this to the Report Body
20. Drag “Items_by_LocationCaption” to the top left cell in the Matrix control
21. In the “Rows” just below I want to add 2 rows directly under “Items by Location”, so we need to add a new group. Right click the “Rows” cell and select “Insert Group”
22. “Grouping and Sorting properties” dialog box will come up.
Select to group on “=Fields!Item_Description.Value” and click “OK”
23. In the new cell to the left of “=Fields!Item_Description.Value”, right click and select “Edit Group”
24. Select to group on “=Fields!Item__No__.Value” and select “OK”
Your report should now look like this:
25. It is now time to add the column above the data, and in this report we want to see in how many items are stored in each warehouse. Add “=Fields!Location_Name.Value”
26. And at last let us add the data cell in the bottom right corner of the matrix control. Add “=Sum(Fields!Item_Inventory.Value)” to the Data cell.
27. Now before viewing the report let us already do some resizing of the layout, for this to readable on one page. I choose to narrow the columns, so the report now looks like this:
28. Also to make this report more readable friendly, let us add a Solid Border style. Select all cells in the Matrix control, and select “Solid” for the “BorderStyle” property
29. Now let us view the report, save, import, compile and run the report. We now get this output.
Hmm, something is wrong. I.e. we have 32 bicycles on stock in each of the warehouses. Let us fix this issue.
30. Go to the DataItem “Item” and set the property “DataItemLink” to “Location Filter=FIELD(Code)”
31. Now let’s run the report again, but now we set the following filter on the Request Page: Inventory is >0
We do this to avoid all entries with 0.
32. Now select “Preview” to see the report.
33. We now have a working Matrix Report which is sorting Items by Location.
34. Now let us imagine you would like to know the Inventory Availability on the 52 “PARIS Guest Chair, black” in the “Blue Warehouse” or on the 55 “AMSTERDAM Lamp” in the “Red Warehouse”. So let use the Drill Through to Report feature in Dynamics NAV SP1 to drill through to our existing “Inventory Availability” report 705. Open Visual Studio again by selecting “View / Layout”
35. Right click the Data field in the Matrix control and select “Properties”
36. Navigate to the “Navigation” tab
37. Select “Jump to URL” and add the following expression:
="DynamicsNAV:////runreport?Report=705&Filter=Item.%22Location Filter%22:"+Fields!Location_Code.Value+"&Filter=Item.%22No.%22:"+Fields!Item__No__.Value
What we are doing here is that we open Report 705(Inventory Availability) filtered on Location and Item No., when we click data field in the Matrix report.
38. Before we save the report, let us make it visible in the report that we have a link to another report.
With the Data field selected set these properties:
Color=Blue
TextDecoration=Underline
39. Save, Import and Compile the report. Note you might this error:
Set the EnableHyperlinks=TRUE, and compile again
40. Run the report. It will now look like this:
41. Now when we click on the 52 “PARIS Guest Chair, black” in the “Blue Warehouse”, Inventory Availability report will now open based on the our Blue Warehouse and our Paris Guest chair.
And when we click on the 55 “AMSTERDAM Lamp” in the “Red Warehouse”, Inventory Availability report will now open based on the our Red Warehouse and our Amsterdam Lamp.
Now let us look at some other Matrix Reports
1. Items by Location done by Andrey Panko, MVP for Dynamics NAV. This report is very similar to the above walkthrough, it has extra logic on the data part and more advanced coloring and a Totaling to the very right. It does not contain any Drill Through to report 705, but this could easily be added following the above steps(35-37) on how to that.
2. Items by Location done by Rene Gayer, MVP for Dynamics NAV. This report is also similar to the above reports but here Rene is using the new Drill Through to report, so if click on the Item, left most column, you open a Item Dashboard, with Key Performance Indicators, Stock level illustrated and Sales History.
3. GL Entries per Account per Month, done by GAC Business Solutions. This report gives a overview of the entries in GL Account pr month. Notice when clicking the GL Account you will Drill Through to GL Account card, and when clicking the amount in the Matrix you will Drill Through to the Detail Trial Balance Report filtered on month and GL Account
Please find all the mentioned reports here:
Thanks, to Andrey Panko, Rene Gayer and GAC Business Solutions for sharing their Matrix Reports.
Thanks,
Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV
With our Microsoft Dynamics NAV 2009 SP1 Community Technical Preview released it is now time to drill into the new features we have been for working on for reporting in NAV 2009 SP1.
1. Drill Through to a report from a report
In NAV 2009 it was possible to Drill Through from a Report to a Page, see how this is done here.
With the possibility to Drill Through from a report to Page, we had a strong request from partners and customers to add the possibility to Drill Trough from a Report. So in NAV 2009 SP1 it is now possible to Drill Through from a Report to a Report. So how is this done? Well this is not done the way we Drill Through to Pages, but with the use of filters.
A Drill Through to a report could look something like this:
="DynamicsNAV:////runreport?Report=104&Filter=Customer.%22No.%22:"+Fields!Customer__No__.Value
The first part “DynamicsNAV:////runreport?Report=104” is our well know way to link to reports and pages. If you are new to this linking in NAV 2009 read more here.
The last part “&Filter=Customer.%22No.%22:"+Fields!Customer__No__.Value” is what is new for NAV 2009 SP1. The first part will open Report 104, and with the last part, report 104 will be filtered on the “Customer__No__.Value”. If we add this code to a Customer Top 10 List report, we can Drill Through to report 104 both from the List and the Pie Chart. I have made a small video how that is done:
2. Paging
In NAV 2009 the dataset creation was done on server, before it was sent to the requesting client. With this approach, the memory consumption on the server could potentially be very large with multiple user requesting reports at the same time. For this reason we have implemented paging in SP1. With paging the memory footprint on the server is minimal. When the dataset for a report is generated, we are now sending small chunks of the dataset to the client, and thereby building up the dataset on the client. With this approach the client is now taking the memory hit and not the server. I have made small video that illustrates how the dataset was build up in NAV 2009 and in NAV 2009 SP1:
3. About this Report
In NAV 2009 we had the possibility to zoom into the dataset of a report. We also had a very short short as well SHIFT+CTRL+ALT+F12 :-) but in SP1 we have reintroduced the zoom feature for Pages as well. We decided to call this “About this Page”. “About this Page” and can be found in the help menu on all pages. For reporting we aligned this, so in Report Preview we now have a menu called “About this Report”. Also the shortcut is aligned, so this is now CTRL+ALT+F1.
4. Progress Indicator
With paging introduced in SP1, it gave us the possibility to add a Progress Indicator, while the dataset is being created and sent in chunks to the client.
- You will now be able to see how long the dataset generation has taken
- You will be able to see how many rows has been received from the server
- And at last you will be able to cancel a report, something which was not possible in NAV 2009
Note: When dataset has been sent to the client Progress Indicator will disappear and Report Viewer will starter rendering the report. Based on the logic in your layout this can take more time than the actual dataset generation. You will be able to stop this generation by clicking the stop button in the Report Viewer while the report is being generated.
5. Matrix reports
We now also supports Matrix reports, so we can do things like this:
6. Visual Web Developer 2008
We now have full support for Visual Web Developer 2008, so it is no longer needed for you to do the “hack” I described here. Note: As of April 1st. Visual Web Developer 2005 has reached EOL, which means it can no longer be downloaded from Microsoft.com
7. External Images
In NAV 2009 it was possible to add both embedded images and images from the NAV database. With NAV 2009 SP1, it will now also be possible to add external images to your report.
I hope you appreciate the new reporting features which will be available in NAV 2009 SP1. And as always I’m happy to get feedback for reporting features you would like for us to implement in future releases. So use the Contact Form to write directly to the core reporting team in Navision(Dynamics NAV) :-).
Thanks,
Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV
We have now released training material for designing reports in NAV 2009.
This training will teach the learners about the concepts of Report Design in NAV 2009 using VS Report Designer along with the limitations and workarounds in Report Design. It covers the new options with practical examples on creating reports in report design, creating and defining data set within NAV 2009 to be used in Visual Studio. In addition, it covers how to implement dynamics features like interactive sorting, conditional formatting, visualizing data using graphs, document maps, creating expressions. Furthermore the training contains information on best practices and recommendations for creating interactive dashboard reports containing KPI’s.
At Training Material Completion
After reviewing this training, individuals will be able to:
- Understand the new architecture and reporting features in Microsoft Dynamics NAV 2009.
- Create table and matrix reports for the Microsoft Dynamics NAV RoleTailored client in Microsoft Visual Studio.
- Add interactive features, such as Visibility Options, Interactive Sort, Document Maps, and Pictures to the report.
- Use expressions and custom code in RoleTailored client reports.
- Integrate reports in the RoleTailored client user experience.
- Run RoleTailored client reports in various ways.
You will find the training material at CustomerSource here:
https://mbs.microsoft.com/customersource/training/trainingmaterials/student/course80146.htm
Thanks,
Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV
Some of you have noticed that the Chart displayed in “Customer Order - Summary” contained a series label called Series 1.

Well the reason for that being shown is because we have missed to filter out all customer with have no data in the field: Chart_SalesOrderAmountLCY.Value
So how is that actually done? Well let me show you:
1. Design Report 70000
2. Select “View / Layout”
3. Right click the chart in the bottom of the report
4. Select “Filters” tab
5. Type the follow:
Expression:
=System.String.IsNullOrEmpty(Fields!Chart_SalesOrderAmountLCY.Value)
Operator:
=
Value:
=False
6. With this filter we now filter out where "Chart_SalesOrderAmountLCY.Value” is equal blank.
7. Now save and compile the report and display in RoleTailored client. Now only customers with outstanding orders are shown in the chart.
I have updated the demo reports package to reflect this change.
The reports can be downloaded from here.
Thanks,
Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV
Hi!
I want to share with you also another report using some of the new capabilities in point of creating dashboards in NAV 2009.
Based on reporting services and NAV data source it is possible to create dashboards for every department. This offers a perfect extension to the default charts directly in the role center.
The report shows you one example based on the sales department to get a quick and/or deep overview about the current situation.
If you are a developer you can also use the report for learning purposes:
- Use charts
- Use coding in expressions
- Use DrillDown
- Use own color palette in charts
You can download the report from here:
Thanks,
Rene - Microsoft Dynamics NAV MVP (navmvp@live.at)
I want to share with you some reports that are using some of the new capabilities that are available for use with RDLC reports in Microsoft Dynamics NAV 2009.
We have prepared 4 reports which uses these capabilities:
Customer - Order Summary:
- Use of Conditional Formatting (Table colors)
- Use of Conditional Formatting (Colors in cells)
- Use of Charts
- Use of Hyperlink External(Click the Dynamics Logo in the bottom)
- Use of Embedding picture into report
Sales Pipeline:
- Use of Conditional Formatting (Icons, expand to see the icons)
- Use of Conditional Formatting (Table colors)
- Use of Visibility toggle
- Use of Hyperlink (Click the Dynamics Logo in the bottom)
- Use of Embedding picture into report
Quantity Explosion of BOM:
- Use of Visibility toggle. Notice that this is Visibility toggle for “Expand All” replaces the previous table shown. Look for Table 1 and Table 2 in Visual Studio to see how that is done.
- Use of Conditional Formatting (Table colors)
- Use of Drill Through to Page(Click “Where used?”)
- Use of Hyperlink (Click the Dynamics Logo in the bottom)
- Use of Embedding picture into report
Customer - Top 10 List:
With Bar Chart
With Pie Chart
- Use of Visibility toggle. Now you can switch between Bar chart and Pie Chart in the Report Viewer and are not required to run the Request Page to make this change.
- Use of Percent
- Use of Point Labels
- Use of Hyperlink (Client the Dynamics Logo in the bottom)
- Use of Embedding picture into report
The reports can be downloaded from here.
Thanks,
Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV
Here are the steps to leverage the use of “Document Map” in a Report.
1. Design Report 113 Customer/Item Sales
2. Select View / Layout
3. Right click on Table top left corner
4. Select Properties
5. Navigate to “Groups” tab
6. Select Table1_Group
7. Select “Edit…”
8. Select “=Fields!Customer_Name.Value” in “Document map label”
9. Select “OK”
10. Navigate to “Navigation” Tab
11. Enter “Customer” or what you want the title to be in the Document List
12. Select “OK”
13. Save and import RDLC changes, and then compile report in Classic client.
14. Run Report 113, it now looks like this:
Notice the expand in the top left corner. Unfortunately this does not display anything in NAV 2009 RTM, this will be fixed in SP1.
16. Click the expand button to see the Document Map
17. Now click the customer “Klubben” and notice that the report in to the right navigates to the area where info about the customer “Klubben” is displayed.
Thanks,
Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV
UPDATED April 2nd 2009: Several people have reported to me that the first solution I posted for “How to use the Picture stored in Company Information table:” did not work for them. So I have now updated the section on how to use the picture stored in the Company Information table. The picture is now added in a slightly different way.
/Claus
******
There are several ways to do this. Either you use the existing Picture which is stored in table 79 Company Information or you can embed the image into the Report itself, or you can link to the picture externally. In this scenario I will be looking at how to use the picture already in the database and and how to embed the picture into the report itself.
How to embed the Picture:
1. For us to be able to embed the picture into a report we need to have the Company Picture as a file. I have exported the company picture to c:\temp\CompanyPicture.bmp
2. Ok, now let us add this to Report 111. Design Report 111
3. Select "View/Layout" to go into Visual Studio.
4. Select the Report and choose "Report/Embedded Images"
5. Select "New Image..." and select your company picture, in my case c:\temp\CompanyPicture.bmp
6. With that completed open the Toolbox and add a Image control to the Report.
7. With the Image Control added we need to the set correct properties for this control. Set Source=Embedded, Value=companypicutre and MIMEType=image/bmp
9. Save and import RDLC changes, and then compile report in Classic client.
10. Run "dynamicsnav:////runreport?report=111" to open up report 111. And as you can see below company picture is displayed.
We have no looked at how to embed the Company Picture into the report. Now let us have a look on how to use the Company Picture already in the database.
How to use the Picture stored in Company Information table:
1. Deleted the above embedded Company Picture, if you followed the steps above.
2. Design report 111
3. Now we need to have a Variable with is references to the Company Information Table. Lets create a new called CompanyInfo
4. Exit C/AL Globals and ad the following code to the "OnPreReport()" trigger: CompanyInfo.CALCFIELDS(Picture);
5. Now we should add a Picture Box on the Sections with SourceExpr: CompanyInfo.Picture. We need to do this to have the element available for us in Visual Studio.
6. It is now time to open Visual Studio. Select "View/Layout"
7. Notice that we now have an new entry in the DataSet
8. Now lets add this to the report. We need to add the Company Picture first as a TextBox to the body of the report. This will enable us to use it in the Page Header. We add this TextBox in top of the Body.
9. We give the TextBox the following properties:
Value: “=Convert.ToBase64String(Fields!CompanyInfo_Picture.Value)”
Name: “CompanyPicture”
Visibility Hidden: “True”
Color: “Red”
10. Now add the following code to the Report properties.
Shared PictureData as Object
Public Function GetPicture() as Object
Return PictureData
End Function
Public Function SetPicture(NewData as Object)
if NewData>""
PictureData = NewData
end if
End Function
11. Now let us add the Image control just as we did for the embedded scenario. Open the Toolbox and add a Image control to the Report.
12. With the Image Control added we need to the set correct properties for this control.
Value: “=Convert.FromBase64String(Code.GetPicture())”
Source: “Database”
MIMEType: “image/bmp”
13. Add textbox to Page Header. Note! This textbox has to be placed above the Picture control just added
Value: “=Code.SetPicture(ReportItems!CompanyPicture.Value)”
Visibility Hidden: “True”
Color: “Red
14. Save and import RDLC changes, and then compile report in Classic client.
15. Run "dynamicsnav:////runreport?report=111" to open up report 111. And as you can see below company picture is displayed.
Thanks,
Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV
1. Create a new codeunit. In this scenario we will call this codeunit "CUWebReport" with ID 50000
2. Navigate to "C/AL Globals" and create a function called "GenerateReport"
3. Select "Locals"
4. Select the "Return Value" tab
5. Set "Return Type"=Text and "Length"=100
6. With this completed close "C/AL Locals" window.
7. Now with "C/AL Globals" windows active again. Select "Variables" tab.
8. Create a variable called "filename" with "Data Type"=Text and "Length"=100
9. Now let's add the following code to this codeunit:
filename := 'C:\inetpub\PdfDocuments\';
filename += FORMAT(CREATEGUID);
filename := DELCHR(filename, '=', '{-}');
filename += '.pdf';
REPORT.SAVEASPDF(111,filename);
EXIT(filename);
10. Save and compile the codeunit.
11. Now it's time to expose this codeunit as Web Service. Navigate to "Administration/IT Administration/General Setup/Web Services"
12. Select codeunit 50000 and give this a service name, we use "Get_PDF_Report"
13. Now it is time to verify that we can see this web service. Open this URL http://localhost:7047/DynamicsNAV/WS/services.
You should now se this message in your browser, and your Web Service can now be called :
If you don't see this message, you might want to check that the service "Microsoft Dynamics NAV Business Web Services" has been started.
14. Now it is time to call the Web Service, in this example we use Microsoft Visual Web Developer 2005. And we use the following code to call the Web Service:
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim service As localhost.Get_PDF_Report = New localhost.Get_PDF_Report()
service.UseDefaultCredentials = True
service.Url = "http://localhost:7047/DynamicsNAV/WS/CRONUS_International_Ltd/Codeunit/Get_PDF_Report"
Response.ContentType = "application/pdf"
Dim pdfFileName As String = service.GenerateReport()
Response.TransmitFile(pdfFileName)
End Sub
End Class
But how to consume this Web Service is not in scope for this blog, so we suggest you have look our online help how to consume a Web Service from NAV 2009.
Online help found here: http://msdn.microsoft.com/en-us/library/dd339004.aspx
15. Now also remember to impersonate your web servers application to an appropriate Dynamics NAV user.
16. After compiling a running our project we then get this button in our browser.
17. When activating this button, we get the report specified in Codeunit 50000 displayed as an PDF file in our browser.
Conclusion, now you can give this URL to people who don't have access to Dynamics NAV, and they can execute the report when they see a need for this.
Thanks,
Torben Meyhoff, SDE & Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV
Updated 24. September 2009 to include options for Dynamics NAV 2009 SP1. / Claus Lundstrøm
Today we have the following outlined in our Online Help
For development of reports for the RoleTailored client, one of the following products is required:
· Microsoft Visual Web Developer 2005 Express edition SP1 or above
· Microsoft Visual Studio 2005 Standard or Professional SP1 or above
· Microsoft Visual Studio 2008 Standard or Professional or above
Note: If Microsoft Visual Web Developer 2005 edition is used, the Reporting Add-In for Microsoft Visual Web Developer 2005 is also required.
I would like to elaborated on this because other version are also available and we also have a hotfix available for Microsoft Visual Studio 2005 users which need explaining.
So here it goes. The following editions of Visual Studio are supported:
Microsoft Visual Studio 2005 Editions:
· Microsoft Visual Web Developer 2005 Express edition with SP1. With “Reporting Add-In for Microsoft Visual Web Developer 2005”
· Microsoft Visual Studio 2005 Standard or higher editions with SP1
Tip: If SP1 is not installed for any of the 2005 version you will be asked to convert report when opening Visual Studio from Classic Client. Converting the report will not do any good, so SP1 is required.
Note: Visual Studio included in SQL Server 2005 is not supported.
Microsoft Visual Studio 2008 Editions:
Microsoft Visual Web Developer 2008 Express edition with SP1. With “Microsoft Report Viewer Add-on for Visual Web Developer 2008 Express Edition” NEW FOR SP1
Microsoft Visual Studio 2008 Standard or higher editions
Microsoft Visual Studio 2008 Standard or higher editions with SP1
Microsoft Visual Studio 2008 included in Microsoft SQL Server 2008 Workgroup or higher editions
Microsoft Visual Studio 2008 included in Microsoft SQL Server 2008 Express with Advanced Services
Note: ZIndex hotfix is included in SP1 for Visual Studio 2008. ZIndex hotfix issue explained in the end of this blog post.
Note about Microsoft Visual Web Developer 2008 Express Edition: NOTE: ONLY IF YOU ARE USING DYNAMICS NAV 2009, SINCE THIS HAS NOW BEEN FIXED IN RELEASED SP1
Unfortunately this does not work out of the box with NAV 2009 RTM, since “Microsoft Report Viewer Add-on for Visual Web Developer 2008 Express Edition” was released after NAV 2009 RTM.
When using Visual Web Developer with Report Viewer Add-on, you will be asked to convert report when opening Visual Studio from Classic Client. Converting the report will not do any good.
There is a workaround for this:
1. Navigate to “C:\Program Files\Microsoft Dynamics NAV\60\Classic”
2. In this folder there is 2 folders called “ReportLayout2005” and “ReportLayout2008”
3. Copy all files from “ReportLayout2008” to “ReportLayout2005”
Doing this will of course kill support for “Microsoft Visual Studio 2005” and “Microsoft Visual Web Developer 2005 Express” on this specific client, but now Visual Web Developer 2008 works, and you no longer get the convert report message. We plan to have this issue resolved in SP1 for Microsoft Dynamics NAV 2009, so there is no need for this manual workaround.
ZIndex issue:
When making any change to a report in Report Designer(Visual Studio) all ZIndexes will be updated in the RDLC.
When making any change to a report in Report Designer(Visual Studio) only ZIndexes for the specific change will been updated.
Having the ZIndex hotfix installed will make comparing of changes in between version of a report easier.
Hotfix works for all Visual Studio 2005 versions. ZIndex hotfix is included in SP1 for Visual Studio 2008, but please notice that hotfix is not available in Visual Studio 2008 without SP1.
Read more about the ZIndex hotfix for Visual Studio 2005, and how to obtain here.
Thanks,
Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV
In Microsoft Dynamics NAV 2009 we released the possibility to create reports with SSRS layout. SSRS(SQL Server Reporting Services)
SSRS Reports are designed in Visual Studio, and a new environment to design reports for Dynamics NAV.
The idea with this blog is to collect and share info, tips and tricks for this new environment for NAV, but we will also blog on non SSRS related topics.
Also this blog will give you the possibility to give directly feedback to the Reporting Team in the NAV.
If you are new to SSRS Reporting in NAV 2009 we urge you start reading these blog posts:
1. NAV 2009 - Report Designer - Introduction to the new environment
2. NAV 2009 - The structure of reports in VS report designer
3. Using variables and C/AL code in a report in NAV 2009
We looking forward to sharing our knowledge about Reporting in NAV here on this blog.
The NAV Reporting team