Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Query is returning row but report is blank Post Reply Post New Topic
Author Message
chevula
Newbie
Newbie
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 2
Quote chevula Replybullet Topic: Query is returning row but report is blank
     Posted: 14 Jun 2011 at 12:53am
Hi,
I have the following query in "Show SQL query"
SELECT "ITT1_1"."Code", "ITT1"."ChildNum", "ITT1"."Code", "OITW"."WhsCode", "OITW"."AvgPrice", "ITM1"."PriceList", "OITM"."ItemName"
FROM ((("SBK_IL_ACC"."dbo"."ITT1" "ITT1_1" INNER JOIN "SBK_IL_ACC"."dbo"."ITT1" "ITT1" ON "ITT1_1"."Father"="ITT1"."Father") INNER JOIN "SBK_IL_ACC"."dbo"."OITM" "OITM" ON "ITT1_1"."Father"="OITM"."ItemCode") INNER JOIN "SBK_IL_ACC"."dbo"."ITM1" "ITM1" ON "ITT1_1"."Father"="ITM1"."ItemCode") INNER JOIN "SBK_IL_ACC"."dbo"."OITW" "OITW" ON "ITT1"."Code"="OITW"."ItemCode"
WHERE "ITT1_1"."Code"=N'500005' AND "ITT1"."Code"N'500005' AND "OITW"."AvgPrice"0 AND "OITW"."WhsCode" LIKE N'HO%%%%' AND "ITM1"."PriceList"=1 AND "ITT1"."ChildNum"=1

The O/P is :
500005 1 9000073 HOMFG 966.01 ; 1 Synthetic 5LTR
500005 1 9000047 HOMFG 875.51 ; 1 Synthetic 4LTR
500005 1 9000021 HOMFG 361.68 ; 1 Synthetic 1LTR
500005 1 9000024 HOMFG 243.32 ; 1 Synthetic 0.5LTR
500005 1 9000048 HOMFG 158.25 ; 1 Synthetic 0.2LTR

But when I pull any data I am not able to see it, the report is showing blank. Any pointers would help me.

Thanks
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 14 Jun 2011 at 5:04am

does this query return values in sql?

sharona
IP IP Logged
chevula
Newbie
Newbie
Avatar

Joined: 13 Jun 2011
Online Status: Offline
Posts: 2
Quote chevula Replybullet Posted: 14 Jun 2011 at 7:25pm
Ya, it returns rows, anyway I got that solved by changing the % sign to * in where condition, but now my problem is: O/P in report:
Pack_Size Packing_Tin_Cost Packing_Box_Cost
5 LTR              1000                     0
5 LTR                 0                  100
4LTR               800                     0
4LTR                   0                   80
1LTR               600                     0
1LTR                   0                    60
Even if I give the suppress condition as Packing_Tin_Cost + Packing_Box_Cost =0, all the rows will be returned as one of them is zero in alternate rows.
And my required O/P:

Pack_Size Packing_Tin_Cost Packing_Box_Cost
5 LTR              1000                  100
4 LTR               800                    80
1LTR                 600                    60

I had even tried grouping but it was not giving me the correct results.

Thanks,
Vineela.
IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 15 Jun 2011 at 2:59am
you are using a stored procedure or a command using sql in the report
 
if you are using a stored proc i can give you a copy to create an update query that will return on row for each pack size and eliminate the zero
sharona
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum