Print Page | Close Window

Calculating Missing value percentage

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4691
Printed Date: 19 May 2024 at 11:40pm


Topic: Calculating Missing value percentage
Posted By: shreyasee
Subject: Calculating Missing value percentage
Date Posted: 01 Nov 2008 at 8:35pm
Hi,
I am using Crystal Report 2008. In that I have created a Report by connecting it to a excel database. In that database there are many variables. For each variable I am trying to calculate the percentage of the missing values. Following is the code :

Numbervar Array a := UBound{dados_asc032907.patientinformation2};
Numbervar i;
Numbervar j := 0;

For i:= 1 To a Do
(
    If a = 0 Then
    (
        j := j+i;
    Else
        j;
    )
Exit For
);
b := j/a*100;
b;

But its giving error.
Can anybody help me to explain how the code should be written, as I am new to Crystal Report, I am little bit confused about the coding.

Thanks,
Shreyasee




Print Page | Close Window