File tree Expand file tree Collapse file tree 2 files changed +12
-17
lines changed
CS/DevExpress.AI.Samples.Blazor Expand file tree Collapse file tree 2 files changed +12
-17
lines changed Original file line number Diff line number Diff line change 17
17
</DxGridLayoutItem >
18
18
<DxGridLayoutItem Area =" cards" CssClass =" welcome-cards" >
19
19
<Template >
20
- <NavLink class =" welcome-card" href =" /reportviewer" >
21
- <svg class =" welcome-card-img" alt =" report viewer card" >
22
- <use href =" cards.svg#reports" ></use >
23
- </svg >
24
- <div class =" welcome-card-text" >Report Viewer</div >
25
- <div class =" welcome-card-back" ></div >
26
- </NavLink >
27
20
<NavLink class =" welcome-card" href =" /grid" >
28
21
<svg class =" welcome-card-img" alt =" grid card" >
29
22
<use href =" cards.svg#grid" ></use >
30
23
</svg >
31
24
<div class =" welcome-card-text" >Grid</div >
32
25
<div class =" welcome-card-back" ></div >
33
26
</NavLink >
27
+ <NavLink class =" welcome-card" href =" /reportviewer" >
28
+ <svg class =" welcome-card-img" alt =" report viewer card" >
29
+ <use href =" cards.svg#reports" ></use >
30
+ </svg >
31
+ <div class =" welcome-card-text" >Report Viewer</div >
32
+ <div class =" welcome-card-back" ></div >
33
+ </NavLink >
34
34
</Template >
35
35
</DxGridLayoutItem >
36
36
</Items >
Original file line number Diff line number Diff line change 1
1
using DevExpress . Blazor . Reporting . Models ;
2
2
using DevExpress . XtraReports . UI ;
3
3
4
- namespace DevExpress . AI . Samples . Blazor . Models
5
- {
6
- public class UserAssistantTabContentModel : ITabContentModel
7
- {
4
+ namespace DevExpress . AI . Samples . Blazor . Models {
5
+ public class UserAssistantTabContentModel : ITabContentModel {
8
6
public TabContentKind Kind => TabContentKind . Custom ;
9
7
Func < XtraReport > GetReport ;
10
8
bool reportReady = false ;
11
9
public bool GetVisible ( ) => reportReady && ( GetReport ( ) ? . PrintingSystem ? . PageCount ?? 0 ) > 0 ;
12
10
13
- public UserAssistantTabContentModel ( Func < XtraReport > getReport )
14
- {
11
+ public UserAssistantTabContentModel ( Func < XtraReport > getReport ) {
15
12
GetReport = getReport ;
16
13
}
17
14
18
- public MemoryStream GetReportData ( )
19
- {
15
+ public MemoryStream GetReportData ( ) {
20
16
var ms = new MemoryStream ( ) ;
21
17
GetReport ( ) ? . PrintingSystem . ExportToPdf ( ms ) ;
22
18
ms . Position = 0 ;
23
19
return ms ;
24
20
}
25
21
26
- public Task InitializeAsync ( )
27
- {
22
+ public Task InitializeAsync ( ) {
28
23
reportReady = false ;
29
24
return Task . CompletedTask ;
30
25
}
You can’t perform that action at this time.
0 commit comments