Many Thanks Kilan
CRAXDRT is unknown to me. Do I need to install a new version of Crystal
Report (Such as 8.5) or any other component to use the CRAXDRT ? I have only
Crystal Report 4.5.
Regards
Niaz
----- Original Message -----
From: "Grau Kilian (rds)" <rds@a...>
To: "professional vb" <pro_vb@p...>
Sent: Monday, September 30, 2002 1:49 AM
Subject: [pro_vb] AW: Crystal Report Conversion from Access to SQL Server
>
>
>
>
>
> AW: [pro_vb] Crystal Report Conversion from Access to SQL Server
>
>
>
> Hi Niaz,
>
>
> This Codesample shoud work :
>
>
>
> Dim Report As CRAXDRT.Report
>
>
> Dim crxTables As CRAXDRT.DatabaseTables
> Dim crxTable As CRAXDRT.DatabaseTable
>
>
> Dim crxSections As CRAXDRT.Sections
> Dim crxSection As CRAXDRT.Section
>
>
> Dim crxReportObjects As CRAXDRT.ReportObjects
> Dim crxSubreportObj As CRAXDRT.SubreportObject
> Dim crxSubreport As New CRAXDRT.Report
> Dim crxApplication As New CRAXDRT.Application
>
>
>
> '----------------------------
> ' gstrIP
> ' gstrUser
> ' gstrPassword
> '----------------------------
>
>
> Set Report ürxApplication.OpenReport(gstrAuswertung)
>
> funLogSchreiben 200008 'append
>
> '// Fügt den subreport an
> crvCrystal.ReportSource
>
> funLogSchreiben 200009 'append
>
> 'Get the sections from the Main report
> Set crxSections
> intTabellen
>
> funLogSchreiben 200010 'append
>
> 'sets all main report connection
> For i ñ To intTabellen Step 1
> Report.Database.Tables(i).SetLogOnInfo gstrIP, gstrUser, gstrPassword, ""
> Next i
>
> funLogSchreiben 200011 'append
>
> 'Go through each sub section in the main report...
> For Each crxSection In crxSections
> 'Get all the objects in this section...
> Set crxReportObjects ürxSection.ReportObjects
> 'Go through each object in the reportobjects for this section...
> For Each objReportObject In crxReportObjects
> 'Find the object which is the SubreportObject
> If objReportObject.Kind ürSubreportObject Then
> 'Found a subreport, now get a hold of it
> Set crxSubreportObj
> 'Open the subreport and treat it as any other report
> Set crxSubreport ürxSubreportObj.OpenSubreport
>
> '----------------
> 'This is where the database location can be changed.
> 'Read below for specific types of datasources.
> '----------------
> 'Get the Tables collection for the subreport
> Set crxTables ürxSubreportDatabase.Tables
> 'Get the first table from the Tables collection
> Set crxTable ürxTables.Item(1)
> 'Set the location of the .mdb file or in this way to the SQL server
> crxTable.SetLogOnInfo gstrIP, "ivini", "ivini", ""
>
> End If
> Next objReportObject
> Next crxSection
>
>
> Have a nice day Kilian !
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Dr. Niaz Mohammed [mailto:mniaz@k...]
> Gesendet: Montag, 30. September 2002 19:57
> An: professional vb
> Betreff: [pro_vb] Crystal Report Conversion from Access to SQL Server
>
>
>
> I have converted an Access database to SQL Server. The VB program uses
lots
> of Crystal Report Files that were build on Access database. Rebuilding so
> many report files (from scratch) on SQL Server Database is a tedious task.
> Can anyone suggest us an easier way to Convert these reports files or
using
> the same report files from Visual Basic without any conversion.
> All Table Names are the same between Access and SQL Server. I am using
> Crystal Report 4.5 that comes with Visual Studio 6. I tried to use report
> files from VB using the .Connect property of Crystal Report Control (with
> the ODBC DSN). The report shows data that is not there in SQL Server.
>
>
> Thanks in advance
>
>
> Niaz
>
>
>
>
> ---
> Visual C# - A Guide for VB6 Developers
> This book will make it easy to transfer your skills
> from Visual Basic 6 to C#, the language of choice
> of the .NET Framework.
> http://www.wrox.com/ACON11.asp?ISBN61007175&p2p0059
>
>
>
>
>
>
>
>
> ---
> Visual C# - A Guide for VB6 Developers
> This book will make it easy to transfer your skills
> from Visual Basic 6 to C#, the language of choice
> of the .NET Framework.
> http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059
>
>
>