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:

Well future version is a bit a tricky dear Microsoft since nothing has happen since SQL Server 2008 R2, see my blog here: http://localhost/wordpress/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


12 thoughts on “Report Builder was unable to paste successfully

  1. Your trick with the comment worked perfectly for me. I’m not sure how you figured that out but you have saved me a ton of time. Thanks for putting this out on the net.


  2. Wow, Claus, I owe you a beer or something. You are amazing. This way you can design your document header once, and copy all over, so that you have your credit notes look like your invoices etc.

    Have you tried the MS Word Layout yet?


  3. next workaround works as well:
    After copying control(s) to the buffer, change Name of source control, now you can paste without any problem.
    E.g. you have Textbox1. Copy control to buffer, change name to Textbox1Src and paste from buffer. You’ll get your result 🙂


  4. Thanks allot, after 6 years working with SSRS since “Rosetta 2005” all the way through Data Tools 2012, this didn’t amaze me very much, i wasted a life time on bugs like this ..
    Thanks again for saving me from wasting some more


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s