p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: Re: Question ???


Message #1 by "Balachandar Ganesan" <GBALA@b...> on Tue, 01 May 2001 10:02:02 +0530
Hi,

mate, crystal report does not have an aversion for Gdiminno. anyway.

1.

Separate database connectivity has to be estabalished for

crystal reports. if you dont want this then you need to pass the data in 

the form of  ADO record set or rdo record set. or you have to use crystal 

data com object.

2. you can established the connectivity by using dsn(system).or native 

connection.you must be knowing about dsn connection. if you want to know 

about native connection click on more data sources in the database box 

coming up while designing the reports where in you point to the input 

source.



3.the login method provided are loginserver, logoninfo.



these can be done in the following manner



dim app1 as crpeauto.application

dim rpt1 as crpeauto.report



set app1=3D new crpeauto.aapplication

set rpt1=3Dapp1.openreport("path report name")



app1.logonserver "connection.dll,dsnname or server name","userid",password"





 rpt. preview or rpt1.print



here the connection dll you need to specify. you can get the name of the 

dll from the cryystal report itself. go to database in the menubar. click 

change database driver there you will be shown the name of the dll. you 

can use that.



4. incase it does not work



change the code as follows

dim app1 as crpeauto.application

 dim rpt1 as crpeatuo.report

dim dbase as crpeauto.database

dim tables as crpeauto.databasetables

dim table as crpeauto.databasetable



set app1=3D new crpeauto.application

set rpt1 =3Dapp1.openreport("pathand filename")

set dbase=3Drpt1.database

set tables =3Ddbase.tables



for each table in tables

 with table

   .setlogoninfo "dsn or server name","userid","password"

end with

next table





hope this should solve the problem. for anymore details you can contact me 

directly in this mail id itself.incase if you are using sqlserver then you 

can go

c:\winnt\crystal

there will be a file called sqlsvr.err open this in a notepad there SQL 

records it's messages. they can be used as an input for solving the 

problem

regards

balachandar.g









>>> GDiMinno@h... 04/30/01 10:38pm >>>

Hi to all?



Its my first using Crystal Report and I don't know why the crystal report

does not want me to log in SQL Server, I put all the information userID,

password and server and it still doesn't work WHY?



Do I need to start up something in order to log on SQL???



PLEASE help to on what to do.



Thanking you in advance.



Gino D.M





Message #2 by "dhenz" <dhenz@i...> on Wed, 2 May 2001 12:25:51 +0800
maybe you are not allowed to the NT server where SQL Server installed.





----- Original Message -----

From: Guerrino Di Minno <GDiMinno@h...>

To: crystal_reports <crystal_reports@p...>

Sent: Tuesday, May 01, 2001 1:08 AM

Subject: [crystal_reports] Question ???





> Hi to all?

>

> Its my first using Crystal Report and I don't know why the crystal report

> does not want me to log in SQL Server, I put all the information userID,

> password and server and it still doesn't work WHY?

>

> Do I need to start up something in order to log on SQL???

>

> PLEASE help to on what to do.

>

> Thanking you in advance.

>

> Gino D.M




  Return to Index