I have a sproc to flatten my BO hierarchy for reporting purposes. Distilling it to it's simplest, it's similar to the following:
SELECT EstimateDepartment.DeptName,
SUM(EstimateDrawing.NumberOfDwgs) AS NumberOfDwgs,
SUM(EstimateDrawing.ManHoursPerDwg) AS ManHoursPerDwg
FROM EstimateDrawings INNER JOIN EstimateDepartments
ON EstimateDrawings.DeptID = EstimateDepartments.DeptID
GROUP BY EstimateDepartments.DeptName
A typical resultset would be something akin to:
DeptName NumberOfDwgs ManHoursPerDwg
Architectural 10 12.5
Electrical 15 7.5
So, my sproc works as planned. Where I'm having problems is trying to get the CodeSmith template for a Read-Only Child to work with it. I've selected the sproc as being the Root Command and the DeptName as being the Unique Column to reference in building the BO. Nonetheless, CodeSmith insists that I need to name a Unique Column in order to build the BO and it has me a bit confused as each DeptName appears only once in the resultset.
Can anyone spot if I'm doing something wrong? BTW, the templates I've been using were downloaded in August.
Ricky,
I've just downloaded and installed the new templates at codeplex.com, but I still get the same error message regarding Unique Column(s) being required.
Allen
Copyright (c) Marimer LLC