Announcements
Hi All,
I have been developing RDLC reports for some time now, and the most amazing feature I have come across recently is SetData() and GetData() functions.
I have written a blog article based on the difficulties I have faced, and finally how I performed in a workable way. But, I wanted to ask the community about pros/cons other than mine using SetData() and GetData() functions.
Blog post: https://goo.gl/5hLOqW
Excited to hear from you all!
*This post is locked for comments
Kindly share the report object also me
at my email:-vivekmatharoo00@gmail.com
Hey Franz,
I would like to print one report always two times. I have seen your explanation. Unclear is for me how I fill the Value...where does the layout get my value for example 2?
GetData and SetData reduces the performance of the reports and increases the complexity. Only use them when you create a report with headers in forms (sales order, quote, etc).
I've been tinkering with Reports for quite a while now aswell and i would not recomment using getData and SetData as for some of the reasons that have been already pointed out above aswell as the simple fact that the report Data breaks when using a certain character. Its most unlikely that anyone ever would use "±" in any sort of adress or name but if so all of the data in getData and SetData won't show in its proper position. This behavior is caused by the way microsoft decided to create these function which are btw also horrible in performance.
This is how SetData works:
Saves values in text arrays split by the ± character, the "group" parameter just helps microsoft organizing the arrays.
So basically your Adress Data would look like this: Name±Address±Address2±......
GetData splits those values again.
And you will probably understand my concern now. Try it out, use ± in a customers name or address.
The best way to avoid this is to either
- create your own getData and SetData functions or
- use the Reports VB codearea to save and set the data right from the dataItems in the report
It Worked for me. However you can also watch the YouTube video on the link below
Hi Dave,
I have emailed you the object and other needed guide.
Also check this post of me which explains in detail: medium.com/.../setdata-getdata-round-2-0-cc3af7d1a9df
Hi Jonathan
I also want to achieve "printing a couple of invoices" without setdata/getdata but since my English is poor I can't fully understand your explanation.
Would you kindly share the report object so I can study it ?
My email is assistan11_at_yahoo_dot_com.
Thanks in advance
strange, when i tested, it were displayed on every page. do you have a special setting on the page header or the textbox control to display the content only on the last page. check the hidden properties of the header, the textbox (button advanced).
a trick is needed to get the DocNo value on every page in the body section. a textbox control displays the value only on the first or last page, depending of it's position in the report layout. in case of the standard reports there is always a sales/purchase line table. the row header lines are displayed on every page. there normally you have a at least a second row header line, mostly empty, maybe a grapical line is displayed over that row. if there is none, create one below the first row header line, which contains the coilumn captions. show advanced properties, select the second line in the row groups, set property RepeatOnNewPage to true, if it is set to false. this tablix row is (now) displayed on every page. so on every page the content of DocNo is loaded and it can be displayed in the header area.
use in this tablix header row the first cell as textbox with name RepItemDocNo. set properties as i wrote above. that should work.
Hi Jonathan,
I tried your method.
It kind of worked, but it prints the "Invoice No." on the last page of the report only. But I needed in all pages.
crediting: with verifying my answer and mentioning me in your next blog post according that topic. i've tried my solution successfully in sales invoice report and order confirmation printing a range of documents.
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156