Filter in report

sharon95
Member Posts: 183
I would like to write a code like this in a report
=iif(Int(Filter(Fields!SJ_Amount.Value,"0")) > 1, "# " + Last(Fields!TotAmount.Value), Last(Fields!TotAmount.Value)
I want to set a filter in the Amount rows, if it exists at least one row with the amount equal to 0 then I want to print "# Amount", else "Amout"
it prints "#Error"... Help meeeee! thanks!
=iif(Int(Filter(Fields!SJ_Amount.Value,"0")) > 1, "# " + Last(Fields!TotAmount.Value), Last(Fields!TotAmount.Value)
I want to set a filter in the Amount rows, if it exists at least one row with the amount equal to 0 then I want to print "# Amount", else "Amout"
it prints "#Error"... Help meeeee! thanks!
0
Best Answer
-
it should work with
=iif(Min(Fields!SJob_Amount.Value) = 0,"# ","") & Last(Fields!TotalAmount.Value)best regards
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/5
Answers
-
You shoud convert bolded value to string:
=iif(Int(Filter(Fields!SJ_Amount.Value,"0")) > 1, "# " + Last(Fields!TotAmount.Value), Last(Fields!TotAmount.Value)
... and closing parentese missing0 -
You shoud convert bolded value to string:
=iif(Int(Filter(Fields!SJ_Amount.Value,"0")) > 1, "# " + Last(Fields!TotAmount.Value), Last(Fields!TotAmount.Value)
... and closing parentese missing
Like this =iif(Int(Filter(Fields!ServiceJob_Amount.Value,"*")) > 1, "** " + Last(Fields!TotalAmount.Value), Format(Last(Fields!TotalAmount.Value),"Text")) ?
I still get an error.. also format(..,"String") gives me an error0 -
also this doesn't work...
=iif(Count(Filter(Fields!SJob_Amount.Value,0)) > 1, "# " + Last(Fields!TAmount.Value).ToString, Last(Fields!TAmount.Value).ToString)0 -
it should work with
=iif(Min(Fields!SJob_Amount.Value) = 0,"# ","") & Last(Fields!TotalAmount.Value)best regards
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/5
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