我有一个报告,其中包含姓名参数 - 姓氏姓氏
当选择所有名称时,它应相应地在图表和表格中显示值
在我的图表中,名称按排序顺序显示,但在我的表格中,它们看起来并不相同。
我使用了' ORDERBY forename'在我的SQL查询和tablix属性中的forename排序。
Query:
SELECT DISTINCT
Code, Forename, Forename + ' ' + Surname AS Name, Age, Year, Area, Type, StartTime, EndTime
FROM Table
WHERE (Age IN (@Age)) AND (Type IN (@Type)) AND (Year = @Year)
GROUP BY Code, Forename, Surname, Age, Year, Area, Type, StartTime, EndTime
ORDER BY Forename
O / P:
Code Forename Name Age Year Area Type StartTime EndTime
SHEEA1 Alyson Alyson Sheen 1416 2015 Eng+Maths GCSE 1899-12-30 09:00 1899-12-30 10:30
SHEEA1 Alyson Alyson Sheen 1416 2015 Eng+Maths GCSE 1899-12-30 13:15 1899-12-30 14:45
SHEEA1 Alyson Alyson Sheen 1416 2015 Eng+Maths GCSE 1899-12-30 15:00 1899-12-30 16:30
DIXOD1 Daniel Daniel Dixon 1416 2015 Eng+Maths GCSE 1899-12-30 10:45 1899-12-30 12:15
DIXOD1 Daniel Daniel Dixon 1416 2015 Eng+Maths GCSE 1899-12-30 13:15 1899-12-30 14:45
KAYEJ1 Jemma Jemma Kaye 1416 2015 Eng+Maths GCSE 1899-12-30 09:00 1899-12-30 10:30
AMOOJ1 Josephine Josephine Amoo 1416 2015 Eng+Maths GCSE 1899-12-30 15:15 1899-12-30 16:45
AMOOJ1 Josephine Josephine Amoo 1416 2015 Eng+Maths GCSE 1899-12-30 13:30 1899-12-30 15:00
LEEK2 Katy Katy Lee 1416 2015 Eng+Maths GCSE 1899-12-30 09:00 1899-12-30 10:30
LEEK2 Katy Katy Lee 1416 2015 Eng+Maths GCSE 1899-12-30 11:00 1899-12-30 12:30
LEEK2 Katy Katy Lee 1416 2015 Eng+Maths GCSE 1899-12-30 13:30 1899-12-30 15:00
NSUBL1 Lawrence Lawrence Nsubuga 1416 2015 Eng+Maths GCSE 1899-12-30 13:15 1899-12-30 15:00
NSUBL1 Lawrence Lawrence Nsubuga 1416 2015 Eng+Maths GCSE 1899-12-30 09:00 1899-12-30 10:30
NSUBL1 Lawrence Lawrence Nsubuga 1416 2015 Eng+Maths GCSE 1899-12-30 15:00 1899-12-30 16:30
GOODN1 Nicola Nicola Goodman 1416 2015 Eng+Maths GCSE 1899-12-30 09:00 1899-12-30 10:30
我该如何纠正?