all groups > sql server reporting services > august 2006 >
You're in the

sql server reporting services

group:

GROUP BY clause in OLE DB provider for visual foxpro.


GROUP BY clause in OLE DB provider for visual foxpro. Guymella
8/17/2006 12:52:01 PM
sql server reporting services:
Im running a report in RS-2005 and i need to create a new table based on the
count of groups in another column.

Curently our databas is in VFP 9 so im using "Microsof OLE DB provider for
visual foxpro".

the problem is i cant even get a basic GROUP BY command to work in the query
designer.

I keep getting an error message…
…………………..
SQL Execution Error.

Executed SQL statement: SELECT conditioncode, description,
extendeddescrition, itemid, itemnumber, location, mfgr, qty FROM inventory
GROUP BY itemid
Error Source: Microsoft OLE DB provider for Visual FoxPro
Error Message: SQL: GROUP BY clause is missing or invalid.
..............................

Is there a special way of calling GROUP BY with the foxpro provider?
And beyond that is there a special way of JOINing results from a subtotal in
the group to a different table?

OR

I can group and subtotal in a table on the report… can I reference the
results of a SUM() function in “group footers” on one table, into a seperate
table on the same report… (make the report do the math instead of the query…
like excel)???

MORE DETAILED EXPLINATION…
My inventory does not include qty… (each part is catalogued separately
because each part has different serial numbers witch are very important) so
to calculate inventory qty we COUNT DISTINCT itemid’s.
The report I’m running needs to add the qty of the items to the qty of all
the substitutes we have for the items… (I need to reference the COUNT of
items in the inventory table to the appropriate “substitute ID” in the
substitution table, then group by the “root id” and subtotal all the
referenced qty’s in the group.) essentially I need to know how to do a
VLOOKUP in reporting services…
Re: GROUP BY clause in OLE DB provider for visual foxpro. Bruce L-C [MVP]
8/17/2006 4:18:03 PM
Try using the generic query designer (the button to switch to this is to the
right of the ...). When you start getting more complex queries the visual
designer can't handle it.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

Re: GROUP BY clause in OLE DB provider for visual foxpro. Cindy Winegarden
8/18/2006 6:57:14 PM
Hi !

The Visual FoxPro OLE DB data provider is looking for some sort of aggregate
function and also for every non-aggregate item in the Select list to appear
in the Group By list. Something like:

SELECT conditioncode, description, extendeddescrition, Count(Distinct
itemid), itemnumber, location, mfgr, qty
FROM inventory
GROUP BY conditioncode, description, extendeddescrition, itemnumber,
location, mfgr, qty


--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@cindywinegarden.com


[quoted text, click to view]

AddThis Social Bookmark Button