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

RDC Parameter Issue....Please HELP... Cant debug more!!!

Status
Not open for further replies.

PavanKumarU

Programmer
Jan 31, 2003
56
0
0
US
Hi,
After two days of beating my head against the wall, i am coming for help, very desperately. Any help is much appreciated.
I am trying to ste some values to the stored procedure parameters in a report. I dont know whats happening, but the report is not taking these parameters nor it it raising any errors. Please see the code here:
<%
If Not IsObject (Session(&quot;oApp&quot;)) Then
Set Session(&quot;oApp&quot;) = Server.CreateObject(&quot;CrystalRuntime.Application.9&quot;)
End If
If IsObject(Session(&quot;oRpt&quot;)) then
Set Session(&quot;oRpt&quot;) = nothing
End if
lsReportPath=&quot;c:\Reports\Employees.rpt&quot;
Set Session(&quot;oRpt&quot;) = Session(&quot;oApp&quot;).OpenReport(lsReportPath , 1)
session(&quot;oRpt&quot;).MorePrintEngineErrorMessages = False
session(&quot;oRpt&quot;).EnableParameterPrompting = False
session(&quot;oRpt&quot;).DiscardSavedData

I have used this:

Session(&quot;oRpt&quot;).ParameterFields.GetItemByName(&quot;{?@Advisor}&quot;).AddCurrentValue(CStr(&quot;I am a string&quot;))

this:
Session(&quot;oRpt&quot;).ParameterFields(0).AddCurrentValue(CStr(&quot;I am a string&quot;))

this:
Session(&quot;oRpt&quot;).ParameterFields(0).AddCurrentValue &quot;I am a string&quot;

and this:
Session(&quot;oRpt&quot;).ParameterFields(0).SetCurrentValue(CStr(&quot;I am a string&quot;))

response.write Session(&quot;oRpt&quot;).ParameterFields(0).value

For each i in Session(&quot;oRpt&quot;).ParameterFields
response.write i.name & &quot; = &quot; & i.value & &quot;<br>&quot;
next

I used the &quot;Getnumberofcurrentvalues&quot; also just to find if its 'appending' these values to the same parameter. The output here is zero always. So its not taking any value for the parameter.
The Parameter type is string and correct for all others i am using.
Please help. I am beating my head against the wall here.
Thanks,
Pavan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top