Code methods (Reports)
timobech
Member Posts: 10
Hello,
i'm new in nav developement .
Can any one of you guys, explain to me the principe of methods specified in proprieties of report .
Thanks
i'm new in nav developement .
Can any one of you guys, explain to me the principe of methods specified in proprieties of report .
Thanks
0
Best Answers
-
Hey timobech,
Report Proprties -> Code
This section of RDLC Reports are the custom Codes written to handle some spcific conditions in the Reports. This section is completely open to write any custom logics that you are willing to create to create and use in your Reports. The only thing you need to take care any piece of code written in this area should be used with Code prefix like Code.YourFunctionName.
If you will notice this standard code written there
Public Function BlankZero(ByVal Value As Decimal)
if Value = 0 then
Return ""
end if
Return Value
End Function
You can use this function to make blank your Zero value instead of showing 0.
The Code you need to write is Code.BlankZero(Fields!X.Value);
Hope you understood.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/5 -
If you open Report 206 -> Report Property -> Code, You will find GetData and Setdata in Combination, These two codes are used to update the value of Header Dynamically when you move to Next Orders in the Report.
Now how it Works -
To use this you need to take a taxtbox in the Body of the Report. In the visibility expression you need to write something like the below snapshot (This one is the screenshot of 206 Report)
Now once you define this you need to write the values in Header Textbox something like this
Code.Getdata(1,1)
Code.Getdata(2,1)
Code.Getdata(3,1)
Code.Getdata(4,1)
These changing 1 2 3 4 represent which value mentioned in SetData you want to show here.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/5
Answers
-
Hi,
Refer below page for all Report Properties explained -
https://msdn.microsoft.com/en-us/library/dd354985.aspx
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page0 -
Hey timobech,
Report Proprties -> Code
This section of RDLC Reports are the custom Codes written to handle some spcific conditions in the Reports. This section is completely open to write any custom logics that you are willing to create to create and use in your Reports. The only thing you need to take care any piece of code written in this area should be used with Code prefix like Code.YourFunctionName.
If you will notice this standard code written there
Public Function BlankZero(ByVal Value As Decimal)
if Value = 0 then
Return ""
end if
Return Value
End Function
You can use this function to make blank your Zero value instead of showing 0.
The Code you need to write is Code.BlankZero(Fields!X.Value);
Hope you understood.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/5 -
thanks RockWithNav, but what i can't understand is : when i open expression of some textBox i see Code.getData(parameter) , so the question is :
What 's the source of this data ?
And how this data is set ?
0 -
If you open Report 206 -> Report Property -> Code, You will find GetData and Setdata in Combination, These two codes are used to update the value of Header Dynamically when you move to Next Orders in the Report.
Now how it Works -
To use this you need to take a taxtbox in the Body of the Report. In the visibility expression you need to write something like the below snapshot (This one is the screenshot of 206 Report)
Now once you define this you need to write the values in Header Textbox something like this
Code.Getdata(1,1)
Code.Getdata(2,1)
Code.Getdata(3,1)
Code.Getdata(4,1)
These changing 1 2 3 4 represent which value mentioned in SetData you want to show here.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/5 -
Thank you, RockWithNav i get it

for every one having the same diffuclties see the video below :
Click here0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 326 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions

