6
I Contents I © 2012 Enter your company name Table of Contents Part I General 1 ................................................................................................................................... 1 How Do I Show Report in Viewer? ................................................................................................................................... 1 2 How Do I Set Localization in Viewer? ................................................................................................................................... 2 3 How Do I Design New Report? ................................................................................................................................... 2 How Do I Design New Report with Custom Database? ................................................................................................................................... 3 5 How Do I Load and Design Report? ................................................................................................................................... 3 6 How Do I Load and Design Report with Custom Database? ................................................................................................................................... 4 7 How Do I Save Report on Server? ................................................................................................................................... 4 8 How Do I Set Localization in Designer? Index 0

Stimulsoft Reports.mobile FAQ.en

Embed Size (px)

Citation preview

Page 1: Stimulsoft Reports.mobile FAQ.en

IContents

I

© 2012 Enter your company name

Table of ContentsPart I General 1

................................................................................................................................... 11 How Do I Show Report in Viewer?

................................................................................................................................... 12 How Do I Set Localization in Viewer?

................................................................................................................................... 23 How Do I Design New Report?

................................................................................................................................... 24 How Do I Design New Report with Custom Database?

................................................................................................................................... 35 How Do I Load and Design Report?

................................................................................................................................... 36 How Do I Load and Design Report with Custom Database?

................................................................................................................................... 47 How Do I Save Report on Server?

................................................................................................................................... 48 How Do I Set Localization in Designer?

Index 0

Page 2: Stimulsoft Reports.mobile FAQ.en

1

© 2012 Enter your company name

1 General

1.1 How Do I Show Report in Viewer?

Use the following code.

HTML:

<%@ Register Assembly="Stimulsoft.Report.Mobile" Namespace="Stimulsoft.Report.Mobile" TagPrefix="cc1" %>…<html> <head>…</head> <body> … <cc1:StiMobileViewer ID="StiMobileViewer1" runat="server" /> … </body></html>

C#:

protected void Page_Load(object sender, EventArgs e){ StiReport report = new StiReport(); report.Load("report.mrt");

StiMobileViewer1.Report = report;}

1.2 How Do I Set Localization in Viewer?

Use the following code.

HTML:

…<cc1:StiMobileViewer ID="StiMobileViewer1" GlobalizationFile="en.xml" runat

Page 3: Stimulsoft Reports.mobile FAQ.en

General 2

© 2012 Enter your company name

="server" />…

1.3 How Do I Design New Report?

Use the following code.

HTML:

<%@ Register Assembly="Stimulsoft.Report.MobileDesign" Namespace="Stimulsoft.Report.MobileDesign" TagPrefix="cc2" %>…<html> <head>…</head> <body> … <cc2:StiMobileDesigner ID="StiMobileDesigner1" runat="server" /> … </body></html>

1.4 How Do I Design New Report with Custom Database?

Use the following code.

HTML:

…<cc2:StiMobileDesigner ID="StiMobileDesigner1" runat="server"OnCreateReport="StiMobileDesigner1_CreateReport" />…

C#:

protected void StiMobileDesigner1_CreateReport(object sender,StiMobileDesigner.StiCreateReportEventArgs e){ DataSet data = new DataSet(); data.ReadXmlSchema("Demo.xsd"); data.ReadXml("Demo.xml");

e.Report.RegData(data);

Page 4: Stimulsoft Reports.mobile FAQ.en

3

© 2012 Enter your company name

e.Report.Dictionary.Synchronize();}

1.5 How Do I Load and Design Report?

Use the following code.

HTML:

…<cc2:StiMobileDesigner ID="StiMobileDesigner1" runat="server />…

C#:

protected void Page_Load(object sender, EventArgs e){ if (Page != null && !Page.IsPostBack) { StiReport report = new StiReport(); report.Load("report.mrt");

StiMobileDesigner1.Report = report; }}

1.6 How Do I Load and Design Report with Custom Database?

Use the following code.

HTML:

…<cc2:StiMobileDesigner ID="StiMobileDesigner1" runat="server" OnLoadReport="StiMobileDesigner1_LoadReport" />…

C#:

Page 5: Stimulsoft Reports.mobile FAQ.en

General 4

© 2012 Enter your company name

protected void StiMobileDesigner1_LoadReport(object sender,StiMobileDesigner.StiLoadReportEventArgs e){ DataSet data = new DataSet(); data.ReadXml("Demo.xml");

e.Report.RegData(data);}

1.7 How Do I Save Report on Server?

Use the following code.

HTML:

…<cc2:StiMobileDesigner ID="StiMobileDesigner1" runat="server" OnSaveReport="StiMobileDesigner1_SaveReport" />…

C#

protected void StiMobileDesigner1_SaveReport(object sender,StiMobileDesigner.StiSaveReportEventArgs e){ StiReport report = e.Report; report.Save("Report.mrt");}

1.8 How Do I Set Localization in Designer?

Use the following code.

HTML:

…<cc2:StiMobileDesigner ID="StiMobileDesigner1" GlobalizationFile="en.xml"runat="server" />…

Page 6: Stimulsoft Reports.mobile FAQ.en

5

© 2012 Enter your company name