Re: Report / Query Problem



z.ghulam@xxxxxxxxx wrote:

I am designing an order database at work and am having problems
creating a specific report I'm after.

Basically, each order has an 'order type' and what I would like is a
report which lists the order types and simply gives a number as to the
total amounts of that order type over a certain time period.

I've managed to build a query which gives me details of every order and
their order-type over a certain time, but I cant seem to work out how
to get Access to tot up the amounts of each order type.

The other reports I have are very similar, but with different fields.
I would appreciate any advice
Thanks

Two approaches. One, create a new query. Drag the Order#, Type, and amount fields to the query. From the menu, select Query/Totals. Make sure Order#, Type are GroupBy and Sum is under the Amount field. Now link this query to your report query. This query approach will be snappy and fast. You can use this field to get Order totals and a sum of the entire report

Another method is to use DSum() in your report query. It might look something like
OrderTotal:Dsum("OrderAmt","OrderItms","OrderID = " & _
[OrderID])


Look at your reports. See how you can filter them to get your results in the SQL statement for the Report's recordsource. Then you can open you reports with something like
Docmd.OpenReport "Report1",,,"OrderType = 1"
.




Relevant Pages

  • Re: ATTN. Klatuu: Output fields to report only if conditions met
    ... and Grouping in the report and group by Order Type. ... you could force a new page with the Order Type group. ... In the main form is a field called "LogID". ... is 1 button: "Create Workorder". ...
    (microsoft.public.access.forms)
  • ATTN. Klatuu: Output fields to report only if conditions met
    ... is separate the jobs by Order Type. ... "Create Black Workorder", then that report needs to only display/print ... Log Letter: A OrderType: Black ...
    (microsoft.public.access.forms)
  • Re: Output fields to report only if conditions met
    ... Also, when the button is clicked to open the report, it is currently running ... is separate the jobs by Order Type. ... "Create Black Workorder", then that report needs to only display/print ... Log Letter: A OrderType: Black ...
    (microsoft.public.access.forms)
  • Re: Output fields to report only if conditions met
    ... Also, when the button is clicked to open the report, it is currently running ... is separate the jobs by Order Type. ... "Create Black Workorder", then that report needs to only display/print ... Log Letter: A OrderType: Black ...
    (microsoft.public.access.forms)
  • Re: ATTN. Klatuu: Output fields to report only if conditions met
    ... In the main form is a field called "LogID". ... is 1 button: "Create Workorder". ... This button opens a report that has all ... is separate the jobs by Order Type. ...
    (microsoft.public.access.forms)