paladin127
MIS
I am running Crystal Enterprise 10 Embedded edition and am trying to run a report from ASP. I am using the following code:
*************************
<%
reportname = "wmsal001.rpt"
%>
<!-- #include file="AlwaysRequiredSteps.asp" -->
<%
Set NewValue = objFactory.CreateObject("CrystalReports.ParameterFieldDiscreteValue")
NewValue.Value = 1
Set TempParam = objFactory.CreateObject("CrystalReports.ParameterField")
ClientDoc.DataDefinition.ParameterFields.Item(0).CopyTo TempParam
TempParam.CurrentValues.Add NewValue
ClientDoc.DataDefController.ParameterFieldController.Modify ClientDoc.DataDefinition.ParameterFields.Item(0), TempParam
%>
<!-- #include file="CrystalReportsViewer.asp" -->
******************************
This works fine but when I modify the 'NewValue.Value = 1' line to read 'NewValue.Value = request.form("SiteID")' , I get the following error:
*******************************
Error Type:
webReporting.dll (0x80004005)
Error in File C:\WINNT\TEMP\{FC91B826-6F0A-46FA-96E1-93BA3A048629}.rpt: The specified value type is different to the current value type.
/reports/CrystalReportsViewer.asp, line 20
*********************************
I am new to this so I'm not sure if there is a way to pass variables from another web page via it's form fields.
Any ideas?
*************************
<%
reportname = "wmsal001.rpt"
%>
<!-- #include file="AlwaysRequiredSteps.asp" -->
<%
Set NewValue = objFactory.CreateObject("CrystalReports.ParameterFieldDiscreteValue")
NewValue.Value = 1
Set TempParam = objFactory.CreateObject("CrystalReports.ParameterField")
ClientDoc.DataDefinition.ParameterFields.Item(0).CopyTo TempParam
TempParam.CurrentValues.Add NewValue
ClientDoc.DataDefController.ParameterFieldController.Modify ClientDoc.DataDefinition.ParameterFields.Item(0), TempParam
%>
<!-- #include file="CrystalReportsViewer.asp" -->
******************************
This works fine but when I modify the 'NewValue.Value = 1' line to read 'NewValue.Value = request.form("SiteID")' , I get the following error:
*******************************
Error Type:
webReporting.dll (0x80004005)
Error in File C:\WINNT\TEMP\{FC91B826-6F0A-46FA-96E1-93BA3A048629}.rpt: The specified value type is different to the current value type.
/reports/CrystalReportsViewer.asp, line 20
*********************************
I am new to this so I'm not sure if there is a way to pass variables from another web page via it's form fields.
Any ideas?