Writing Code
 Crystal Reports Forum : Crystal Reports .NET 2003 : Writing Code
Message Icon Topic: How to eliminate zero records Post Reply Post New Topic
Author Message
flintwood
Newbie
Newbie
Avatar

Joined: 31 Jul 2010
Online Status: Offline
Posts: 16
Quote flintwood Replybullet Topic: How to eliminate zero records
    Posted: 30 Sep 2010 at 11:06am
I have a formula like this:
 
if {table1.col1} = "X" and {table1.col2} = {table2.col2} then {table2.col3}
else
if {table1.col1} = "Y" and {table1.col2} = {table3.col2} then
{table3.col3} else
if....the same as above with different tables.
 
All I am trying to do is to display table2.col3, table3.col3 and so forth to show the desc values and now I put this formula in the report detail field and the report shows no records. The report also has customer id, date and amount and other fields in it and they all go blank. What am I doing wrong in the formula here. Please any help will be appreciated!
FW
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 04 Nov 2010 at 11:30am
the only thought that comes to mind is are the tables joined correctly?
 
CR won't 'find' a record unless the tables are joined.
 
The other idea is how to debug complex formulas....
break them up into smaller formulas, you can have lots of them, but it might give a clue as to where the logic has gone wrong.
 
Like:
if {table1.col1} = "X" and {table1.col2} = {table2.col2} then {table2.col3}
of course you would also display {table1.col1}
 
HTH
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.014 seconds.