OhB KayB...
So, we can declare the fields to be renamed and identify them as such. (Plus one more)
Code:
SELECT R.VolNewCompleted as Retention_VolNewCompleted
, R.VolParticipation as Retention_VolParticipation
, R.VolClassesOffered as Retention_VolClassesOffered
, T.VolNewCompleted as Training_VolNewCompleted
, T.VolParticipation as Training_VolParticipation
, T.VolClassesOffered as Training_VolClassesOffered
, T.StaffFall
, T.StaffSpring
, T.StaffComet
, T.StaffSeed
, T.StaffCaseSuper
, T.StaffAnnual
, T.StaffNational
, T.StaffTrainer
, T.StaffAdvManage
, T.StaffDiversity
, T.StaffOther1
, T.StaffOther2
, T.BoardOrientCnt
, T.BoardOrientHrs
, T.BoardTrainCnt
, T.BoardTrainHrs
, T.BoardPlanCnt
, T.BoardPlanHrs
, T.BoardEvalCnt
, R.Quarter as Retention_Quarter
, T.Quarter as Training_Quarter
FROM StatsTraining as T
INNER
JOIN StatsRetention as R
ON R.OfficeID = T.OfficeID
WHERE T.OfficeID = strOfficeID
AND R.FiscalYear = strFiscalYear
I'm not sure if at this point this question needs to go to the ASP forum....
I then open the recordset in the usual fashion..... then:
Code:
intQuarter = rsStatsCase("Quarter")
aTrain(intQuarter,cintVolNewCompleted) = rsStatsCase("VolNewCompleted")
aTrain(intQuarter,cintVolParticipation) = rsStatsCase("VolParticipation")
aTrain(intQuarter,cintVolClassesOffered) = rsStatsCase("VolClassesOffered")
aTrain(intQuarter,cintStaffFall) = rsStatsCase("StaffFall")
aTrain(intQuarter,cintStaffSpring) = rsStatsCase("StaffSpring")
aTrain(intQuarter,cintStaffComet) = rsStatsCase("StaffComet")
aTrain(intQuarter,cintStaffSeed) = rsStatsCase("StaffSeed")
aTrain(intQuarter,cintStaffCaseSuper) = rsStatsCase("StaffCaseSuper")
aTrain(intQuarter,cintStaffAnnual) = rsStatsCase("StaffAnnual")
aTrain(intQuarter,cintStaffNational) = rsStatsCase("StaffNational")
aTrain(intQuarter,cintStaffTrainer) = rsStatsCase("StaffTrainer")
aTrain(intQuarter,cintStaffAdvManage) = rsStatsCase("StaffAdvManage")
aTrain(intQuarter,cintStaffDiversity) = rsStatsCase("StaffDiversity")
aTrain(intQuarter,cintStaffOther1) = rsStatsCase("StaffOther1")
aTrain(intQuarter,cintStaffOther2) = rsStatsCase("StaffOther2")
aTrain(intQuarter,cintBoardOrientCnt) = rsStatsCase("BoardOrientCnt")
aTrain(intQuarter,cintBoardOrientHrs) = rsStatsCase("BoardOrientHrs")
aTrain(intQuarter,cintBoardTrainCnt) = rsStatsCase("BoardTrainCnt")
aTrain(intQuarter,cintBoardTrainHrs) = rsStatsCase("BoardTrainHrs")
aTrain(intQuarter,cintBoardPlanCnt) = rsStatsCase("BoardPlanCnt")
aTrain(intQuarter,cintBoardPlanHrs) = rsStatsCase("BoardPlanHrs")
aTrain(intQuarter,cintBoardEvalCnt) = rsStatsCase("BoardEvalCnt")
rsStatsCase.MoveNext
Wend
then generate the excel report with calls:
Code:
Response.Write ("<tr><th colspan=""5"">Staff Training</th></tr>")
Call CreateRow("Fall Staff Retreat",aTrain,cintStaffFall)
Call CreateRow("Spring Directors Retreat",aTrain,cintStaffSpring)
............
How do I make sure that the strings like "cintStaffFall" get pulled from the correct reference to the tables?
Bookmarks