Microsoft KB Archive/272349

= ACC2000: Data Shape Command Error When You Preview Report in Access Project =

Article ID: 272349

Article Last Modified on 7/13/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



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.



Steps to Reproduce the Behavior
  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  Create a new report that is based on the stored procedure that you created in step 1. 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. Add the following fields to the detail section: Country, Region, Title, EmployeeID, CustomerID, OrderDate. Add a text box to the report footer, and then set the ControlSource property of the text box to =Count(*).</li> Preview the report. Note that you receive the error message mentioned in the &quot;Symptoms&quot; section.</li></ol>

Additional query words: pra

Keywords: kberrmsg kbbug kbclientserver kbpending KB272349

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.