here is the select statement of the first reportSELECT People_tbl.[Parent ID], People_tbl.[Student Last Name], People_tbl.[Student First Name], TanfActivity_tbl.EventDate, TanfActivity_tbl.[Earned hours], TanfActivity_tbl.[Catagory for hours], TanfActivity_tbl.[State Catagory], TanfActivity_tbl.[Services Covered], TanfActivity_tbl.[State Services Covered], People_tbl.[Referral Date], People_tbl.ReferralStatus, People_tbl.Adult_Child, People_tbl.TANFFROM People_tbl INNER JOIN TanfActivity_tbl ON People_tbl.[Parent ID] = TanfActivity_tbl.[Parent ID]WHERE (People_tbl.ReferralStatus = N'Active') AND (TanfActivity_tbl.EventDate BETWEEN @Beginning_EventDate AND @End_EventDate) AND (TanfActivity_tbl.[Earned hours] IS NOT NULL) AND (TanfActivity_tbl.[Catagory for hours] IN (N'ITP', N'Parenting', N'Education', N'Culture', N'Job Skills Training', N'Life Skills', N'Travel')) AND (People_tbl.Adult_Child = N'Adult') AND (People_tbl.TANF = N'Yes')ORDER BY CASE WHEN TanfActivity_tbl.[Catagory for hours] = N'ITP' THEN 0 ELSE 1 END, CASE WHEN TanfActivity_tbl.[Catagory for hours] = N'Parenting' THEN 0 ELSE 1 END, CASE WHEN TanfActivity_tbl.[Catagory for hours] = N'Job Skills Training' THEN 0 ELSE 1 END, CASE WHEN TanfActivity_tbl.[Catagory for hours] = N'Culture' THEN 0 ELSE 1 END, CASE WHEN TanfActivity_tbl.[Catagory for hours] = N'Education' THEN 0 ELSE 1 END, CASE WHEN TanfActivity_tbl.[Catagory for hours] = N'Life Skills ' THEN 0 ELSE 1 END, People_tbl.[Student Last Name], People_tbl.[Student First Name]
here is the select statement from the details reportSELECT TanfActivity_tbl.EventDate, TanfActivity_tbl.[Type of Contact], TanfActivity_tbl.[Purpose of Contact], TanfActivity_tbl.[Earned hours], TanfActivity_tbl.[Catagory for hours], People_tbl.[Parent ID], People_tbl.[Student First Name], People_tbl.[Student Last Name]FROM TanfActivity_tbl INNER JOIN People_tbl ON TanfActivity_tbl.[Parent ID] = People_tbl.[Parent ID]WHERE (TanfActivity_tbl.EventDate BETWEEN @Beginning_EventDate AND @End_EventDate) OR (People_tbl.[Student Last Name] = @Enter_Student_Last_Name)