文档彩票走势图>>Stimulsoft Reports.WinForms教程-2019>>【Stimulsoft Reports.WinForms教程】如何以从右到左模式显示报表查看器
【Stimulsoft Reports.WinForms教程】如何以从右到左模式显示报表查看器
【下载Stimulsoft Reports.Ultimate最新版本】
此示例显示如何以从右到左模式显示报表查看器。将StiOptions.Viewer.RightToLeft选项设置为StiRightToLeftType.Yes值就足够了。这可以在应用程序初始化方法中完成:
public Form1() { StiOptions.Viewer.RightToLeft = StiRightToLeftType.Yes; // // Required for Windows Form Designer support // InitializeComponent(); }
在Form1_Load事件中,加载报表并连接到XML数据:
private void Form1_Load(object sender, System.EventArgs e) { if (File.Exists("..\\..\\Data\\Demo.xsd"))dataSet1.ReadXmlSchema("..\\..\\Data\\Demo.xsd"); else MessageBox.Show("File \"Demo.xsd\" not found"); if (File.Exists("..\\..\\Data\\Demo.xsd"))dataSet1.ReadXml("..\\..\\Data\\Demo.xml"); else MessageBox.Show("File \"Demo.xml\" not found"); dataSet1.DataSetName = "Demo"; stiReport1.RegData(dataSet1); if (File.Exists("..\\..\\Reports\\BookmarksHyperlinks.mrt"))stiReport1.Load("..\\..\\Reports\\BookmarksHyperlinks.mrt"); else MessageBox.Show("File \"BookmarksHyperlinks.mrt\" not found"); stiReport1.Load("..\\..\\Reports\\BookmarksHyperlinks.mrt"); stiReport1.Render(true); stiReport1.Info.Zoom = panel1.Zoom; if (stiReport1.CompiledReport != null) stiReport1.CompiledReport.Info.Zoom = panel1.Zoom; panel1.Refresh(); }
示例代码的结果如下图所示:
购买Stimulsoft正版授权,请点击“”哟!