Print Page | Close Window

How to eliminate zero records

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Writing Code
Forum Discription: .NET 2003 programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=11288
Printed Date: 18 May 2024 at 6:11pm


Topic: How to eliminate zero records
Posted By: flintwood
Subject: How to eliminate zero records
Date 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



Replies:
Posted By: lockwelle
Date 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



Print Page | Close Window