0

我想为我的 sql server DB 为我的 asp.net 网站创建报告

我正在使用 c#,我希望每个报告都包含一个图表和该图表的数据表,并且可以打印并保存为 pdf。

我也想知道如何绘制这样的图表

图表

从这个查询:

SELECT   
     SUM(CASE when ROUND( cast(DATEDIFF(day, BirthDateG,GETDATE())as real)/365.25,0) between 0 and 6  THEN 1 ELSE 0 END) as [Group 1],
     SUM(CASE when ROUND( cast(DATEDIFF(day, BirthDateG,GETDATE())as real)/365.25,0) between 7 and 18  THEN 1 ELSE 0 END) as [Group 2],
     SUM(CASE when ROUND( cast(DATEDIFF(day, BirthDateG,GETDATE())as real)/365.25,0) between 19 and 25  THEN 1 ELSE 0 END) as [Group 3]

FROM Demographic 
group by Gender
4

0 回答 0