开发者

WPF 4 FixedDocument multiple pages

What is the best way to print a complex layout spanning multiple pages in WPF? (for example an invoice layout spanning multiple pages because of many invoice items)

I'm guessing one of these methods would do:

  • Dynamically inserting pages in a FixedDocument? how?
  • 开发者_C百科Convert a FlowDocument to a FixedDocment. How? The solutions found do not seem to work in WPF 4 (fox example http://blogs.msdn.com/b/fyuan/archive/2007/03/10/convert-xaml-flow-document-to-xps-with-style-multiple-page-page-size-header-margin.aspx)


I typically use dynamic insertion of Pages into the FixedDocument control. I created a empty view and then dynamically load in UserControls that represent each pages "body" with their respective binding(s). The downside is you have to create your own poormans virtualization for dataset reprots (ie show 12 rows per page with a MOD 12 calculation etc) type thing.

Reports are low priority on the WPF teams Radar so this really hasn't got a lot of knowledge base around it at present and the future isn't so bright either.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜