Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, Power Apps, Power Automate, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates and new features to Dynamics 365 planned through March 2020
Release overview guides and videos Release Plan | View virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
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!
Pro/Cons... if you are writing a report for documents like invoice, shipping document, orders, and so on.. you have no alternatives to use Set/GetData functions, it's the only way.
Thank you for the reply.
Just one question,
How does GetData() and SetData() helps on a report's performance?
simply add the dataitem field No_SalesInvHdr to the report header of report 206, means add a textbox with value expression: =First(Fields!No_SalesInvHdr.Value, "DataSet_Result"). That works, if you print one invoice.
for printing a couple of invoices: add a textbox to the body section, set property hidden to true, set value/expr. to Fields!No_SalesInvHdr.Value, set name=RepItemSalesInvHeaderNo, add a textbox to the header, set expression to =ReportItems!RepItemSalesInvHeaderNo.Value. so you do not need set/getdata.
getdata/setdata can be used, but reduces the performance.
This is a valuable tip. I will try out and then write a blog article to correct it. How can I give credits to you?
Agreed with both the Blog post and the Jonathans idea. GetData/SetData reduces the performance of the report and it makes report more complex than we need. I rarely use the GetData and SetData in a report (unless I don't have any other option).
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.
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.
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.
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
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
It Worked for me. However you can also watch the YouTube video on the link below
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
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 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?
Business Applications communities