Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Do not suppress row Post Reply Post New Topic
Author Message
psalm19
Groupie
Groupie
Avatar

Joined: 19 Feb 2009
Online Status: Offline
Posts: 48
Quote psalm19 Replybullet Topic: Do not suppress row
     Posted: 30 Aug 2013 at 2:58pm
Running CR 10 Pro, SQL 2008 DB
I have a formula that when listed in the report and one of the records is empty then the entire row "data" is suppressed when the report is run. I'm using left outer joins and the data is set to print on GF3 tblService.Orders. If I remove the formula from the report then all of the data prints.
 
I was thinking something like the forumula below might help but I'm getting "a boolean is required here after 'or'" 
 
IsNull({tblSOPartsUsed.Quantity})
or
({tblPriceBook.LaborHrsReq} * {tblSOPartsUsed.Quantity})


Edited by psalm19 - 30 Aug 2013 at 2:58pm
IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 03 Sep 2013 at 1:40am
Hi,
 
Can you post your complete formula in the thread.
If you are using below logic,
 
IsNull({tblSOPartsUsed.Quantity})
or
({tblPriceBook.LaborHrsReq} * {tblSOPartsUsed.Quantity})
 
IsNull will give only Boolean value(True or False)
and
({tblPriceBook.LaborHrsReq} * {tblSOPartsUsed.Quantity}), will give values
the Output of the formula is different in both cases, thats why you are getting Boolean Required error.
 
Change your formula like below
if IsNull({tblSOPartsUsed.Quantity})
then 0
else
({tblPriceBook.LaborHrsReq} * {tblSOPartsUsed.Quantity})
 
--Praveen G
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
psalm19
Groupie
Groupie
Avatar

Joined: 19 Feb 2009
Online Status: Offline
Posts: 48
Quote psalm19 Replybullet Posted: 03 Sep 2013 at 4:50am
It appears I was wrong about the formula being the issue, as after adjusting the formula and adding it back to the report the problem persits. The problem is with the empty records in this field {tblSOPartsUsed.Quantity}. Reversing the link doesn't fix the issue. Adding the field as a group and the moving the fields to the group doesn't fix the issue. Any ideas would be greatly appreciated.
 
If IsNull({tblSOPartsUsed.Quantity})
Then 0
Else ({tblSOPartsUsed.Quantity})
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 03 Sep 2013 at 5:34am
likely culprit is the join and select statement together.
If it is your join
you would see the same issue of rows appearing and disappearing by just dragginga  the quantity field onto the report canvas. By using it youare enforcing the join and the record set changes.
 
Select satements can change your outer join into an inner join (or give you  partially correct results)
IP IP Logged
psalm19
Groupie
Groupie
Avatar

Joined: 19 Feb 2009
Online Status: Offline
Posts: 48
Quote psalm19 Replybullet Posted: 03 Sep 2013 at 10:54am
Fantastic! I adjusted the join option from left to right and now it appears to be working properly. I don't really understand how the joining works, time to research. Thanks to all for your help!
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