Group Data

eg table

Code Foodtype Food rate
001 Food Rice 100.00
002 Food Wheat 150.00
003 Food Cereals 80.00
004 Drinks Coke 20.00
005 Drinks Pepsi 20.00
006 Drinks Beer 80.00


i want report as follows:

Type Total

Food 330.00
Drinks 120.00


Total 450.00



how i group data i can't make

Comments

  • edited 6:05PM
    Anyone please help me
  • edited 6:05PM
    Hi.

    You can group your data in SQL, or in the report.

    I suppose you are not able to use sql?

    In the report, here is how it can be done:

    Drop 5 bands on your report:
    - 1 x page header
    - 1 x masterdata
    - 1 x group header
    - 1 x group footer
    - 1 x report summary

    Arrange them like this:
    PageHeader
    GroopHeader
    MasterData
    GroupFooter
    ReportSummary

    Your datasource must be sorted by 'FoodType'.
    Attach MasterData to your datasource, and set the height of the band to 0.
    Set also the height of groupheader to 0.

    In PageHeader you drop 2 memos for headers.
    In Groupheader.condition you add the 'FoodType'-field (double-click you band to set condition).
    In Groupfooter you drop 2 memos. One for data field [MyDb."FoodType"] , and one for the summary: [sum(<MyDb."RATE">)]
    In ReportSummary you drop 2 memos. One for det label 'Total' and one for the summary: [sum(<MyDb."RATE">)]

    Petter

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.