views:

101

answers:

1

I need the same document to be printed twice, but with one single different word when the user does one click. I have tried everything i could come up with but i can't find a way to do it. Any recommendations?

A: 

There are severals ways to do it, which depends of what you want to change and when.

You could use parameters in your report. What you do is define in your report a parameter and changes its value to whatever suits your need. In local mode, this usually works out pretty welll since you can use parameter pretty much everywhere. I do not know if it works with server mode.

I personally can't see a reason why it doesn't work, but should it happen, there is another way to do it but I don't recommend it. When you click on your button, you can create a copy of your report (i.e. create a new file) and modify the content of the report according to your need. In other word, change the content of the rdlc file to suit your need. RDLC is in fact a xml file so it's possible to modify it, then open the newly created file. Again, I do not know if it works with Server mode. Like mentionned, I do not recommend this option as it implies string manipulation and if you don't know where you're going, you might end up getting more frustation than solutions. If you know exactly what string to change and that this string is not repeated anywhere, you can use reg exp, but since XMl is not a regular language, you have to be really careful when doing so.

Hopes that help.

David Brunelle