Skip to Content
0
Former Member
May 21, 2009 at 04:47 AM

Change "prompting text" of Crystal report 8.5 parameter in Visual Basic6.0

234 Views

Hi,

I am trying to change the default values and "prompting text" of Crystal report 8.5 parameter through Visual Basic 6.0. I am taking Stored Procedure as Db Object for report.

Process: Open the report, access the parameter field, change the default value and "prompting text"

I am able to change the default values.My problem is in changing the "prompting text" for a parameter.

Find the code below.

'Display the existing prompting text - It is working

MsgBox CrRep.ParameterFields.GetItemByName(paramname).Prompt

(Ex: Select Contract type description)

'It throws the error while changing the prompt value

CrRep.ParameterFields.GetItemByName(paramname).Prompt = "Enter the Contract Type Description"

Error:

"Not Report Parameter."

Error Number: -2147189575 (80047cb9)

Is there any solution for this problem?