Hi Smish,
The error indicates that you have authenication problems with the web version of your database. Are you sure you have the same credentials set for your windows and web databases?
The 2nd error indicates that a parameter type does not match what Crystal is expecting to match against the database data type. In other words, check that the code in your web version that passes the parameter has set the same data type as the field in the data table residing in your web database.
Now, if you are using the SAME database for both Windows and Web apps you have a different set of problems. If this is the case, then obviously the problem does not reside with different authentication models or data types. The difference must be in your code. Check that the web code matches your windows code (in terms of functionality, obviously syntax will vary).
Good luck.
Cheers,
Mark Chimes
thanx sir.....
i am giving u the code as well as exception........
this same appliction runs perfectly in windows...application
when i do this like this i get logon exception failed. in web application..
in page_load am writing this code..................
{
CrystalReport1 rptReportClass = new CrystalReport1();
rptReportClass.SetDatabaseLogon("sa","");
CrystalReportViewer1.ReportSource = rptReportClass;
//am taking value from another web page....
if(Request.QueryString["Name"]!=null )
text1 = Request.QueryString["Name"];
discreteVal.Value = text1;
paramField.ParameterFieldName = "vDepartment";
paramField.CurrentValues.Add(discreteVal);
rptReportClass.DataDefinition.ParameterFields["@vDepartment"].ApplyCurrentValues(paramField.CurrentValues);
paramFields.Add(paramField);
CrystalReportViewer1.ParameterFieldInfo = paramFields;
}
so i get exception...
(
Logon failed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnExcept ion: Logon failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
)
so i added this snip of code in the above instead of rptReportClass.SetDatabaseLogon("sa","");
(
CrystalDecisions.Shared.ConnectionInfo conn=new ConnectionInfo();
CrystalDecisions.CrystalReports.Engine.Table myTable;
CrystalDecisions.Shared.TableLogOnInfo myLog;
conn.ServerName="VENUS";
conn.DatabaseName="master";
conn.UserID ="sa";
conn.Password="";
for(int i=0;i<rptReportClass.Database.Tables.Count;i++)
{
myTable=rptReportClass.Database.Tables[i];
myLog = myTable.LogOnInfo;
myLog.ConnectionInfo= conn;
myTable.ApplyLogOnInfo(myLog);
myTable.Location= myLog.TableName;
}
)
bt then i get this error...
Error in File C:\WINDOWS\TEMP\temp_3a9b8810-741f-4b4f-92a7-ae4cd51a5fe0.rpt: Invalid table number.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: CrystalDecisions.CrystalReports.Engine.InvalidArgu mentException: Error in File C:\WINDOWS\TEMP\temp_3a9b8810-741f-4b4f-92a7-ae4cd51a5fe0.rpt: Invalid table number.
hope ill get solution for this.............