Never close down Visual Studio when designing RDLC Reports

One thing I often see when I see other people designing RDLC Reports is that they almost have the Report Dataset Designer maximized in NAV Object Designer. Nothing wrong with that at all, but when they are designing RDLC reports in Visual Studio and hit ESC in NAV to run the report they always get this message in NAV

“The report layout is currently open in the report designer. You must close the report designer window before closing the report object.”

image

The reason for this message is that NAV team is protecting you from closing down the Report Dataset Designer and their by loosing the connection to the report.rdlc file currently being designed. This protection was introduced in NAV 2009 SP1, since NAV 2009 RTM version you could open multiple versions of Visual Studio and then potential loosing a lot of work done in Visual Studio before importing it back to NAV.

So now the problem comes, because what I then see people doing are navigating to Visual Studio and closing down Visual Studio. To me this is fine if they know the report is completely done, but very often they are still developing the report. If you also do this, I suggest that you do not close down Visual Studio, since Visual Studio has a great feature called “Undo”. Often when designing RDLC reports you make a change that you want to verify and if you have closed Visual Studio you have lost the possibility to revert to an earlier version. I know many of you guys are not used to have this possibility, since we in NAV do not have this possibility. BTW, this would be great if we had this possibility in NAV, Microsoft please make this happen :-) Undoing things is much faster then undevelop things. And you do not need to close the Report Dataset Designer window to run the report in NAV, just hit CTRL+R or if you are a mouse person select “File / Run”

But if you keep Visual Studio open, how do you get your changes back into NAV?
You have 2 options:

Option 1. Save the changes in Visual Studio (CTRL+S)
or
Option 2. Build the solution in Visual Studio
Building the solution really only verifies that the XML in RDLC file is in a well formed according to rules for RDL. Notice You can build with all these options, all doing exactly the same in our scenario:

  • Build Solution(Notice that I change the shortcut to F11 :-) )
  • Rebuild Solution
  • Build Web Site
  • Rebuild Web Site

image

I prefer option no. 2 since if I have done anything wrong I get the warning in Visual Studio and do not need to take a round trip to NAV. But also notice that when using option 2, you sometimes can no warning in Visual Studio, but a warning in NAV. Why is that? Well Visual Studio is using their own compiler while NAV is using Report Viewer to verify the RDLC. There really should not be a different but sometimes you will see that everything just compiles fine in VS, and when you move to NAV you get errors, a bit strange that this is happening, but it is of course 2 different verifications so eventually they will be different, unfortunately.

Also when using option no. 2, you sometimes also get in a scenario that you can only save a new version of Report.rdlc:

image

Again why is that? Well simple, end this task in Task Manager, “Microsoft.VisualStudio.Web.Host.exe”, this process sometimes places a lock on the Report.rdlc file you are currently designing and when you try to save it, you cannot since it is locked by the “Microsoft.VisualStudio.Web.Host.exe” and you are presented with the Save As dialog. Quite a pain if you don’t know that you can just end the “Microsoft.VisualStudio.Web.Host.exe” task in Task Manager.

image

But I have gotten used to this and keeping Visual Studio open all the time, until I’m completely done, I can always undo the changes that I made and I can easily go 10-40 steps back if I have gone down a path I shouldn’t have.

Warning! In Visual Studio 2010(NAV 2013) and Visual Studio 2012 / 2013 (NAV 2013 R2) this works fine, but in Visual Studio 2008 (NAV 2009) you seem to be able only to undo 10 steps back, but really you should not design RDLC reports in NAV 2009 since this is using RDLC 2005 which is pretty much a beta version in my eyes. RDLC 2008 and RDLC 2010 are much more mature. We though still miss the possibility to have the Page No. in the body of our reports for RDLC to really grow up and be an adult Report Designer. Microsoft, will we ever be able to have the Page No. in the body of our reports? Would solve majority of the problems I have with RDLC Reports.

/Claus Lundstrøm, now at Continia working on a secret product -)

Free Visual Studio designer for NAV 2015 and NAV 2013 R2

Finally we now have a free version of Visual Studio we can use to design reports in Microsoft Dynamics NAV 2015 and Microsoft Dynamics NAV 2013 R2.

Microsoft Visual Studio Community 2013

image  Yes we have Report Builder, but if you have worked with Report Builder and also worked with Visual Studio, you know that Report Builder is limited in functionality. I especially are missing Document Outline and Layout Toolbar in Report Builder, so I feel like I have my hands tied behind my back when designing reports with Report Builder. But now we have Microsoft Visual Studio Community 2013 to design reports in NAV 2015 and NAV 2013 R2 ;-)

Here is a tip when you are installing:

You only need to install “Microsoft Web Developer Tools” for being able to design reports in NAV 2015 and NAV 2013 R2.

image

Please pay attention to who can use Visual Studio Community:

image

And this will not work on the RTM version of NAV 2013 R2, so you need to be on at least Cumulative Update 2 or apply this hotfix if you are on the RTM version:
http://mibuso.com/blogs/clausl/2013/12/16/visual-studio-2013-is-now-supported-in-nav-2013-r2/

Thanks for the tip Ivo Rijcken

/Claus Lundstrøm, now at Continia working on a secret product :-)

Report Builder was unable to paste successfully

If you found this page you might have seen this error when trying to copy 1 or more elements in Visual Studio when designing a Report: “Report Builder was unable to paste successfully

This issue is that 1 of the selected textboxes you are trying to copy has custom code in it, and then you cannot copy the textbox(es).

I.e. you cannot copy a textbox with this custom code: “Code.MyCustomeCode()

Well actually it is not an issue it is bug, which have existed many years now and Microsoft promises to fix the issue in a future version, see here and please vote:

https://connect.microsoft.com/SQLServer/feedback/details/767968/visual-studio-2008-unable-to-copy-and-paste-textboxes-in-ssrs-reports-with-custom-code-after-2008-r2-sp2-upgrade

Well future version is a bit a tricky dear Microsoft since nothing has happen since SQL Server 2008 R2, see my blog here: http://mibuso.com/blogs/clausl/2014/07/25/rdl-vs-rdlc-versions-and-dynamics-nav-v2/

So let me give you 2 workarounds. The obvious one, but hard and then the easy one.

Option 1, obvious one, but also hard if you have many textboxes with custom code:

1.Open the Expression and copy the custom code in the expression

2. Close the Expression

3. Create new textbox

4. Open Expression, and paste the custom code

5. Now set font, padding and size just like the other textbox

Option 2, the easy one:

1. Open the textbox with custom code

2. Now add a comment after the custom code.
I.e. “Code.MyCustomeCode() ‘This is my custom code’

3. Close the Expression

4. And copy the textbox

Don’t ask me why this is working, but now you have a good reason to comment your code. If you´are designing an ISV solutions or if you are the NAV team and have custom code in any of your reports be kind to add a comment in the expression so developers after you can copy your text boxes.

/Thanks, Claus Lundstrøm, MVP for Microsoft Dynamics NAV

RDL vs. RDLC versions and Dynamics NAV v.2

A few years ago I wrote a blog post outlining when each version of RDL(Server side Reporting, not supported out of the box in NAV) and RDLC(Client Side Reporting, supported in NAV) was released and which are supported in which version of Dynamics NAV. During my many Report training classes I always start explaining this chart in details.

http://mibuso.com/blogs/clausl/2012/08/08/rdl-vs-rdlc-versions-and-dynamics-nav/

I have trained over 500 NAV developers now and as always if you have been at my training, you are more than welcome to contact me if you think there was something I missed talking about during the class you attended and then I will of course guide you in the right direction for free. This way my training class just gets better and better since I don’t like to give to much free support :-) The next couple of months will be pack with training classes mainly in Denmark, Belgium and USA. If you are interested just leave your contact details here: http://mibuso.com/blogs/clausl/about/

But back to point…

Since the NAV team has been real busy is is time for an updated chart which explains when each version of RDL and RDLC was released. It also clear in this chart that the SSRS team in the SQL team, responsible for RDL is planning something big in the next version since nothing has happen since SQL Server 2008 R2, or they have stopped improvements to RDL. We all love updates and improvements, when the upgrade is easy, so let us bet on them making RDL better in next version of SQL Server. Not sure we will win that bet though, but let’s hope.
The Chart should be self explanatory, but if you join my training I will of course explain it in details:

RDL vs RDLC

/Thanks, Claus Lundstrøm, MVP for Microsoft Dynamics NAV
Abakion.com & Supplychainbox.com

Export images from RDLC report using Excel

In this small tip I will show you have to export images from a RDLC report in NAV 2013 R2. You can do this in NAV 2009 and NAV 2013 also, but then you need to convert the Excel Spreadsheet to the latest version.

Scenario A: You have embedded a image into a RDLC report and no longer have access to the original image, and for some reason you need to extract the images out of the report.

Scenario B: You would like to export i.e all item images so you can have access to all them in one folder, for this you will of course need to create a report which runs through all items and shows the image. If you don’t have a report like that, have a look at my demo report here: http://1drv.ms/1qLDYRj

Here is what you need to do.

1. Print your report to Excel and save it to disk as Report.XLSX. In NAV 2013 R2 the report will have the extension XLSX. Notice that neither NAV 2013 nor NAV 2009 will produce XLSX format here you will get XLS, the old Office 97 format.

2. Rename the Report.XLSX to Report.ZIP

3,. Now open the Report.ZIP in Explorer

4. Navigate to the folder “XL/MEDIA” and here you will find all the images which are in the report.

image

Note to do the same in NAV 2009 and NAV 2013, save the report as Report.XLS, then open the report.xls in Excel 2007 or newer and save as XLSX format. Then you also have access to the images, by renaming the Report.xlsx to Report.zip.

 

/Thanks, Claus Lundstrøm, MVP for Microsoft Dynamics NAV
Abakion.com & Supplychainbox.com

How Do I: Create Transfooter and Transheader in Microsoft Dynamics NAV 2013 R2

Some of you might have noticed that I started doing a few “How Do I” videos for Microsoft.

All the “How Do I” videos, not just the ones I have done, can be found here:http://msdn.microsoft.com/en-us/dynamics/nav/dn524022.

But the latest one I did, is not on the list yet. When you read this, the list is probably updated and the “How Do I: Create Transfooter and Transheader in Microsoft Dynamics NAV 2013 R2” has been added.

You can watch this “How Do I” video here on YouTube:

http://youtu.be/UZAN2HoC5ng

But this blog is not to complain that this list has not been updated, but only to point you to the Report Object which I’m uisng in this “How Do I” video.

So if you want to have a closer look at the report object, it is located here on my OneDrive:

 http://1drv.ms/1cC3ouA

/Thanks, Claus Lundstrøm, MVP for Microsoft Dynamics NAV
Abakion.com & Supplychainbox.com

Convergence 2014 Session now available on demand

Did you not attend Convergence 2014 a few weeks ago, or do you want to see the presentations once again. View the Convergence 2014 sessions here:

https://presentations.inxpo.com/Shows/microsoft/MSConvergence/3-14/Login/index.html

You need to click the “Register Now!” to get into the goodies.

image

/Thanks, Claus Lundstrøm, MVP for Microsoft Dynamics NAV
Abakion.com & Supplychainbox.com

Visual Studio 2013 is now supported in NAV 2013 R2

We now have support for Visual Studio 2013 with NAV 2013 R2 when designing reports.

image

Apply this hotfix:https://mbs2.microsoft.com/Knowledgebase/KBDisplay.aspx?scid=kb;EN-US;2907585, and you will then open your layout in Visual Studio 2013 if installed.

Why can we use Visual Studio 2013? Because it also supports RDLC 2010 supported in NAV 2013 R2. Here is a small overview of the different RDLC versions and NAV versions and Visual Studio versions:

RDLC 2010 = NAV 2013 R2 = Visual Studio 2013 Pro(New), Visual Studio 2012 Pro or Report Builder 3.0

RDLC 2008 = NAV 2013  = Visual Studio 2010 Pro, or Express using this tip here

RDLC 2005 = NAV 2009  = Visual Studio 2008, read more here. Do not use VS2005

Not a single of the bugs introduced in Visual Studio 2012, which I know of, has been fixed, except the possibility to use the LEFT ARROW key in expressions. In Visual Studio 2012 this is not possible. Now with Visual Studio 2013 we can now use the LEFT ARROW key. So if this is driving you crazy, go and apply above hotfix and start designing you R2 reports in Visual Studio 2013.

/Thanks, Claus Lundstrøm, MVP for Microsoft Dynamics NAV
Abakion.com & Supplychainbox.com

And the Winner is…1ClickFactory – Updated

This has been a fun week. Everybody who knows me are well aware that I always like a good competition, and also that I really hate to lose.

But 1ClickFactory upgraded the Service Contract report 5970, in less than 8 minutes. that is pretty impressive guys. So 1ClickFactory is the winner of this weeks competition if you ask me, and yes I lost, but my report was better looking. Smiley

If you missed this weeks competition you can watch me upgrade the Service Contract report 5970 manually, and Daniel Parker from ArcherPoint using the YAVEON Report Converter here, neither Daniel or I completed the report 100%, I was very close so with 10 min more I would have been done. This recording can be found here:http://spezialloesungen.yaveon.com/products/yaveon-report-converter/. The sounds is terrible so I’m really considering reshooting my manual upgrade of this report. If you would like me to do this, leave a comment, and I will do this if many people request this.

If you want to watch the winner video from 1ClickFactory go here: https://www.youtube.com/watch?v=q7Zb-Xyrl0g

Here are few pros and cons for each of the solutions from my point of view:

Manual Upgrade:

Pros:

- You become an expert in creating RDLC reports and know how to create new reports going forward.
- You will utilize many of the new capabilities and not just have a doll classic report upgraded

Cons:

- Expensive to learn how to do the RDLC reports correctly. Learning on the job is hard, because Visual Studio has its own life, and does not do what we expect it to do. You need to learn all the tips and tricks. And what works and what does not work. Report training is strongly advised. And yes I do training, but I don’t write this just for you to hire me, but if you attend a training class in RDLC I strongly recommend you verify that the trainer has upgraded many reports. If not you will just get a lecture of what you already yourself can find on the internet.

- Could easily be more costly than using a Report transformation tool, if you are not fast. And you are not fast in the beginning because your struggle.

YAVEON Report Converter

Pros:

- You can stay in your comfort zone, Classic report designer and do all tags 
- Only has a upfront fee so if you many reports, and you get good at this tool, this might be the tool to consider. But really you have to be fast in creating tags to compete with the 1ClickFactory solution. If you have purchased the tool, you can use it everywhere. So not limited to one customer or one report developer.

Cons:

- You do not learn how to design RDLC report. How do create new report?

- Learning curve for putting in the right tags in Classic designer

- Document Outline in Visual Studio is unnecessary crowed. If you do not use Document Outline when designing reports, this might of course not be a problem for you, but I use Document Outline all the time.

- You get a dull Classic report look and feel

1ClickFactory Report transformation service

Pros:

- Lightning fast

- You get to learn how to do RDLC reports a little bit, since reports will only be upgraded 60%-80%

- Nice add in tool for moving things to Page header, but really we should only have Report Title, Page number and Images in header. Having i.e. 54 fields in header using Code.Set and Code.Get is crazy.. So this is just a show off tool, you should just place a repeating row outside main group, like I showed SmileyIf you cannot figure that out, this move to header tool is great and saves tons of time.

Cons:

- Not a onetime fee, as YAVEON’s tool

- 16 clicks for report 5970 is a bit overpriced. 1 click = 15 min. of work. I know 1ClickFactory says that it would take a average Report developer 4 hours to upgrade this report. I would say it should not take more than 2 hours for a report developer, who has been at a report training class, Still 1ClickFactory would probably be cheaper, depending where your are in the world of course

- Just like with YAVEON, Document Outline in Visual Studio is unnecessary crowed. Update: The Document Outline is actually great. Please find on my SkyDrive the Document Outline which we did not see in the 1ClickFactory presentation. You can also find the upgraded report from 1ClickFactory and my manual upgraded report. My report was only 98% completed.
Files are found here: http://sdrv.ms/18IeYzY

- And you get a dull Classic report look and feel

Conclusion

So I really want to love these Report convert tools, but end of the day you need to understand how to design RDLC reports, that is my opinion of course. So I would definitely invest time in understanding how to design RDLC reports, and when you have this knowledge, you can decide to upgrade the next 200 hundred report or how many you have using either 1ClickFactory or YAVEON’s tools.
If you disagree and do not want to be an expert in RDLC reports. These tools are your new friend, if you of course are not already using them. Both YAVEON and 1ClickFactory give you the option to try out their tools for free. YAVEON has a trial version, Contact Andreas H.E. Dorsch: andorsch@yaveon.de for a trial version. This weeks winner, 1ClickFactory, will give you 20 clicks for free, so you can check out how cool their service is.

/Thanks, Claus Lundstrøm, MVP for Microsoft Dynamics NAV
Abakion.com & Supplychainbox.com

Report Transformation Competition–Updated

Holiday season is upon us and it is time for a little competition.

On Monday 9th of December you will have the opportunity to join a 2 hour Report Converter Webinar hosted by YAVEON.

In the first hour, I will I transform a report all the way from NAV 5.0 to the brand new NAV 2013 R2. To be specific I will transform the Service Contract report ID 5970.

The Service Contract contains all the elements which can be found i.e. the invoice report ID 206. So this is a good report to practice on, when learning how to design Document reports

I will manually upgrade this report, using many of the tips and tricks which I have only shared at my Report Training classes. Of course this only being an hour I will not have the opportunity to share them all.

If you tune in on Monday I will also show a new trick, which I currently have only shown to 2 people. This will speed up report writing even more, and yes of course I will blog about this later when time permits.

Since this is a competition and I hate to lose ;-) I will upgrade the report quite fast, so I might not get every step explained in details, but you can at least see all the steps I take, and then hopefully the Webinar will be made available for download. afterwards.

In the second hour, Daniel Parker from ArcherPoint will show how to upgrade the exact same report, the Service Contract ID 5970, using YAVEON Report Converter. And of course upgrade this to NAV 2013 R2 as well.

Daniel Parker is an expert in using the YAVEON Report Converter, so I’m excited to see how fast he can do this and if he can get the report to look as cool as mine, and not just as doll as the Classic report ;-)

If you want to see me cry, because Daniel is faster, sign up for this 2 hour Report Converter Webinar hosted by YAVEON here:

http://www.yaveon.de/support/seminarewebinare/details/article/yaveon-reportconverter-webinar/

I believe there is limit of 50 online viewers, so you might want to hurry up if you want a seat.

If you are interested in purchasing the YAVEON Report Converter tool, contact Andreas H.E. Dorsch

But before I end this blog post, you might also have heard that 1ClickFactory also have a Report Transformation tool. This tool differs from the YAVEON Report Converter. For the YAVEON Report Converter tool to work, the report developer are required to insert tags in the Classic report, which then guides the YAVEON Report Converted tool to transform the report correctly. This is what Daniel Parker will show. What 1ClickFactory offer is to convert the report 60-80% and then the report developer will need to make the final adjustments in Visual Studio to complete the report.

On Thursday 12th of December, 1ClickFactory is also hosting a Webinar. This Webinar is not exclusive, because Daniel and I are not be presenting Smiley, der blinker, but I would really like to challenge 1ClickFactory to also show how they upgrade the Service Contract report ID 5970, not just 60%-80% but 100%, and to make it look good as well and upgrade it to NAV 2013 R2.

Because if they do this on the 12th of December, it will be very easy for the whole NAV community to compare which solution is best, and what strategy to take when upgrading Classic report to RDLC:

1. Doing a manual upgrade, Like I do

2. Using the YAVEON Report Converter

3. Using 1ClickFactory Classic report to RDLC transformation service

So Phillip Rubino if you read this, please accept this challenge so we all can compare and see which of the above 3 solutions are the best.

Update: 1ClickFactory has accepted the challenge, see more in comments. So next week you will have the option see all 3 ways of upgrading the same Classic report.
Let the best man or tool win next week Smiley
 

/Thanks, Claus Lundstrøm, MVP for Microsoft Dynamics NAV
Abakion.com & Supplychainbox.com

Create a new blog and join in the fun!