Attach a Report as PDF in e-mail

It has been a while since I blogged about how to do attach a report as PDF in e-mail here:



The files found at the NAV Team blog is a bit old now, and I have made a newer version which does not required you to hard code the computer name.

The new NAV 2009 version is found here on my SkyDrive:

and then I just upgraded this for NAV 2013 as well: 

Feel free to copy the code.

You might also note that I have a lot of other examples at my Public folder at SkyDrive. Feel free to explore and steal any examples I have placed there, direct link to My Public folder is Smile

When I started adding examples in my Public Folder, only NAV 2009 existed, so I did not think of creating a NAV 2009 folder. So all examples in the root is for NAV 2009. Now I don’t want to move them since I will brake any links to these files.
I will make you guess what report examples can be found in the NAV 2013 folder Smile

Again feel free to copy any of my examples, if you find them usefull of course.

/Thanks, Claus Lundstrøm, &

How to Shut down and Restart Windows 8 using only the keyboard

Update June 26 2013: In Windows 8.1 just hit WINDOWS+X+U+U to Shut down your computer. Thanks Microsoft for making this easier in Windows 8.1


I know this tip is not Dynamics NAV related but ever since I upgraded to Windows 8, the only thing that has really been a pain for me, is that I could not Shut Down the computer without using the mouse. Finally I found the solution, so here it is:

Press WINDOWS+M and then press ATL+F4

You will then get this option:


This works both from within Metro UI and normal Desktop.

Finally I’m happy with Windows 8 and it has been a puzzle to me why the Power Button is so well hidden in Windows 8, but just like RDLC reports things are easy to do when you know which buttons to press. Maybe the engineers building Report Designer in Visual Studio are the designers behind the Power Button in Windows 8 as well. I would not be surprised if that was the case Smile

BTW, If you are using Remote Desktop to Windows Server 2012, the same above options work and you get this this option:


Here you even have the option to uncheck “Planned” if you did not plan to close down the computer SmileAnd you need to write a comment why you are shutting down the computer before the “OK” button is available. We have support for 511 characters in this textbox, so don’t be shy explaining why you want to shut down the computer.

/Thanks, Claus Lundstrøm, &