Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Two fields problem Post Reply Post New Topic
Author Message
Petri
Newbie
Newbie


Joined: 25 Jul 2013
Online Status: Offline
Posts: 5
Quote Petri Replybullet Topic: Two fields problem
     Posted: 29 Jul 2013 at 7:33pm
Hi,
we have about 500 items with BOM and 5000 without and i am trying to list all items that don't have BOM (=4500items).

This formula gives 500 BOM items as result: if{BOM_Component.Parent Item No_} in {Item.No_} then true else false

And this formula gives no items at all:if{BOM_Component.Parent Item No_} in {Item.No_} then false else true.

Suggestions?
Thanks

IP IP Logged
praveeng
Senior Member
Senior Member
Avatar

Joined: 11 Jul 2011
Online Status: Offline
Posts: 165
Quote praveeng Replybullet Posted: 30 Jul 2013 at 2:26am
Hi,
 
Try with below code.
if not({BOM_Component.Parent Item No_}) in {Item.No_} then true else false
Praveen Guntuka,
praveen_guntuka@yahoo.com
IP IP Logged
Petri
Newbie
Newbie


Joined: 25 Jul 2013
Online Status: Offline
Posts: 5
Quote Petri Replybullet Posted: 30 Jul 2013 at 8:01pm
 Thanks, but program didn't accept the formula, requires a boolean.
Petri
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 31 Jul 2013 at 3:41am
you do not create joins in the select expert.
If you have joined the two tables together in teh database manager then I assume on your description that this has to do with NULL values or no records in the Item table. If that is the case you will need to make sure your table join is an outer join and your select formula accounts for nulls
 
Please further explain how the Component table and Item table are joined and how they interect and what the fields you need to use are.
IP IP Logged
Petri
Newbie
Newbie


Joined: 25 Jul 2013
Online Status: Offline
Posts: 5
Quote Petri Replybullet Posted: 01 Aug 2013 at 12:15am
First a correction; we have total 5000 items, of which 500 has BOM and i need a list of 4500 items without BOM.

I have a left outer join between fields "item no" and "parent item no". Here is an example of fields and values. On the list i'll get as result, should stand items: A2222, B2222, B3333, C4444 and C5555.

Table item                                      Tabel BOM component
Field item no                                   Field 1  parent item no  Field 2 item no
A1111                                              A1111                           B3333
A2222                                              A1111                           C4444
B2222                                              A1111                           C5555
B3333                                              B5555                           B3333
B5555                                              B5555                           C4444
C4444
C5555

IP IP Logged
Petri
Newbie
Newbie


Joined: 25 Jul 2013
Online Status: Offline
Posts: 5
Quote Petri Replybullet Posted: 19 Aug 2013 at 3:06am
still wondering.....
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Aug 2013 at 4:16am
isnull(table_BOM_component.field1)
IP IP Logged
Petri
Newbie
Newbie


Joined: 25 Jul 2013
Online Status: Offline
Posts: 5
Quote Petri Replybullet Posted: 19 Aug 2013 at 7:24pm
thanks!

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