Results 1 to 3 of 3
  1. #1
    kattatonic1 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Location
    Toronto, Canada
    Posts
    77

    Unhappy Trying to remove grouping from query used in report

    Hi, I'm updating someone else's database. I am trying to stop the grouping of some data in a report. The users do not want it grouped.

    The report has a record source that shows me the following in the Query Builder. I have never written any SQL. I have tried to read online to understand the statements.
    SELECT
    [Report Detailed Summary1].[Pricing Code],
    [Report Detailed Summary1].Group1,
    [Report Detailed Summary1].Service,
    Mid([Report Detailed Summary1].Detail,3,Len([Report Detailed Summary1].Detail))

    AS
    detailIRU, Sum([Report Detailed Summary1].[One-Time Price])

    AS
    [One-Time Price], Sum([Report Detailed Summary1].[Capitalized Price])

    AS
    [Capitalized Price], Sum(IIf(IsNull([Report Detailed Summary1].[Annual on-going Price]),0,[Report Detailed
    Summary1].[Annual on-going Price]))

    AS
    [Annual on-going Price], [Report Detailed Summary1].Detail, Sum(IIf(isnull([Report Detailed
    Summary1].Quantity),0,[Report Detailed Summary1].Quantity))

    AS
    Quantity

    FROM
    [Report Detailed Summary1]

    GROUP BY [Report Detailed Summary1].[Pricing Code],
    [Report Detailed Summary1].Group1,
    [Report Detailed Summary1].Service,
    Mid([Report Detailed Summary1].Detail,3,Len([Report Detailed Summary1].Detail)),
    [Report Detailed Summary1].Detail

    ORDER BY
    [Report Detailed Summary1].[Pricing Code],
    [Report Detailed Summary1].Group1,
    [Report Detailed Summary1].Service,
    [Report Detailed Summary1].Detail;

    I want all mentioned data listed on the report. I don't want the data grouped at all. If I remove the GROUP BY section of the statement, I get this error message:

    "You tried to execute a query that does not include the specified expression 'Pricing Code' as part of an aggregate function."

    Any help would be appreciated.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    In the grouping/sorting band of the report,...
    turn the view OFF.

    If you are talking about the QUERY, the turn off SUMMATION.

    If you still need summation, remove the FIELD from the summation query.

  3. #3
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    You are talking about two different things: grouping in a query and grouping in a report.

    Grouping in a query
    The grouping in a query is for getting Totals (field sums). Grouping (and sorting) in a query does not affect the report, only forms and datasheet views.


    Grouping in a report
    To removing grouping in a report, open the report in design view. Look at the bottom of the window. If you don't see a pane that says "Group, Sort and Total",
    click on "Design" (in the green hilite) and click on the "Group and Sort" icon.

    Removing a grouping level will delete the controls within that grouping level.


    -----------
    Be sure to experiment on a copy of your dB...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Query/Report Record Grouping/Totaling
    By mikej2505 in forum Access
    Replies: 1
    Last Post: 10-04-2014, 10:29 AM
  2. Report Grouping
    By mountaindo in forum Reports
    Replies: 7
    Last Post: 04-08-2014, 03:19 PM
  3. Grouping in Report
    By New.Dimension6267 in forum Reports
    Replies: 1
    Last Post: 10-11-2013, 10:03 PM
  4. Grouping in a report
    By TrackStar in forum Reports
    Replies: 4
    Last Post: 11-02-2012, 01:44 PM
  5. Grouping a report
    By JAJansenJr in forum Reports
    Replies: 0
    Last Post: 03-01-2011, 11:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums