-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathViewer.aspx.cs
34 lines (30 loc) · 1.02 KB
/
Viewer.aspx.cs
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
using Stimulsoft.Report;
using Stimulsoft.Report.Web;
using System;
namespace Changing_the_Viewer_and_Designer_Theme
{
public partial class Viewer : System.Web.UI.Page
{
static Viewer()
{
// How to Activate
//Stimulsoft.Base.StiLicense.Key = "6vJhGtLLLz2GNviWmUTrhSqnO...";
//Stimulsoft.Base.StiLicense.LoadFromFile("license.key");
//Stimulsoft.Base.StiLicense.LoadFromStream(stream);
}
protected void Page_Load(object sender, EventArgs e)
{
if (Session["theme"] != null)
StiWebViewer1.Theme = (StiViewerTheme)Enum.Parse(typeof(StiViewerTheme), Session["theme"] as string);
}
protected void StiWebViewer1_GetReport(object sender, StiReportDataEventArgs e)
{
if (e.Report == null)
{
var report = new StiReport();
report.Load(Server.MapPath(@"Reports\Invoice.mrt"));
e.Report = report;
}
}
}
}