PavanKumarU
Programmer
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("oApp"
) Then
Set Session("oApp"
= Server.CreateObject("CrystalRuntime.Application.9"
End If
If IsObject(Session("oRpt"
) then
Set Session("oRpt"
= nothing
End if
lsReportPath="c:\Reports\Employees.rpt"
Set Session("oRpt"
= Session("oApp"
.OpenReport(lsReportPath , 1)
session("oRpt"
.MorePrintEngineErrorMessages = False
session("oRpt"
.EnableParameterPrompting = False
session("oRpt"
.DiscardSavedData
I have used this:
Session("oRpt"
.ParameterFields.GetItemByName("{?@Advisor}"
.AddCurrentValue(CStr("I am a string"
)
this:
Session("oRpt"
.ParameterFields(0).AddCurrentValue(CStr("I am a string"
)
this:
Session("oRpt"
.ParameterFields(0).AddCurrentValue "I am a string"
and this:
Session("oRpt"
.ParameterFields(0).SetCurrentValue(CStr("I am a string"
)
response.write Session("oRpt"
.ParameterFields(0).value
For each i in Session("oRpt"
.ParameterFields
response.write i.name & " = " & i.value & "<br>"
next
I used the "Getnumberofcurrentvalues" 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
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("oApp"
Set Session("oApp"
End If
If IsObject(Session("oRpt"
Set Session("oRpt"
End if
lsReportPath="c:\Reports\Employees.rpt"
Set Session("oRpt"
session("oRpt"
session("oRpt"
session("oRpt"
I have used this:
Session("oRpt"
this:
Session("oRpt"
this:
Session("oRpt"
and this:
Session("oRpt"
response.write Session("oRpt"
For each i in Session("oRpt"
response.write i.name & " = " & i.value & "<br>"
next
I used the "Getnumberofcurrentvalues" 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