Multiple columns for same intersection in a Matrix

Daveus
Member Posts: 8
Hi All,
I'd like to have a matrix where there would be 2 columns for the same intersection
For instance, my columns are countries, and my rows are items, and for each intersection of an item-country, I need to display 2 different infos in 2 différent columns, such as a custom number and a custom description ( ...custom in the sens of crossing foreign borders, not customazible stuff! ). It's imperative that both infos are in separate columns since it has to be exportable in MS Excel, and it has to be in 2 different columns in Excel.
Anyone has a solution?
Thanx
I'd like to have a matrix where there would be 2 columns for the same intersection
For instance, my columns are countries, and my rows are items, and for each intersection of an item-country, I need to display 2 different infos in 2 différent columns, such as a custom number and a custom description ( ...custom in the sens of crossing foreign borders, not customazible stuff! ). It's imperative that both infos are in separate columns since it has to be exportable in MS Excel, and it has to be in 2 different columns in Excel.
Anyone has a solution?
Thanx
0
Comments
-
Pretty simple actually. You can even make code to have a variable number of columns, but 2 is easy.
Use integer as source for the Columns. Set the range filter to '1..' or '>0'
Create a new function in the Form like this:DisplayValue(ColumnNo) Text; ActualColumnNo := columnno div 2; Country.reset; Country.findset; country.next(actualcolumnno); // this is slow, so only if there are a small number of records. Case columnno mod 2 of 0 : BEGIN // first column ColumnType := 1; // put code in here to work out what needs to display in the first column exit(country.name); END; 0 : BEGIN // first column ColumnType := 2; // put code in here to work out what needs to display in the first column exit(country.SpecialDescription); END; end;
Then as source expression in the Matrix box call this function with the appropriate parameters.David Singleton0 -
By the way, you can also use the same function by adding another passing parameter to set up things like BOLD or COLOR, so I would normally have one heading in bold and the other normal, or maybe use gray for one column.
The only really issue with this solution is that you can't have different widths for each column.
Oh and it can also be WRITEable, I have used this where the user can modify the data. That needs some more code of course. But this should get you started.David Singleton0 -
Interesting idea.
Is your case sentence correct? It seems somewhat identical....
Thank you.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