How to access text box value in SSRS using ReportItems

shanabeywicrema
Member Posts: 53
Today I am going to share little bit important lesson. But I will hope you have already know this. Most of the times you might be required to access another text box value in Dynamics NAV report layout. For instance, Some times, developers want to show total on the top of the report, Like Total Invoice Value. Also in the body you have calculated the line wise value and you have the total with you. But you cannot show it at the beginning. Now you might be seeking a solution.
You may wondering there is a in built function called ReportItems. Simple and straightforward. The ReportItems includes text boxes that are in the current scope of a page header, footer, or body. This will identify at run time by the report processor/report render.
You may find good example in Microsoft (MSDN) website. So same example I will show here.
This expression, placed in a text box, displays the value of a ReportItem text box named Textbox1:
=ReportItems!Textbox1.Value
This expression, placed in a ReportItem text box Color property, displays the text in black when the value is > 0; otherwise, the value is displayed in red:=IIF(Me.Value > 0,"Black","Red")
This expression, placed in a text box in the page header or page footer, displays the first value per page of the rendered report, for a text box named LastName:
=First(ReportItems("LastName").Value)
Simply use ReportItems then use the textbox value.
You may wondering there is a in built function called ReportItems. Simple and straightforward. The ReportItems includes text boxes that are in the current scope of a page header, footer, or body. This will identify at run time by the report processor/report render.
You may find good example in Microsoft (MSDN) website. So same example I will show here.
This expression, placed in a text box, displays the value of a ReportItem text box named Textbox1:
=ReportItems!Textbox1.Value
This expression, placed in a ReportItem text box Color property, displays the text in black when the value is > 0; otherwise, the value is displayed in red:=IIF(Me.Value > 0,"Black","Red")
This expression, placed in a text box in the page header or page footer, displays the first value per page of the rendered report, for a text box named LastName:
=First(ReportItems("LastName").Value)
Simply use ReportItems then use the textbox value.
-1
Comments
-
shanabeywicrema wrote: »Today I am going to share little bit important lesson. But I will hope you have already know this. Most of the times you might be required to access another text box value in Dynamics NAV report layout. For instance, Some times, developers want to show total on the top of the report, Like Total Invoice Value. Also in the body you have calculated the line wise value and you have the total with you. But you cannot show it at the beginning. Now you might be seeking a solution.
You may wondering there is a in built function called ReportItems. Simple and straightforward. The ReportItems includes text boxes that are in the current scope of a page header, footer, or body. This will identify at run time by the report processor/report render.
You may find good example in Microsoft (MSDN) website. So same example I will show here.
This expression, placed in a text box, displays the value of a ReportItem text box named Textbox1:
=ReportItems!Textbox1.Value
This expression, placed in a ReportItem text box Color property, displays the text in black when the value is > 0; otherwise, the value is displayed in red:=IIF(Me.Value > 0,"Black","Red")
This expression, placed in a text box in the page header or page footer, displays the first value per page of the rendered report, for a text box named LastName:
=First(ReportItems("LastName").Value)
Simply use ReportItems then use the textbox value.
You are posting the information as its just like the issue. It misleads the viewers. Please post this type of posts in "How Tos sections" so that i won't confuse the viewers. ThanksBest Regards
Zohaib Ahmed
Dynamics NAV ERP Technical Consultant.
please like / agree / verify my answer, if it was helpful for you. thanks.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K 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
- 320 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