Hi guys I've started playing with Report Designer for NAV 2013.
Time ago I read with NAV 2013 is possible to print Fields in the header without calling them with "ReportItems!" method or using "SetData/GetData" functions.
This afternoon I wanted test it.
I put the following code in the header:
=Fields!CompanyInfo_Name.Value
And it worked.
After that I opened standard "Sales Invoice" and I found that GetData and SetData still used.
I thought they were not needed anymore but I can't find a way to avoid them if header/footer are "dynamic" like Invoices.
Testing I created a simple report wit a List in the body grouped by "Customer_No" field.
I inserted page break for every customer and then I placed 4 textboxes in the header with No, Name, Address and Search Name from the customer table.
Launching report for all customers I expect to see information in header to change but they still on the first record.
My question is: is there a way to print a "dynamic header(or Footer)" without the need of GetData/SetData fucntions?
Thank you very much,
Rik
Comments
Fields!CompanyInfo_Name.Value
as
First(Fields!CompanyInfo_Name.Value);
So it will always return the first record. And in the footer it works as Last( Fields!CompanyInfo_Name.Value);
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
It works as expected... More or Less...
no you can have dynamic values
for example
=iif(Globals!PageNumber = Globals!TotalPages,Fields!ItemNo.Value,Fields!ItemDesc.Value)
it will print item no description on last page and other pages as item no. You will need to send your dynamic data as columns on the first row.
You could build your text as comma delimited in nav and in RDLC parse it it out.
The only limitation is that you can only get from first or last row.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Or how would you solve this if you can only access first or last row? I can only think of even more ugly workarounds then the GetData/SetData already is...
Well... we will see and in the meanwhile we continue with our dear SetData/GetData.
It works as expected... More or Less...