2011-07-08 41 views
1

是否可以隱藏或禁用文本對象導出到Stimulsoft PDF報告?在導出Stimulsoft報告時防止輸出或隱藏文本?

將文本對象的「可打印」設置設置爲false似乎沒有效果。除了那一個設置,我能找到的唯一的其他相關設置是「導出爲圖像」,這看起來並不妨礙輸出。

我正在使用Stimulsoft Reports和Sitecore 6.4。我的問題是原始HTML出現在我們導出的PDF報告中。我需要一種方法來完全隱藏文本字段。

回答

2

您可以使用下面的代碼在報告的出口(出口)事件: http://depositfiles.com/files/9ci8ofech

for (int i = 0; i < this.RenderedPages.Count; i++) 
{ 
    foreach (StiComponent component in this.RenderedPages[i].GetComponents()) 
    { 
     if ((component is StiText) && (component.Name == "Text2")) 
     { 
      component.Enabled = true; 
     } 
    } 
} 

請從鏈接檢查樣品