Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: AW: Re: AW: Crystal Report Conversion from Access to SQL Server


Message #1 by "Grau Kilian (rds)" <rds@a...> on Mon, 30 Sep 2002 18:05:37 +0200




AW: [pro_vb] Re: AW: Crystal Report Conversion from Access to SQL Server



Oo thats pretty old...


I don't have any experience with crystal 4.5 


I tried this source code on crystal 8.0 and 8.5 and there it works fine.


maybe you don't have any possibility to change the source on crystal 4.5 ...
And sure there must be a way to change the datasource on the report at design time 


i think you shoud look on Crystal Knowledge Base for any other way
http://support.crystaldecisions.com/library/kbase.asp


Regards
Kilian


-----Ursprüngliche Nachricht-----
Von: Dr. Niaz Mohammed [mailto:mniaz@k...]
Gesendet: Montag, 30. September 2002 22:47
An: professional vb
Betreff: [pro_vb] Re: AW: Crystal Report Conversion from Access to SQL
Server



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
>
>
>




---
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







  Return to Index