开发者

does DevExpress XtraReports have an easily accessible notion of "current detail report being printed"?

开发者 https://www.devze.com 2023-02-25 02:53 出处:网络
I am printing a details subreport that gets printed let\'s say 5 times on the overall report, for 5 query results. I compute some stuff for it with my code, and so I use BeforePrint event on an XRTabl

I am printing a details subreport that gets printed let's say 5 times on the overall report, for 5 query results. I compute some stuff for it with my code, and so I use BeforePrint event on an XRTable widget that I have in that subreport. So far so good.

What I don't like is that when the BeforePr开发者_如何学JAVAint executes for that table for the first time and I change its cells' text to something, that this renders on all subsequent instances of this report and table being printed. Now, obviously, since BeforePrint gets called again, I get the opportunity to reset the text to what it should be. So this is not a show stopper.

Yet, this somehow fills wrong, and an invitation to bugs. Is there a way for me to explicitly access "the instance of the table/other widget being printed" rather than "the widget in general, with changes being rendered in all instances that it prints"?


Indeed, you are right. If the formatting should be based on the earlier created data or summary, formatting rules won't work. A possible solution to this problem is to implement a special approach when a developer manually browses all printing system bricks and changes their content manually. You will find some examples on how this can be done at:

Implementing Page totals

subtotal on page bottom and on next page on top

0

精彩评论

暂无评论...
验证码 换一张
取 消