How to use SubReport in XtraReport?

旧城冷巷雨未停 提交于 2019-12-02 07:13:41

问题


I have a main Report which consist of (Detail Report)

Transaction #
Amount Due
PaymentType 
Money Tendered

and I have another report which consist of items ordered (Items Report)

Transaction #
ItemName
Quantity 
Amount Due

My question is how to combine the Items Report to the Detail Report My Desired format is

  Transaction # AmountDue PaymentType MoneyTendered
   [Detail Report]==> Link through ID

回答1:


Have a look here.

Creating a master-detail report with the use of subreports requires the following actions.

First, it is necessary to create two report classes (master and detail) and bind to data each of them. Note that the datasources of both reports should contain a data column with the same key, which can be passed from a master report to a detail report. For the detail report, it is necessary to create a public parameter to be initialized outside the detail report. This parameter should be used to filter a datasource bound to the detail report against the column that contains a key. Then, the detail report should be embedded into a master report via the XRSubreport control. In addition, it is required to handle its XRControl.BeforePrint event, and pass a key value from the master to the detail report. Preview, print, export or publish a report on the Web at runtime.

If you want to use your own DataSet have a look here.



来源:https://stackoverflow.com/questions/8966918/how-to-use-subreport-in-xtrareport

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!