Newbie-Question - Count with filter
neckit
Member Posts: 24
I know, that I can use a flowfield to count the records of a table.
And I also know, that I can set the SourceExpr of a Textcontrol to "Table1.Count" to Count all records of the Table.
But Must I use Table-Flowfields or can I use the SourceExpr of a Text-Control with conditions simular to the following:
Table1.Count // all records of Table1
Table2.Count // all records of Table2
Table1.Count (Where (Status = 1)) // records in Table1 with Status = 1
Table2.Count (Where (Status = 1)) // records in Table2 with Status = 2
So I could use different counting-Fields for statistics with a DateFilter.
Thank you
And I also know, that I can set the SourceExpr of a Textcontrol to "Table1.Count" to Count all records of the Table.
But Must I use Table-Flowfields or can I use the SourceExpr of a Text-Control with conditions simular to the following:
Table1.Count // all records of Table1
Table2.Count // all records of Table2
Table1.Count (Where (Status = 1)) // records in Table1 with Status = 1
Table2.Count (Where (Status = 1)) // records in Table2 with Status = 2
So I could use different counting-Fields for statistics with a DateFilter.
Thank you
0
Comments
-
neckit wrote:I know, that I can use a flowfield to count the records of a table.
And I also know, that I can set the SourceExpr of a Textcontrol to "Table1.Count" to Count all records of the Table.
But Must I use Table-Flowfields or can I use the SourceExpr of a Text-Control with conditions simular to the following:
Table1.Count // all records of Table1
Table2.Count // all records of Table2
Table1.Count (Where (Status = 1)) // records in Table1 with Status = 1
Table2.Count (Where (Status = 1)) // records in Table2 with Status = 2
So I could use different counting-Fields for statistics with a DateFilter.
Thank you
Table1.SETRANGE(Status, 1);
MESSAGE(FORMAT(Table1.COUNT));
It's not a good solution use the count property of a table as a SourceExpr. It's not very efficient way to obtain a statistical info.
MatteoReno Sistemi Navision Developer0 -
Thanks for your replie but I think, you don't understand me.
So here a better description of my problem.
I have a Table like this:
No......Status...Date
1........1..........
2........3..........
3........2..........
4........1..........
5........1..........
Now I want the following statistical infos in one Form, which I can filter with a Date
No. all: 5
No. with Status '1': 3
No. with Status '2': 1
I can use a new Table with flowfields but then I think, i can not use a Datefilter ?!
What's the best solution for this?0 -
Two additional flowfilter fields "Status Filter" and a "Date Filter" are necessary. The filter values of these fields have to be added to the Calcformula of the Count-Flowfield. Take a look at the "Net Change" Field in the Item table to understand the concept of flowfilter and flowfield interaction.
If a new key (or sum index) on the table providing the data is necessary, Navision will tell you exactly what key it needs the first time you try to run the table with the flowfields.Kai Kowalewski0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
