954,535 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Crystal Report Err

I am using frontend as visual basic 6.0 and back end as oracle 9i.
Query is written for crystal report 8.5.
In query select fields i used function to retrview data and grouping that fields.
In Oracle Viewer Showing data is not same as Crystal report Viewer showing data.
It is unexpected.
So Anyone can give me best soloution.

bk_yogesh97
Newbie Poster
3 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

Hi,

Can u post what the query is in Oracle.. and what Grouping u have done in CR...? Table /field names..? Grouping should be done in the same order of fields both sides, then u get perfect results...

REgards
Veena

QVeen72
Posting Shark
950 posts since Nov 2006
Reputation Points: 84
Solved Threads: 143
 
I am using frontend as visual basic 6.0 and back end as oracle 9i. Query is written for crystal report 8.5. In query select fields i used function to retrview data and grouping that fields. In Oracle Viewer Showing data is not same as Crystal report Viewer showing data. It is unexpected. So Anyone can give me best soloution.


Query:
select getdeptname(SERVICECD) AS SERVICE,NVL(getpersonname(rcd),'TOTAL') AS person,
sum(iiif('''' || v || '''' , '=', '''' ||'N' || '''', iiif('''' || D.sex || '''', '=', '''' || 'M' || '''','1','0'),'0'))as newmale ,
sum(iiif('''' || v || '''' , '=', '''' ||'N' || '''', iiif('''' || D.sex || '''', '=', '''' || 'F' || '''','1','0'),'0') )as newfemale ,
sum(iiif('''' || v || '''' , '=', '''' ||'R' || '''', iiif('''' || D.sex || '''', '=', '''' || 'M' || '''','1','0'),'0') )as revisitmale ,
sum(iiif('''' || v || '''' , '=', '''' ||'R' || '''', iiif('''' || D.sex || '''', '=', '''' || 'F' || '''','1','0'),'0') )as revisitfemale ,
COUNT(D.sex) as total
from O c,p d
Where C.ID = d.ID
and Flag = 'C'
and to_date(Date) between
to_Date(? ,'DD-MM-YYYY') and
to_Date(?,'DD-MM-YYYY')
group by getdeptname(SERVICECD),ROLLUP(getpersonname(rcd))

bk_yogesh97
Newbie Poster
3 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

[QUOTE=bk_yogesh97;426285]Query:
select getdeptname(SERVICECD) AS SERVICE,NVL(getpersonname(rcd),'TOTAL') AS person,
sum(iiif('''' || v || '''' , '=', '''' ||'N' || '''', iiif('''' || D.sex || '''', '=', '''' || 'M' || '''','1','0'),'0'))as newmale ,
sum(iiif('''' || v || '''' , '=', '''' ||'N' || '''', iiif('''' || D.sex || '''', '=', '''' || 'F' || '''','1','0'),'0') )as newfemale ,
sum(iiif('''' || v || '''' , '=', '''' ||'R' || '''', iiif('''' || D.sex || '''', '=', '''' || 'M' || '''','1','0'),'0') )as revisitmale ,
sum(iiif('''' || v || '''' , '=', '''' ||'R' || '''', iiif('''' || D.sex || '''', '=', '''' || 'F' || '''','1','0'),'0') )as revisitfemale ,
COUNT(D.sex) as total
from O c,p d
Where C.ID = d.ID
and Flag = 'C'
and to_date(Date) between
to_Date(? ,'DD-MM-YYYY') and
to_Date(?,'DD-MM-YYYY')
group by getdeptname(SERVICECD),ROLLUP(getpersonname(rcd))

This is actually a view which i have craeted in oracle and i have added this view in my crystal report.
All the required grouping have been done in the above view itself and nothing has been done in the crystal report.
I have just added the view to crystal Rep.
Another thing, for knowing the discrepencies between the backend and frontend, I have loaded the result of the above view in a Grid to whether its a VB6 err or CR err. And i found result is exacltly the same as of Oracle,but when i load this view in CR,it shows me some discrepencies while doing sum operations, ie all the above sum Operation.

bk_yogesh97
Newbie Poster
3 posts since Aug 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You