Displays a pivot grid from a resultset.
Supports row, column and cell links.
To define a column link use colid={0} in passing fields.
To define a row link use rowid={2} in passing fields.
To define a cell link use rowid={2}&colid={0} in passing fields.
Cell links are only visible from the navigator. The grid can be dynamically sorted by columns and/or rows by the user.
Possible value | Description |
---|---|
xlsx | The document is generated as a Microsoft Excel 2007 (*.xlsx) document. InfoSql and style information will be rendered. |
text | The document is generated as tab separated text. InfoSql and style information will not be rendered. This mode causes a warning when opened in Microsoft Excel 2007 and later versions. |
SQL that returns data for the pivot grid. The original sorting order of the grid will be the order of appearance of rows and columns in this result set.
Allows you to validate the parameters supplied by the user before any other SQL is run in the component. This call is only made if the component has visible parameters, the SQL is a stored procedure, and 'Validate parameters' is checked.
SQL that can have several resultsets that are displayed at top of component.
Possible value | Description |
---|---|
Center | Center aligned. |
Left | Left aligned. |
Right | Right aligned. |
Possible value | Description |
---|---|
boolean checkbox | Legacy alias. Use "checkbox" instead. |
boolean dropdown | |
chart | |
checkbox | |
Checkbox tree | |
colorpicker | |
date | |
datetime | |
dropdown | |
file | |
heading | |
heading with checkbox | |
hidden | |
html | |
info text | |
listbox | |
multi-listbox | |
multi-picker | |
multirow | |
password | |
picture | |
radio buttons | |
textarea | |
textbox | |
textbox with autosearch | |
textbox with autosuggest | |
textbox with dropdown | |
textbox with popup | |
time | |
uneditable text |
Possible value | Description |
---|---|
Default | Inherit layout from menu item. |
LabelAbove | Full width, label above. |
LabelLeft | Label to the left. |
NoLabel | Full width, no label. |
Standard | Deprecated. Use LabelLeft instead. |
Possible value | Description |
---|---|
Hyperlink | |
MailToLink | |
PhoneLink |
Possible value | Description |
---|---|
Current | This is the current step. |
Done | This step has been completed successfully. |
Failed | Something went wrong in this step. |
Future | This step is later on in the process. |
Use this call to restrict which entries a user is allowed to view and edit, and to log which entries a user views.
Access to a menu item is normally controlled through functions and roles alone but some entities need more fine grained control. For example, a user may have access to the View Member menu item for normal members but not for members with a protected identity.
The menu items a user visits are always logged (in ADMINLogMenuItem) but for sensitive data you may need to log exactly what entries are viewed. Do the logging in this call as the common ways of viewing data (grid and InfoSQL) are not allowed to modify the database.
If you bind a scalar function instead of a stored procedure to this call then its name must end with '_GrantAccess'.
Example of how a many-to-many-relationship can be displayed in a pivot grid by using CROSS APPLY of all possible values and then a LEFT JOIN for all active combinations.
CREATE PROCEDURE dbo.Pivot_Test
AS
BEGIN
SET XACT_ABORT, NOCOUNT ON
SELECT
D.DayId,
D.DayName,
G.GroupId,
G.GroupName,
CASE WHEN GW.GroupId IS NOT NULL THEN 'Ja' ELSE NULL END [CellValue]
FROM
(
VALUES -- Alla möjliga kolumner
( 1, 'Måndag' ),
( 2, 'Tisdag' ),
( 3, 'Onsdag' ),
( 4, 'Torsdag' ),
( 5, 'Fredag' )
) D (DayId, DayName)
CROSS APPLY
(
VALUES -- Alla möjliga rader
(1, 'Pegasus'),
(2, 'Orion'),
(3, 'Lynx'),
(4, 'Taurus')
) G (GroupId, GroupName)
LEFT JOIN
(
SELECT -- Alla celler som skall ha "ja" ifyllt.
GW.GroupId,
GW.DayId
FROM
(
VALUES
(1, 1), -- Pegasus jobbar måndagar
(2, 2), --Orion jobbar tisdagar
(2, 4), -- Orion jobbar torsdagar
(3, 3), -- Lynx jobbar onsdagar
(4, 3) -- Taurus jobbar onsdagar
) GW (GroupId, DayId)
) GW ON
GW.GroupId = G.GroupId AND
GW.DayId = D.DayId
ORDER BY
G.GroupName,
D.DayId
END