Creating Matrix with two cells in one column?

Tiwaz
Member Posts: 98
Hello experts.
I need to create a matrix page as in the picture.
As you can see, I practically need two cells under one date column header (For example, for the 1st day, it's "P" and "K").
Can this be done? I am not very experienced in making matrices.
I used MatrixManagement.GeneratePeriodMatrixData function.
I tried to create Matrix_ColumnCaption rray with dimension 31, and Matrix_CellData array with dimension 62, but I think tis is not a good way to do this?
Thank you in advance!

I need to create a matrix page as in the picture.
As you can see, I practically need two cells under one date column header (For example, for the 1st day, it's "P" and "K").
Can this be done? I am not very experienced in making matrices.
I used MatrixManagement.GeneratePeriodMatrixData function.
I tried to create Matrix_ColumnCaption rray with dimension 31, and Matrix_CellData array with dimension 62, but I think tis is not a good way to do this?
Thank you in advance!

0
Answers
-
Hi,
I think that it's impossible to do this via repeater control.
But if you just need to display information then you can use WebPageViewer control.
Below you can find an example how to do this:OBJECT Page 50255 HTML Matrix { OBJECT-PROPERTIES { Date=22.07.19; Time=16:00:00; Modified=Yes; Version List=; } PROPERTIES { OnOpenPage=VAR I@1000000000 : Integer; J@1000000001 : Integer; BEGIN HTMLText := '<TABLE cellspacing="0" border="1" bordercolor="#DDDEEE" cellpadding="2" style="font-family:Verdana,Arial;font-size:8pt;border-collapse: collapse;">'; // Generate header FOR I := 1 TO 2 DO BEGIN HTMLText += '<TR><TD></TD>'; FOR J := 1 TO 31 DO BEGIN IF I = 1 THEN HTMLText += STRSUBSTNO('<TH colspan=2>%1</TH>', J) // Merge 2 cells in the first row ELSE HTMLText += '<TH>VM</TH><TH>NM</TH>'; END; HTMLText += '</TR>'; END; // Generate lines FOR I := 1 TO 5 DO BEGIN HTMLText += STRSUBSTNO('<TR><TD>Line %1</TD>', I); FOR J := 1 TO 31 DO HTMLText += '<TD>P1</TD><TD>K2</TD>'; HTMLText += '</TR>'; END; HTMLText += '</TABLE>'; END; } CONTROLS { { 1000000000;;Container; ContainerType=ContentArea } { 1000000002;1;Field ; CaptionML=ENU=Field Caption; SourceExpr='Text field' } { 1000000001;1;Field ; Name=WebPageViewer; ControlAddIn=[Microsoft.Dynamics.Nav.Client.WebPageViewer;PublicKeyToken=31bf3856ad364e35] } } CODE { VAR HTMLText@1000000000 : Text; EVENT WebPageViewer@-1000000001::ControlAddInReady@8(callbackUrl@1000000000 : Text); BEGIN CurrPage.WebPageViewer.SetContent(HTMLText); END; EVENT WebPageViewer@-1000000001::DocumentReady@9(); BEGIN END; EVENT WebPageViewer@-1000000001::Callback@10(data@1000000000 : Text); BEGIN END; EVENT WebPageViewer@-1000000001::Refresh@11(callbackUrl@1000000000 : Text); BEGIN CurrPage.WebPageViewer.SetContent(HTMLText); END; BEGIN END. } }
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