-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDesigntimeReportSelection.Codeunit.al
62 lines (51 loc) · 1.81 KB
/
DesigntimeReportSelection.Codeunit.al
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
namespace Microsoft.Foundation.Reporting;
codeunit 9654 "Design-time Report Selection"
{
SingleInstance = true;
trigger OnRun()
begin
end;
var
SelectedCustomLayoutCode: Code[20];
SelectedPlatformLayoutName: Text[250];
SelectedPlatformLayoutAppID: Guid;
EmptyGuid: Guid;
// This method allows us to select layouts stored in the App Table "Custom Report Layout" table.
procedure SetSelectedCustomLayout(NewCustomLayoutCode: Code[20])
begin
SelectedCustomLayoutCode := NewCustomLayoutCode;
end;
procedure GetSelectedCustomLayout(): Code[20]
begin
exit(SelectedCustomLayoutCode);
end;
// This method allow us to select layouts stored in "Tenant Report Layout" platform table
// by their "Name" and also allows selecting layouts from the "Custom Report Layout" table.
procedure SetSelectedLayout(LayoutName: Text[250])
begin
SelectedPlatformLayoutName := LayoutName;
end;
// This method allows us to select layouts stored both in "Tenant Report Layout" and "Report Layouts Definition"
// table (Or their aggregate table "Report Layouts List").
procedure SetSelectedLayout(LayoutName: Text[250]; AppID: Guid)
begin
SelectedPlatformLayoutName := LayoutName;
SelectedPlatformLayoutAppID := AppID;
end;
procedure GetSelectedLayout(): Text[250]
begin
if SelectedPlatformLayoutName = '' then
exit(SelectedCustomLayoutCode);
exit(SelectedPlatformLayoutName);
end;
procedure GetSelectedAppID(): Guid
begin
exit(SelectedPlatformLayoutAppID);
end;
procedure ClearLayoutSelection()
begin
SelectedPlatformLayoutName := '';
SelectedCustomLayoutCode := '';
SelectedPlatformLayoutAppID := EmptyGuid;
end;
}