原創(chuàng)|使用教程|編輯:鄭恭琳|2015-12-25 11:01:24.000|閱讀 1674 次
概述:本片文章主要介紹Stimulsoft Reports.Net開(kāi)發(fā)者在配置報(bào)表時(shí)遇到的常見(jiàn)問(wèn)題及解決方案。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
< Stimulsoft Reports.Net v2015.3最新版本下載>
使用StiConfig類的Save和Load方法。
將靜態(tài)屬性StiOptions.Configuration.DontSaveConfig設(shè)置為true。
移除Stimulsoft.Report.config文件并返回到應(yīng)用程序。當(dāng)再次創(chuàng)建Stimulsoft Reports配置文件時(shí),你會(huì)調(diào)用StiConfig.Restore方法。該方法將會(huì)默認(rèn)恢復(fù)配置。
你應(yīng)該關(guān)閉配置的自動(dòng)保存,然后在適當(dāng)?shù)臅r(shí)間適當(dāng)?shù)牡胤郊虞d和保存配置。
使用StiConfig類的Saving和Loading事件。寫處理程序并將它們連接到這些事件中。
方法如下:
<system.diagnostics> <switches> <add name="traceLevel" value="4" /> </switches> <trace autoflush="true" indentsize="4"> <listeners> <add name="myListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="C:\Inetpub\wwwroot\ambReports1\_trace.log" /> <remove type="System.Diagnostics.DefaultTraceListener"/> </listeners> </trace> </system.diagnostics>
將靜態(tài)屬性StiOptions.Engine.HideExceptions設(shè)置為false。
使用如下代碼:
C#
//Specify the file of localization StiConfig.LoadLocalization("MyLocalization.xml");
VB
'Specify the file of localization StiConfig.LoadLocalization("MyLocalization.xml")
將靜態(tài)屬性StiOptions.Engine.HideMessages設(shè)置為true。
Stimulsoft Reports中搜索本地資源的目錄是在靜態(tài)屬性StiOptions.Configuration.DirectoryLocalization中進(jìn)行設(shè)置的。該屬性默認(rèn)值為"Localization",若有必要你也可以對(duì)該屬性值進(jìn)行修改。
在應(yīng)用程序放置的目錄里創(chuàng)建Localization目錄。復(fù)制包含本地資源的xml文件。當(dāng)運(yùn)行第一個(gè)Stimulsoft Reports時(shí)將會(huì)找到該目錄,以及所有文件的本地資源。
使用以下代碼減少關(guān)系的最大層次:
StiOptions.Dictionary.BusinessObjects.MaxLevel = 2;//By default 10
使用以下代碼實(shí)現(xiàn)從右到左的預(yù)覽模式:
StiOptions.Window.RightToLeft = StiRightToLeftType.Yes;
報(bào)表組件的坐標(biāo)被存儲(chǔ)時(shí)在厘米、毫米、英寸和百分之一英寸中。對(duì)話框的所有坐標(biāo)存儲(chǔ)在像素中。
使用StiReport類的Unit屬性,具體方法如下:
C#
//Set centimeters Report.Unit = new StiCentimetersUnit(); //Set millimeters Report.Unit = new StiMillimetersUnit(); //Set inches Report.Unit = new StiInchesUnit(); //Set hundredths of inch Report.Unit = new StiHundredthsOfInchUnit();
VB
'Set centimeters Report.Unit = New StiCentimetersUnit() 'Set millimeters Report.Unit = New StiMillimetersUnit() 'Set inches Report.Unit = New StiInchesUnit() 'Set hundredths of inch Report.Unit = New StiHundredthsOfInchUnit()
在Unit屬性被修改后,報(bào)表生成器會(huì)自動(dòng)將所有尺寸和組件位置轉(zhuǎn)換為新的單位。
購(gòu)買最新正版授權(quán)!""
慧都年終盛典火爆開(kāi)啟,一年僅一次的最強(qiáng)促銷,破冰鉅惠不容錯(cuò)過(guò)!!優(yōu)惠詳情點(diǎn)擊查看>>
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn