简体   繁体   中英

How to display two tables in one crystal report

My invoice can have many Items ( each Item has : Description, Quantity, Unit price and Price...classic ! ) but the invoice can also have many Taxes ( from 0 to 5 taxes, in the example I'm showing, this invoice has 3 taxes : 17%, 4% and 10%, while other invoices can have no Taxes at all )

Here is my GUI (you can see in red the items and in blue the taxes : 我的应用程序GUI

Here is the Dataset I'm using : 数据集

Here is the Template of the report i want to make : 报告我需要做的

I googled for result and i found an example LINK => SOLUTION N°2 where they suggest that you create the second table (Taxes) in different report and than Insert it in the first report (Items) as SubReport , my problem is that i need to insert the Total No Taxes => 12 900.00 before i add the Taxes table...! so i didn't know in which Section of the Item's report i need to insert the Taxes Report !

  1. I want to know if it is possible to create a such report ?
  2. Is the solution I'm following the right way to do it ?
  3. If not or if there is a better way to do it please show me ?

首先,您将在报表页脚中添加一个摘要字段,以将“价格”的总和显示为“总税额”,然后在显示“ TaxesDataTable”数据的同一部分(即报表页脚)中添加子报表。

Sub report approach is correct. Follow the process.

Calculate all data in main report then pass the summary to sub report and place the sub report in a section that comes after the data displayed in main report, best would be in report footer. Calculate in sub report and display both

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM