c# にクエリがあります。datagridview でデータを見ることができます。これが私のコードです
select welding_date
, (select SUM(mat_2_size)
from fabrication_table fab_2
where fab_1.welding_date = fab_2.welding_date
and (fab_2.welder_1 like '%" + welder + "%' or fab_2.welder_2 like '%" + welder + "%'))as 'TOTAL
SUM'
,(select SUM(mat_2_size)
from fabrication_table fab_2
where mat_2='AS' and fab_1.welding_date = fab_2.welding_date
and (fab_2.welder_1 like '%" + welder + "%' or fab_2.welder_2 like '%" + welder + "%'))
as 'SUM OF AS'
,(select SUM(mat_2_size)
from fabrication_table fab_2
where mat_2='SS' and fab_1.welding_date = fab_2.welding_date
and (fab_2.welder_1 like '%" + welder + "%' or fab_2.welder_2 like '%" + welder + "%'))as 'SUM OF SS'
,(select SUM(mat_2_size)
from fabrication_table fab_2
where mat_2='CS' and fab_1.welding_date = fab_2.welding_date
and (fab_2.welder_1 like '%" + welder + "%' or fab_2.welder_2 like '%" + welder + "%')) as 'SUM OF CS'
from fabrication_table fab_1
where welding_date between @date1 and @date2
group by welding_date order by welding_date
これがdatagridviewでの私の結果です
http://enderaric.com/calisma/q.PNG
ここで、Crystal Report でこのテーブルを表示したいと考えています。これは緊急事態宣言!
私の質問の要約 mat_2_size 、mat_2 、welding_date 、welder_1、welder_2 を含むテーブルがあり、@date1 と @date2 の間の範囲の合計 mat_2_size を合計したい、mat_2=CS または AS または SS の合計サイズ。この Date 、 sum of total 、 sum of where mat_2='CS' 、 sum of where mat_2='AS' 、 sum of where mat_2='SS' のようにすべての行を表示したい