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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variable Formulas not working Details Section

Status
Not open for further replies.

chico007

IS-IT--Management
Jan 18, 2003
2
US
Using Crystal 8.5 connected to a Systems Management Server 2003 database I am trying to find computers that are members of more than one deployment collection - Test, Sat, Sun, Mon, Tue, etc. (They should not be members of more than one collection).

This Works

//Details Section

WhilePrintingRecords;

numberVar a := 1;
numberVar b := 1;
numberVar c := 1;
numberVar d := 0;
numberVar e := 0;
numberVar f := 0;
numberVar g := 0;
numberVar h := 0;
numberVar i := 0;

numbervar a + numbervar b + numbervar c

The above correctly prints the number 3 in the details section.

This doesn't work

//Details Section

WhilePrintingRecords;

numberVar a := 0;
numberVar b := 0;
numberVar c := 0;
numberVar d := 0;
numberVar e := 0;
numberVar f := 0;
numberVar g := 0;
numberVar h := 0;
numberVar i := 0;

if Length ({_RES_COLL_TH10006A.Name}) > 0 then numbervar a := 1; //Test Collection
if Length ({_RES_COLL_TH10006C.Name}) > 0 then numbervar b := 1; //Sat Collection
if Length ({_RES_COLL_TH10006D.Name}) > 0 then numbervar c := 1; //Sun Collection
if Length ({_RES_COLL_TH10006E.Name}) > 0 then numbervar d := 1; //Mon Collection
if Length ({_RES_COLL_TH10006F.Name}) > 0 then numbervar e := 1; //Tue Collection
if Length ({_RES_COLL_TH100070.Name}) > 0 then numbervar f := 1; //Wed Collection
if Length ({_RES_COLL_TH100071.Name}) > 0 then numbervar g := 1; //Thu Collection
if Length ({_RES_COLL_TH10006B.Name}) > 0 then numbervar h := 1; //Fri Collection
if Length ({_RES_COLL_TH100072.Name}) > 0 then numbervar i := 1; //Exceptions Collection

numbervar a + numbervar b + numbervar c

The above prints nothing in the details section.

Please note that I test printed the Length variable to make sure it was showing the correct length using the following single line entry in the details section:

Length ({_RES_COLL_TH100071.Name})

This correctly prints the number 8 in the details section for a particular group.

Then second codeset prints neither a ZERO nor a NUMBER.
Any ideas why the second codeset is not working for me??

Your help really appreciated!

 
It may have something to do with nulls.

A quick way to verify would be to select the File->Report Options and select convert null to default value.

-k

 

I tried your suggestion but still no go.
Something must happening with the declarations
for the "If Length > 0 then numbervar a := 1"

I'll keep trying.

-Chico
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top