-
Crystal and oracle
I have this code to generate a report from c# in windows forms
HTML Code:
ReportDocument prueba =new ReportDocument();
try
{
prueba.Load(@"..\..\prueba.rpt");
CrystalDecisions.Shared.TableLogOnInfo tliCurrent;
foreach(CrystalDecisions.CrystalReports.Engine.Table tbCurrent in prueba.Database.Tables)
{
tliCurrent = tbCurrent.LogOnInfo; tliCurrent.ConnectionInfo.ServerName = "server"; tliCurrent.ConnectionInfo.UserID = vclave; tliCurrent.ConnectionInfo.Password = vclave; tliCurrent.ConnectionInfo.DatabaseName = vdb;
tbCurrent.ApplyLogOnInfo(tliCurrent);
}
crvBasic.ReportSource = prueba;
crvBasic.Zoom(2);}
catch( LoadSaveReportException Exp )
{
MessageBox.Show("No se encuentra la ruta y/o el reporte para ser ejecutado.", "Load Report Error");}
catch( Exception Exp)
{
MessageBox.Show(Exp.Message, "General Error");}
The problem is:
if the report use a table in oracle, then the app ask me to type servername,password, etc and finally does not work.
But if i only change to a report using SQL SERVER without changing anything: IT WORKS!!!!
Any help?