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

Create Functions in Crystall reports

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I would like to create a function in crystall report which would check if the field in Database is NULL or "" and then replace it with " -- " in report.

I don't want the formula to be inserted everywhere like
if isNull({tablename.Fieldname})=true or tablename.fieldname="" then

" -- "

I want that before printing the record it should Check for Null or blank

Function CheckNull(str1)
if isNull(str1)=True then
CheckNull=" -- "
else
CheckNull=str1
End Function

How do I do that ??????
In general HOW DO I CREATE AND CALL FUNCTIONS IN REPORTS

Thanks
Anil
 
I answered this question the other day, but let me elaborate a bit. You can create your own functions for crystal, but not WITHIN crystal like you can in Access or other applications.

Your functions need to be created in VB, with specific project naming conventions, and then Crystal will recognize it. the new function will be available in the "additional functions" section of the formula editor window.

Again, George Peck's book covers this perfectly, and for $30 is a bargain. Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top