紧急求教ASP大侠:小弟一ASP调用自定义OCX控件出错....
小弟由于各方面的原因,在客户端调用ASP显示水晶报表,使用的是一个自定义的OCX控件来显示水晶报表,可不知为什么,在有些机器上注册此OCX后显示报表正常,但在有些机器上却怎么搞也显示不出来,怀疑是OCX注册的问题,但究竟是什么原因,如何解决,小弟实在是找不到办法了,所以请各位写过此类代码的ASP大侠帮帮小弟,小弟在此谢过了:
显示的错误信息如下:
*****************************************************************************
行:90
字符:1
错误:对象不支持此属性或方法'Rpt10OCX1.param1'
代码:0
URL:http://172.17.133.1/test/new/RptSbmAllORD_V.asp?myear=2006&mth=3&mfty=ALL
*****************************************************************************
说明:
1.Rpt10OCX1.param1 : 这是我在ASP中的自义控件名及其中一个参数
2.有安装水晶报表的共享文件
3.调用自定义控件显示报表的ASP文件代码如下
<OBJECT id=Rpt10OCX1 style="LEFT: 0px; TOP: 0px" classid="clsid:478BD9E4-1FF6-4CB7-A4BE-80773EB2775F">
<PARAM NAME="_ExtentX" VALUE="20500">
<PARAM NAME="_ExtentY" VALUE="11000"></OBJECT>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<form name="form1" method="post" action="">
<input type="hidden" name="hiddenField">
<%
for i=1 to request.QueryString.Count
%>
<input type="hidden" name="param<%=cstr(i)%>" value="<%=request.QueryString(i)%>">
<input type="hidden" name="paramname<%=cstr(i)%>" value="<%=request.QueryString.key(i)%>">
<%
next
%>
<%
for i= request.QueryString.Count+1 to 20
%>
<input type="hidden" name="param<%=cstr(i)%>" value="">
<input type="hidden" name="paramname<%=cstr(i)%>" value="">
<%
next
%>
</form>
<script language=vbscript>
'这是以前的同事传参数给水晶报表参数
Rpt10OCX1.param1=document.form1.param1.value
Rpt10OCX1.paramname1=document.form1.paramname1.value
Rpt10OCX1.param2=document.form1.param2.value
Rpt10OCX1.paramname2=document.form1.paramname2.value
Rpt10OCX1.param3=document.form1.param3.value
Rpt10OCX1.paramname3=document.form1.paramname3.value
Rpt10OCX1.param4=document.form1.param4.value
Rpt10OCX1.paramname4=document.form1.paramname4.value
Rpt10OCX1.param5=document.form1.param5.value
Rpt10OCX1.paramname5=document.form1.paramname5.value
Rpt10OCX1.param6=document.form1.param6.value
Rpt10OCX1.paramname6=document.form1.paramname6.value
Rpt10OCX1.param7=document.form1.param7.value
Rpt10OCX1.paramname7=document.form1.paramname7.value
Rpt10OCX1.param8=document.form1.param8.value
Rpt10OCX1.paramname8=document.form1.paramname8.value
Rpt10OCX1.param9=document.form1.param9.value
Rpt10OCX1.paramname9=document.form1.paramname9.value
Rpt10OCX1.param10=document.form1.param10.value
Rpt10OCX1.paramname10=document.form1.paramname10.value
Rpt10OCX1.param11=document.form1.param11.value
Rpt10OCX1.paramname11=document.form1.paramname11.value
Rpt10OCX1.param12=document.form1.param12.value
Rpt10OCX1.paramname12=document.form1.paramname12.value
Rpt10OCX1.param13=document.form1.param13.value
Rpt10OCX1.paramname13=document.form1.paramname13.value
Rpt10OCX1.param14=document.form1.param14.value
Rpt10OCX1.paramname14=document.form1.paramname14.value
Rpt10OCX1.param15=document.form1.param15.value
Rpt10OCX1.paramname15=document.form1.paramname15.value
Rpt10OCX1.param16=document.form1.param16.value
Rpt10OCX1.paramname16=document.form1.paramname16.value
Rpt10OCX1.param17=document.form1.param17.value
Rpt10OCX1.paramname17=document.form1.paramname17.value
Rpt10OCX1.param18=document.form1.param18.value
Rpt10OCX1.paramname18=document.form1.paramname18.value
Rpt10OCX1.param19=document.form1.param19.value
Rpt10OCX1.paramname19=document.form1.paramname19.value
Rpt10OCX1.param20=document.form1.param20.value
Rpt10OCX1.paramname20=document.form1.paramname20.value
Rpt10OCX1.showsetup="<%=showsetup%>"
Rpt10OCX1.strsql1="<%=strSQL1%>"
Rpt10OCX1.strsql2="<%=strSQL2%>"
Rpt10OCX1.strsql3="<%=strSQL3%>"
Rpt10OCX1.strsql4="<%=strSQL4%>"
Rpt10OCX1.strsql5="<%=strSQL5%>"
Rpt10OCX1.strsql6="<%=strSQL6%>"
Rpt10OCX1.DBServer ="192.168.1.254"
Rpt10OCX1.DBName="InfoDB"
Rpt10OCX1.UserID ="sa"
Rpt10OCX1.Password =""
Rpt10OCX1.rptname ="\\192.168.1.1\wwwroot\QUOTASYS\report\<%=reportname%>"
call Rpt10OCX1.report()
</script>
方法说明:
这里使用的方法,由于公司有几百台机器,管理严格和水晶报表版权的问题,所以我们显示报表是使用按水晶报表在WINDOWS FROM应用程序中的应用方式包装成的一个显示报表的OCX,只需要给相关参数,然后取得数据和显示都由这个OCX控件按WINDOWS FORM应用的方式来完成(DLL使用的是Craxdrt.dll,而不是另外的一个多线程的,也在ASP中不可用).
请各位大侠帮帮小弟,几百台机器有的注册OCX控件后就可显示出来报表,可有些就是不能,包括本人的机器...