Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issue with including null values with Group header

Status
Not open for further replies.

GCL2007

IS-IT--Management
Dec 11, 2007
167
US
I have an inventory report where the user wants the option to print with three different sort options...
Have a formula

if {?Sort}="Product Code" then
{PRODCODE.CODE}
else if {?Sort}="Facility" then
Right({PRODCODE.CODE},1)
else if {?Sort}="CFS"
then {GROUP.DESCRIP}

And I created a report group with the above formula. All works well, except I have some parts where some of the data above is undefined... It's dropping off the report. For example, if the part hasn't been assigned a ProdCode (ProdCode is null for that item) it doesn't show at all. I would like to have them show but in their own section of the report with above or below all the other ProdCodes.

Any thoughts on the best way to tackle this?

Thanks!
 
1. I would query the data and find a true null PROD.CODE, make sure its not spaces
2. This statement Right({PRODCODE.CODE},1) would blank out PROD.CODE
3. I would ADD a FORMULA IF LENGTH(PROD.CODE) < 1 THEN "NOT ASSIGNED"
4. PLACE THIS FIELD IN THE REPORT HEADING AND MAKE IT INVISIBLE

IF THIS DOES NOT WORK REPORT FOR ME TO LOOK AT AGAIN
 
or change
3. I would ADD a FORMULA IF LENGTH(PROD.CODE) < 1 THEN "NOT ASSIGNED" to
3. I would ADD a FORMULA IF LENGTH(PROD.CODE) = NULL THEN "NOT ASSIGNED"


If this does not work download Teamview10 and install
Tell me when you will be available (I am in Arizona or mountain time) and I can attach and create a report to look at your data.
I need to know PartnerID and Password it generates.

Brian Mahler
 
Thanks Brian,
Sorry - struggling a little to understand your helpful answer.. Don't think I'd be allowed to open a Teamviewer session here..
A few questions...
If I create a statement IF LENGTH(PROD.CODE) = NULL THEN "NOT ASSIGNED", I get there is an error in the statement....

If I do a separate query with isnull({PROD.CODE}) I do get records...

So, once I get that straightened out, I need to put that formula in my report header and make it invisible? Would I then have to change my original formula

if {?Sort}="Product Code" then
{PRODCODE.CODE}
else if {?Sort}="Facility" then
Right({PRODCODE.CODE},1)
else if {?Sort}="CFS"
then {GROUP.DESCRIP}

Think I'm missing something..
Thanks
 
In your sort formula try changing the value from Exception for Nulls to Default Value for Nulls in the drop down box on Menu ribbon

_____________________________________
Crystal Reports 2011 and XI
Intersystems Cache 2012 ODBC connection

 
Thanks all,
I will look into your suggestions.. I did notice that I had inner joins on a couple of my tables - want to change to left outers and see what happens... Will be able to look into later.. Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top