Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 8392

SELECT - SUM - CASE - How to....

$
0
0

I to all dear C.R. Experts.

 

I'm newbye in Crystal Report and i need i little suggestion.

 

Actually we have a report in php with the following query:ù

 

select 
 sum(CASE when b.ItemCode like 'C1vo%'then (b.quantity) else 0 end) as 'C1 - FX', 
 sum(CASE when b.ItemCode like 'C2vo%'then (b.quantity) else 0 end) as 'C2 - H', 
 sum(CASE when b.ItemCode like 'C8ve%'then (b.quantity) else 0 end) as 'C8 - ISO-E', 
 sum(CASE when b.ItemCode like 'C8vx%'then (b.quantity) else 0 end) as 'C8 - EXO', 
 sum(CASE when b.ItemCode like 'C8je%'then (b.quantity) else 0 end) as 'C8J - ISO-E',  sum(CASE when b.ItemCode like 'C8jx%'then (b.quantity) else 0 end) as 'C8J - EXO'  from 
 OIGN a inner join IGN1 b on a.DocEntry = b.DocEntry 
 where 
 a.DocDate between '$fromdate' and '$todate'


Well.. In CR I created the parameters for the data rangfe selection and works fine.

The returned datas are correct.

 

But how i can do to display only one line in the detail section with the sums??

 

Thank's in advance and sorry... sorry for my english

 

LUCA


Viewing all articles
Browse latest Browse all 8392

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>