All Forums Database
24 Jun 2008
Crystal Reports with Teradata

I have a set of reports developed in Crystal Reports with SQL SERVER as Database. Now i need to port these reports on Teradata. I am facing following problems.1: I have a piece of code which sets Database information in Report Document like DatabaseName, UserName, Password. This code works fine when SQL Server is used as a Database. But when i changed database to Teradata, the same code failed to generate a Report.2: My reports are developed using OLE DB connection object for SQL SERVER. Reports have a reference to Columns from Database tables.3: When i tried to Create a new OLE DB connection object, re-configured the selected columns and generated a new Report it started working. 4: If i create a Stored Procedure and use the stored procedure columns in Report file instead of direct reference to columns of database table, then report is generated. e.g: I have a user details report which displays a list of Users configured in my application. This report file has columns directly selected from database tables. Now if i write a Stored Procedure which returns me the same result and then use this result to map to a report file, then it works fine.Code snippet for Setting Database credentials://rptDoc is an object of Report Document// crConnectionInfo has all the details like DBName,UserName,Password.crSections = rptDoc.ReportDefinition.Sections; foreach (Section crSection in crSections) { crReportObjects = crSection.ReportObjects; foreach (ReportObject crReportObject in crReportObjects) { if (crReportObject.Kind == ReportObjectKind.SubreportObject) { crSubreportObject = (SubreportObject)crReportObject; //open the subreport object and logon as for the general report crSubreportDocument = crSubreportObject.OpenSubreport(crSubreportObject.Subr eportName); crDatabase = crSubreportdocument.Database; crTables = crDatabase.Tables; for (int j = 0; j < crTables.Count; j++) { crTable = crTables[j]; crTableLogOnInfo = crTable.LogOnInfo; crTableLogOnInfo.ConnectionInfo = crConnectionInfo; crTable.ApplyLogOnInfo(crTableLogOnInfo); } } } } crDatabase = rptDoc.Database; crTables = crDatabase.Tables; for (int j = 0; j < crTables.Count; j++) { crTable = crTables[j]; crTableLogOnInfo = crTable.LogOnInfo; crTableLogOnInfo.ConnectionInfo = crConnectionInfo; crTable.ApplyLogOnInfo(crTableLogOnInfo); }All the suggestions will be appreciated.

You must sign in to leave a comment.