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

Parameter dialog box showing up even after assigning at runtime

Status
Not open for further replies.

forumhelp

Programmer
Joined
Dec 13, 2005
Messages
17
Location
US
Hi Dave and everyone,

Continuing my last thread because I am still facing problem. I am passing the parameter to the report from visual basic. When I convert the report from Crystal Reports Ver. VI to Ver. XI, I change the datasource location. I am debugging my visual basic application and it is correctly assigning the parameter value. But when the report is shown, it prompts me for a parameter name always. I don't know why?
1. For some reports (which do not have sub reports) the problem exists in the primary report itself and a dialog box appears to enter the parameter value.

2. For other reports (which have sub reports), the primary report receives parameter but the parameter is not passed to the sub reports. Sometimes the primary report itself is not receiving the parameter.

I have checked the links and I am passing the parameter from primary report to the secondary report. Please suggest.

Thanks,
--ForumHelp
 
An Update:

I have gone through the following code which assigns the parameter fields.
For intI = 1 To rpt.ParameterFields.count
sRptName = LCase(.ParameterFields(intI).Name)
If sRptName = "{?@hostname}" Then
rpt.ParameterFields(intI).AddCurrentValue (gsHostName)
End If
Next intI

After it assigns the value, on the immediate window, when I type:
?rpt.ParameterFields(1).GetNthCurrentValue(1)
It shows empty.

For few reports, this is working for for most, it is not assigning the parameter. Any idea why is that.
 
Hi Everyone,

Could you please have a look on my problem of why my visual basic code cannot assign a value to one of the parameters are run time. It is working for the other two parameters. Please suggest.

Thanks in advance.
--ForumHwlp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top