-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
31 lines (25 loc) · 1.26 KB
/
Program.cs
File metadata and controls
31 lines (25 loc) · 1.26 KB
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
using System;
using System.Runtime.InteropServices;
namespace TestReportsApp {
class Program {
static void Main(string[] args) {
Console.WriteLine(RuntimeInformation.OSDescription);
// https://docs.devexpress.com/XtraReports/401730/create-end-user-reporting-applications/web-reporting/asp-net-core-reporting/use-the-devexpress-cross-platform-drawing-engine
// Register the Cross-Platform drawing engine before you create a report instance.
RegisterDrawingEngine();
var report = new Reports.HiddenColumnsReport();
report.CreateDocument();
report.ExportToPdf("HiddenColumnsReport.pdf");
report.ExportToImage("HiddenColumnsReport.png", new DevExpress.XtraPrinting.ImageExportOptions() { Resolution = 200 });
Console.WriteLine("Done!");
}
static void RegisterDrawingEngine() {
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
DevExpress.Printing.CrossPlatform.CustomEngineHelper.RegisterCustomDrawingEngine(
typeof(
DevExpress.CrossPlatform.Printing.DrawingEngine.PangoCrossPlatformEngine
));
}
}
}
}