I am a crystal XI beginner and need help with a formatting formula.
I have copied a custom formula from the Crystal reports XI sample reports and checked the formula with the "x-2" button and get no errors. the custom formula works in the sample report. However when I run the report with my data, my formula field returns the actual syntax in the cusom formula instead of formatting the output. Here is a copy of the custom formula and my return:
Function cdStringParamDisplay (param () As String Range, title As String)
dim paramcount as number
dim increment as number
dim outputd as string
dim outputr as string
paramcount = count(param)
Do While paramcount > increment
increment = increment + 1
if maximum(param (increment)) <> minimum(param (increment)) _
then outputr = outputr + minimum(param (increment)) + " to " + maximum( param (increment)) + "\par " _
else outputd = outputd + minimum( param (increment)) + "\par " _
Loop
cdStringParamDisplay = "{\rtf1\ansi\ansicpg1252\deff0\deflang1033}" + _
"{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\fswiss\fcharset0 Arial;}}" + _
"{\colortbl ;\red0\green0\blue128;\red191\green165\blue125;}" + _
"\viewkind4\uc1\pard\cf1\b\f0\fs22 " + title + "\cf0\b0\f1\fs16\par" + _
"\par" + _
"\ul\b\fs16 Distinct Entries\ulnone\par" + _
"\cf2 " + _
"\par " + _
outputd + _
"\par " + _
"\cf0 " + _
"\ul\b Range Entries\ulnone\par " + _
"\par " + _
"\cf2 " + _
outputr + _
"}"
End Function
Here is what my report returns:
{\rtf1\ansi\ansicpg1252\deff0\deflang1033}{\fonttbl{\f0\fswiss\fprq2\fcharset0 Arial;}{\f1\fswiss\fcharset0 Arial;}}{\colortbl ;\red0\green0\blue128;\red191\green165\blue125;}\viewkind4\uc1\pard\cf1\b\f0\fs22 Programs selected for this report:\cf0\b0\f1\fs16\par\par\ul\b\fs16 Distinct Entries\ulnone\par\cf2 \par Chico Community Counseling Center\par \par \cf0 \ul\b Range Entries\ulnone\par \par \cf2 Access to Access - MHSA\par }
The bold entries are my selected parameters.
could someone help - please,
Thank you,
K