文檔首頁>>Stimulsoft Reports.WinForms教程-2019>>【Stimulsoft Reports.WinForms教程】如何以從右到左模式顯示報(bào)表查看器
【Stimulsoft Reports.WinForms教程】如何以從右到左模式顯示報(bào)表查看器
【下載Stimulsoft Reports.Ultimate最新版本】
此示例顯示如何以從右到左模式顯示報(bào)表查看器。將StiOptions.Viewer.RightToLeft選項(xiàng)設(shè)置為StiRightToLeftType.Yes值就足夠了。這可以在應(yīng)用程序初始化方法中完成:
public Form1() { StiOptions.Viewer.RightToLeft = StiRightToLeftType.Yes; // // Required for Windows Form Designer support // InitializeComponent(); }
在Form1_Load事件中,加載報(bào)表并連接到XML數(shù)據(jù):
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(); }
示例代碼的結(jié)果如下圖所示:
購買Stimulsoft正版授權(quán),請點(diǎn)擊“咨詢在線客服”喲!