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
Thanks Claus,
I was not aware of the comment thing.
LikeLike
Great post, it will sure help anyone 🙂
LikeLike
I added my vote, but I am #42. Will need a lot more votes for Microsoft to take it seriously.
LikeLike
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.
LikeLike
Brilliant workaround to a really annoying bug. Thanks for posting this tip.
LikeLike
Hi,
That avoided the meltdown of one my team member.
Thanks for him and his sanity 🙂
LikeLike
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?
LikeLike
Like Stephen said, no idea how you discovered this but so glad you did and that you published it, nice one.
LikeLike
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 🙂
LikeLike
THANK YOU!!!
LikeLike
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
LikeLike
thank you sir 🙂
LikeLike