No announcement yet.

Creating Sub-Totals within Navicat Query

  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating Sub-Totals within Navicat Query

    So I have Sales Order Table that I have these 3 data items, sorted by Product # - Product #, Date, Price.
    I want the ability to have Navicat create a Sub-Total of Sales for each Product # as well as a Grand Total of Sales for a Date Range entered.
    How can I setup my Navicat Query to sub-total the sales for each product #, show the Sub-Total and then zero out the Sub-Total after it prints and starts to accumulate the next Product # Sales sub-total $$'s ?
    Basi9cally a running total that gets reset when a "new" Product # is encountered.

  • #2
    Please try to add a group in your report to see if it can fulfill your needs.

    1. In the Data tab, select all the three columns.

    2. In the Design tab, choose Report > Groups from the menu bar. Add Product # as Group. Then, add DBCalcs components to sum the Price in the group footer section and summery section.

    3. Click the Preview tab to view the report.
    Attached Files


    • #3
      Thanks for the examples, but I should have specified that we do not use the Report Writer, I always Export to Excel, so I need to know how to create the Sub-Totals in the actual query.
      Thanks again for the Report Writer example.


      • #4
        For writing query question, we would suggest you to refer to MySQL Manual -