原因是使用了模版保存了文件,事件不會被保存到模版里可以使用腳本的方式,但腳本有不安全.
這就解釋了我之前的一個報表沒用模版還能用這個事件, 今天在別的地方使用這個事件發現死活修改不了label值了,接這看看之前的使用也不能用了. 還納悶問題在哪.
ello Jakub,
This is expected behavior: when an instance of the XtraReport is serialized (the report definition file is saved), it doesn't include information about assigned event handlers. In other words, the code behind of the report isn't saved. To achieve your goal, I suggest that you use Scripts, which can be serialized along with the report layout.
https://supportcenter.devexpress.com/ticket/details/t194226/xtrareports-beforeprint-don-t-work-when-run-loadlayout#
技術交流qq群:143280841
浙公網安備 33010602011771號