New Report UX Guidelines for NAV RTC-reports
“New Report UX Guidelines” for RTC/RDLC-reports from Claus Lundstrøm/Microsoft Dynamics NAV Team Blog
The films on YouTube show to work easy with RDLC-reports: Here
“New Report UX Guidelines” for RTC/RDLC-reports from Claus Lundstrøm/Microsoft Dynamics NAV Team Blog
The films on YouTube show to work easy with RDLC-reports: Here
Last week I was involved in installed the software “Samsung Xchange” so now one of my clients can both dial out from Dynamics NAV, an incoming call shows the customer card or the business card in Dynamics NAV. The program need to have read-access to NAV-db…
Samsung Xchange has a lot of options such as Google maps, LinkedIn, Facebook etc.
Links: Samsung xChange , YouTube

The picture was taken today when went to the subway. (Lat N 59° 15′ 5″ Lon E 18° 1′ 38″)
It was -15° celsius..
After you have restored a NAV SQL database to your PC, you may need to unlock the database.
Here is my sql-script: SQL-tool to unlock NAV-DB (SQL-server)
This script creates a new user “TEMPUSER’ in SQL Server and NAV-database so you can log on to the NAV system.
--***************************************************************
--* Set a new user to a Dynamics NAV SQL-database
--*
--* Christer Berntsson, Sweden
--* Ver 2011-12-21
--*
--***************************************************************
use YourDatabase
go
--Create a new user in Your SQL-server
--Usersername must be upercase!
CREATE LOGIN [TEMPUSER]
WITH PASSWORD='1234!"#¤',
DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english],
CHECK_EXPIRATION=OFF,
CHECK_POLICY=OFF
EXEC sys.sp_addsrvrolemember @loginame = N'TEMPUSER', @rolename = N'sysadmin'
GO
--Set User to NAV-database
INSERT INTO [dbo].[User]
([User ID] ,[Password] ,[Name] ,[Expiration Date])
VALUES
('TEMPUSER', '', '', '1753-01-01')
--Set ROLS
INSERT INTO [dbo].[Member Of]
([User ID] ,[Role ID] ,[Company])
VALUES
('TEMPUSER', 'SUPER', '')
Ingredients:
How to:
Part 1: Publish a page-webservice inside Dynamics NAV RTC
Goto Web Services (Administation -> IT Administation -> General -> Web Services)
Click New and select Object type= Page, Object ID = 367 set Services Name to “PostCodes” and select “Published”

Now we have to check if the webservice is running
(windows) Start-> Run (or search) ->services.msc
“Microsoft Dynamics NAV Business Web Services” must be running.

Right click the project and select ”Add Web reference”In the URL write the address to your new webserviceThis can be little tricky, in my Swedish version I wrote:”http://localhost:7047/DynamicsNAV/WS/CRONUS Sverige AB/Page/PostCodes”
and when clicked the green button its changes to:
“http://localhost:7047/DynamicsNAV/WS/CRONUS%20Sverige%20AB/Page/PostCodes”
Select a name for “Web reference name” (WebRefPostCodes)
And finally hit “Add Reference”

In Visual Studio drag a GridView from Toolbox Data to the webpage in the div-box

In Visualstudio Drag a ObjectDataSource from Toolbox Data to the webpage in the div-box

Now it’s time to update the project with a Build. (to update the project)

Now it’s time to configure ObjectDataSource and GridView
Select the ObjectDataSource1 and click the small arrow and select “Configure Data Source”

Select “WebAndNav.WebRefPostCodes.PostCodes_Service”
and press “Next”

Select “ReadMultiple(postCodes_Filter[],String BokmarkKey, Int32 setSize)” and press “Next”

Press “Finish”

Next step is configure gridview:
Select the GridView and click the small arrow and chose Data Source “ObjectDataSource1”


Now it’s time to test!!
Back to Visual Studio
Hit F5 or the green “Run button”

It works! but we need some filters.
Close the browser and we are sent going back to Visual Studio.

Add a TextBox and a Button to the webb-page this will be our filter.

DoubleClick the button and this code

Public Class _Default
Inherits System.Web.UI.Page
Dim wsFilter As New List(Of WebRefPostCodes.PostCodes_Filter)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then ‘ Run when the page is new
Me.TextBox1.Text = “14100..14199″ ’set a defaultvalue
wsFilter.Clear()
‘Clear filter
Dim wsfilter1 As New WebRefPostCodes.PostCodes_Filter() ‘create a filter
wsfilter1.Field = WebRefPostCodes.
PostCodes_Fields.Code ‘filter on “code”
wsfilter1.Criteria =Me.TextBox1.Text ‘get filtervalue from textbox
wsFilter.Add(wsfilter1) ‘add filter to filterarray
Else ‘ Run when the page is “old”
Dim
wsfilter1 As New WebRefPostCodes.PostCodes_Filter() ‘create a filter
wsfilter1.Field = WebRefPostCodes.PostCodes_Fields.Code ‘filter on “code”
wsfilter1.Criteria = Me.TextBox1.Text ‘get filtervalue from textbox
wsFilter.Add(wsfilter1)‘add filter to filterarray
Me.ObjectDataSource1.Select() ‘run the select
Me
.GridView1.DataBind() ‘bind data to gridview
End If
End Sub
Protected
Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
End
Sub
Protected
Sub ObjectDataSource1_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs) Handles ObjectDataSource1.Selecting
e.InputParameters(“filter”) = wsFilter.ToArray ‘Important: converts filters to array
e.InputParameters(“SetSize”) = 1000 ‘fetch 1000 records
End Sub
End
Class
Time to format our gridview …
1. Enable paging (red 1)

2. Hide the Key-column (red 2)

3. Chose a format (red 3)

Time to test press F5 or the run button
The filter is working! Three different filters.

// The end
Hallo reader,
I’m a fan of NAV and VB.NET so my posts will mostly will include that parts.
Regards
Christer
This is a text area. Edit sidebar.php to add your own text.