开发者

Report Help: Crystal Reports

I am making one Crystal Report for bills.

Bills Table : BillID(pk), PartyName, BillDate, Loading, Unloading.

BillDetails Table: ID(pk),BillID(fk),Item, Quantity, Rate, Amount.

In the database expert I have joined the 2 tables. I want the report like this:

BillID                    PartyName                     BillDate

                           SALE                                   EXPENSES

ITEM             QUANTITY          RATE           AMOUNT          LOADING    开发者_开发技巧  10
toy              2                 2              4               UNLOADING    20
doll             7                 6              42 
ball             8                 6              48 
cell             5                 6              30

TOTAL :                                          160                           30

NET:                                             160
                                                - 30
                                                 130

The problem is that the loading and unloading appear only once per bill while the biil contains multiple items.

How I can mix details section with items that appear only once(loading and unloading) ?


You have at least two options for presented layout:

  1. Use subreport for displaying loading/unloading values (link with bill ID)
  2. Put your loading/unloading fields into special group header section (group by bill ID) and make that section "underlay following sections"

If you can dispaly loading/unloading values on separate row, then place them into appropriate group header/footer and you're done.


I think you'd need to use both of the options in Arvo's answer together to get what you are wanting.

I'd first create your subreport for "Loading and Unloading" and place it in the header with Item, QTY, etc and then set that header to "underlay following sections". This will get you the details of the subreport, but then you need to capture the total to send back to the main report.

To get this info you'll need to create a shared variable in the subreport for the total and then you can reference it in your formula in the main report's "Net" footer section.

Hope this helps.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜