Showing posts with label facing. Show all posts
Showing posts with label facing. Show all posts

Wednesday, March 21, 2012

error on one machine and working on another

Dear sir this is a typical problem i am facing.

We have 4 web servers in out establishment.
this code works on some and does not work on some.

in all servers i have installed crystal reports the same way.

the database server is a separate server.

please help.

i must deploy this web page and the report on the one of the 2 servers( both hcl machines) allotted to me. the other 2 on which this code is working are ibm machines but i cannot deploy on them.

Error Type:
webReporting.dll (0x8004100F)
Logon failed. Details: ADO Error Code: 0x80040e21 Source: Provider Description: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. Native Error: -2147217887 Error in File C:\WINNT\TEMP\{A687C3B5-8F52-40E2-9433-C2FF1D56D225}.rpt: Unable to connect: incorrect log on parameters.
/stores_crystal/expendable.asp, line 72

<%@. Language=VBScript %>
<!--#include file="connections.asp"-->
<!--#include file="userdate.asp"-->
<!--#include file="checkscriptfordatatype.asp"-->
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<center>
<form name=expendable method=post>
<%if request.form("dummy")="" then
set rs=server.CreateObject ("adodb.recordset")
q="sELECT item_code,item from exp_binmst order by item"
rs.Open q,conn_inventory
%>ITEM<select size=10 multiple name=eitem>
<%while not rs.eof
v="'"&rs(0)&"'"%>
<option value="<%=v%>"><%=rs(1)%></option>
<%rs.movenext
wend%>
</select>
<BR><BR><BR><BR><BR>From Date<%call urdate("mustbox-date/from date","from_date",date)%>
No From Date??<input type=checkbox name=No_From_date >
To Date<%call urdate("mustbox-date/to date","to_date",date)
%>
<BR><BR><BR><input type=submit value=show><input name=dummy value=dummy type=hidden>
<%else

dim objectfactory,htmlviewer,conInfo,coninfos
set objectfactory=createobject("crystalreports.objectfactory.2")
set htmlviewer=createobject("crystalreports.crystalreportviewer")
set conInfos=createobject("crystalreports.ConnectionInfos")
set conInfo=createobject("crystalreports.ConnectionInfo")

conInfo.UserName="sa"
conInfo.Password="3blind"
conInfos.Add(conInfo)

if Request.Form("no_from_date")="on" then
q="{Command.item_code} in ["&request.form("eitem")&"] and {Command.bin_dt} <=cdate('"&cdate(Request.Form("to_Date"))&"')"
else
q="{Command.item_code} in ["&request.form("eitem")&"] and {Command.bin_dt} >=cdate('"&cdate(request.form("from_Date"))&"') and {Command.bin_dt} <=cdate('"&cdate(Request.Form("to_Date"))&"')"
end if

with htmlviewer
.HasCrystalLogo=false
.HasExportButton=false
.HasGotoPageButton=false
.HasPageNavigationButtons=false
.HasPrintButton=false
.HasRefreshButton=false
.HasSearchButton=false
.HasToggleGroupTreeButton=false
.HasViewList=false
.HasZoomFactorList=false
.IsOwnForm=true
.IsOwnPage=true
.pageToTreeRatio=100
.ReportSource="expendable.rpt"
.EnableLogonPrompt=false
.DatabaseLogonInfos=conInfos
.SelectionFormula=q

end with

call htmlviewer.ProcessHttpRequest(request,Response,session)
'''' line no 72

end if%>

</BODY>
</HTML>
:(I encountered the same problem a couple of days before, it made me very hard to fix that, I found none solution provided on the line, finally I got the solution :
Just using ODBC connection instead of OLEDB.

Because the crystal versioning is very picky.