amir zm
30-04-2006, 20:11
سلام
زبان برنامه :VB6
پروایدر : ADO با Microsoft Jet 4
دیتابیس : Access 2000
'گزارش هایی با دستورTRANSFORM PIVOT نوشتم که تعداد ستون ها در اون متغیره.
نمی دونم چه جوری می تونم فرم این گزارش ها رو با Crystal Report ایجاد کنم. (اگه روش دیگری غیر از Crystal Report سراغ دارید استفبال می کنم.)
Crystal Report 10 Advanced Developer و Crystal Report 8.5 Developer رو دارم
متشکرم
این هم نمونه ریپورتم هست:
strsqlsef = "SELECT custumer,code,sum(quantity) as sef,'sef' FROM sefareshat,shsefareshat" & _
" WHERE sefareshat.sn=shsefareshat.sn" & _
strdate & strmamoor & " group by code,custumer"
strsqlexit = "SELECT sharh.to as custumer,code,-sum(quantity) as kh,'kh' FROM data,sharh" & _
" WHERE data.ID=sharh.ID AND k=4 " _
& strdate & strmamoor & " group by code,sharh.to"
strsqlbar = "SELECT sharh.from as custumer,code,sum(quantity) as bar,'bar' FROM data,sharh" & _
" WHERE data.ID=sharh.ID AND k=0 " _
& strdate & strmamoor & " group by code,sharh.from"
strsql = strsqlsef & " UNION " & strsqlexit & " UNION " & strsqlbar
strsql = "Select custumer,code,sum(sef) as re from (" & strsql & ") Group BY code,custumer Having sum(sef)<>0"
strsql = "SELECT custumer,nam,code,re from (" & strsql & "),kala WHERE code=kalacode"
strsql = "TRANSFORM SUM(re) SELECT custumer from (" & strsql & ") Group BY custumer PIVOT nam"
زبان برنامه :VB6
پروایدر : ADO با Microsoft Jet 4
دیتابیس : Access 2000
'گزارش هایی با دستورTRANSFORM PIVOT نوشتم که تعداد ستون ها در اون متغیره.
نمی دونم چه جوری می تونم فرم این گزارش ها رو با Crystal Report ایجاد کنم. (اگه روش دیگری غیر از Crystal Report سراغ دارید استفبال می کنم.)
Crystal Report 10 Advanced Developer و Crystal Report 8.5 Developer رو دارم
متشکرم
این هم نمونه ریپورتم هست:
strsqlsef = "SELECT custumer,code,sum(quantity) as sef,'sef' FROM sefareshat,shsefareshat" & _
" WHERE sefareshat.sn=shsefareshat.sn" & _
strdate & strmamoor & " group by code,custumer"
strsqlexit = "SELECT sharh.to as custumer,code,-sum(quantity) as kh,'kh' FROM data,sharh" & _
" WHERE data.ID=sharh.ID AND k=4 " _
& strdate & strmamoor & " group by code,sharh.to"
strsqlbar = "SELECT sharh.from as custumer,code,sum(quantity) as bar,'bar' FROM data,sharh" & _
" WHERE data.ID=sharh.ID AND k=0 " _
& strdate & strmamoor & " group by code,sharh.from"
strsql = strsqlsef & " UNION " & strsqlexit & " UNION " & strsqlbar
strsql = "Select custumer,code,sum(sef) as re from (" & strsql & ") Group BY code,custumer Having sum(sef)<>0"
strsql = "SELECT custumer,nam,code,re from (" & strsql & "),kala WHERE code=kalacode"
strsql = "TRANSFORM SUM(re) SELECT custumer from (" & strsql & ") Group BY custumer PIVOT nam"