RS First Dynamics NAV Blog


...from NAV 3.60 to NAV 2013
Archivio Posts
Anno 2015

Anno 2014

Anno 2013

Anno 2012

Anno 2011

Anno 2010

Anno 2009

Anno 2008

Anno 2007

Redesign Matrix Forms NAV 2009

Redesign Matrix Forms

NAV 2009 SP1

The matrix box control is not supported by the RoleTailored client. Therefore, to create the same matrix layout and functionality on a transformed page, you must design a new form to replace the original matrix form.

In a matrix form, the table is a matrix box control, which is different from a table box control that has a finite number of rows and columns. A matrix box brings in data from two tables in the database and displays one set of data as lines and one set of data as columns. The matrix box calculates values using the data from the two tables. Each cell in the matrix represents an intersection of the two tables. For example, in form 554, Analysis by Dimensions, the table shows account information and date information from different tables and calculates a value based on the account data on a given date. In the matrix table, you can scroll through an infinite set of dates to view the calculated values.

In the RoleTailored client, because matrix box controls are not supported, you must display the information in a table that has a finite number of columns. To achieve the matrix behavior, you must allow the user to change the columns and filters, and you must refresh the data in the table with each change.

You cannot use the transformation tool to transform a matrix form into a page. Instead, you must create a form to replace the matrix form. The new form has the following characteristics:

  • -One or more tabs with the filters from the original form.

  • -Controls for selecting the next or previous column.

  • -Controls for selecting the next or previous set of columns.

  • -Controls for selecting the next or previous period. This is only required if this functionality is on the original form.

  • -A table box control that shows the data that is selected by the options, filters, and controls.

If you isolate the matrix table on a subform instead of including a table box on the main form, then you can use the functions in codeunit 9200 to manage the behavior of the new matrix forms. For more information about the content of codeunit 9200, see Codeunit 9200 Matrix Management.

The following illustration shows form 113, Budget, before redesign.

Matrix Form 113, Budget

The following illustration shows the redesigned form.

Redesigned form 9202, Budget

To create the new form

  1. 1. On the Tools menu, click Object Designer.

  2. 2. In Object Designer, select the form that you want to replace, and then click Design.

  3. 3. On the File menu, click Save As to save the form with the new form ID.

  4. 4. In Form Designer, select the Matrix Box control, and then on the Edit menu, click Delete.

  5. 5. In Form Designer, add a Table Box control. For more information, see How to: Create a Table Box.

  6. 6. On the View menu, click Field Menu.

  7. 7. In the Field Menu, select the fields that were in the left columns of the original matrix form.

  8. 8. Add additional TextBox controls to the table for the additional columns that you want in your new table. These columns replace the matrix columns on the right of the original matrix form.

  9. 9. Define two array variables:

    • ---A Text array variable for the column captions, such as MyColumnCaptions

    • ---An array variable, typically Decimal, for the calculated values of a line, such as MyColumnValues

  10. Specify the value of the SourceExpr property of the new TextBox controls as MyColumnValues[ColumnNumber]. Specify the value of the CaptionClass property as '3,'+MyColumnCaptions[ColumnNumber] where ColumnNumber is 1 for the first column, 2 for the second column, and so on. You must add code to the OnAfterGetRecord form trigger to calculate each cell value and column header.

    NoteNote

    10. Use the matrix box on the original form, the C/AL code on that matrix box, and the redesigned matrix forms in the standard application as guidance for creating this table. For more information about the redesigned matrix forms, see Redesigned Matrix Forms.

  11. 11. Redesign the code on the form as necessary to ensure that the functionality on the redesigned form works as expected

    NoteNote

    Each form is different, so you must evaluate the code on each matrix form individually. Use a page or a redesigned form that is similar to the matrix form for guidance when redesigning.

  12. 12. On the File menu, click Save.. Confirm that the Compile check box is selected, and then click OK.

  13. article from MSDN: link      http://msdn.microsoft.com/en-us/library/dd355131.aspx
venerdì, 22 ott 2010 Ore. 10.15

Messaggi collegati


Statistiche
  • Views Home Page: 471.754
  • Views Posts: 889.088
  • Views Gallerie: 0
  • n° Posts: 343
  • n° Commenti: 0
Copyright © 2002-2007 - Blogs 2.0
dotNetHell.it | Home Page Blogs
ASP.NET 2.0 Windows 2003