ACC2000: Data Shape Command Error When You Preview Report in Access Project (272349)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q272349
Advanced: Requires expert coding, interoperability, and multiuser skills.

This article applies only to a Microsoft Access project (.adp).

SYMPTOMS

When you preview a report that is based on a stored procedure in an Access project, you receive the following error message
The data shape command text contains a syntax error at or near position 14 in the command. The command text near the error is 'SHAPE (SHAPE ) AS RS_#'
where # is some number.

CAUSE

This error occurs only when both of the following conditions are true:
  • There is an aggregate function in the report footer.
  • There are six grouping levels in the report.

RESOLUTION

To resolve this issue, add a seventh field to the grouping of the report in one of the following ways:
  • If the field that you add to the grouping exists on the report, you must turn on either a group header or group footer for the field.
  • If the field that you add to the grouping does not exist on the report, do not activate a group header or footer.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Open the sample Access project NorthwindCS.adp, and then create the following stored procedure:
    Create Procedure spReportErrorTest
    AS
    SELECT
    Employees.FirstName,
    Employees.LastName,
    Employees.Title,
    Employees.City,
    Employees.Region,
    Employees.Country,
    Orders.EmployeeID,
    Orders.CustomerID,
    Orders.OrderDate,
    Orders.RequiredDate,
    Orders.ShippedDate,
    Orders.Freight
    FROM Employees INNER JOIN Orders ON Employees.EmployeeID = Orders.EmployeeID
    					
  2. Create a new report that is based on the stored procedure that you created in step 1.
  3. In the Sorting and Grouping dialog box, select the following fields (in order): Country, Region, Title, EmployeeID, CustomerID, OrderDate. Set the Group Header and Group Footer properties to Yes for all fields.
  4. Add the following fields to the detail section: Country, Region, Title, EmployeeID, CustomerID, OrderDate.
  5. Add a text box to the report footer, and then set the ControlSource property of the text box to =Count(*).
  6. Preview the report. Note that you receive the error message mentioned in the "Symptoms" section.

Modification Type:MinorLast Reviewed:7/13/2004
Keywords:kbbug KbClientServer kberrmsg kbpending KB272349