p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: crystal report in VB .


Message #1 by koo9@h... on Mon, 18 Jun 2001 19:30:33
i am new to crystal report and I need to do report in VB with crystal 

report. so I enbeded the CRviewer in VB6 form, all added all the field 

that will appeal in the report, but when i run it, there is an error 

said "server has not yet beed opened", my question is how I can establish 

an connection with the ODBC, example code will be great. thanks in advance



Mike
Message #2 by Ronnie McAuley <rmcauley@v...> on Tue, 19 Jun 2001 09:24:43 +0100
I usualy create new report with new crystal report option. This asks for the

database connection at the start with the wizard. 



> -----Original Message-----

> From:	koo9@h... [SMTP:koo9@h...]

> Sent:	Monday, June 18, 2001 8:31 PM

> To:	crystal_reports

> Subject:	[crystal_reports] crystal report in VB .

> 

> i am new to crystal report and I need to do report in VB with crystal 

> report. so I enbeded the CRviewer in VB6 form, all added all the field 

> that will appeal in the report, but when i run it, there is an error 

> said "server has not yet beed opened", my question is how I can establish 

> an connection with the ODBC, example code will be great. thanks in advance

> 

> Mike



Message #3 by "Mike" <koo9@h...> on Tue, 19 Jun 2001 07:59:49 -0600
yes. that's how I log into the database and do all the design, but then

after I finished it. when I run the vb app. the report said" server has not

yet been open", because there is no code in my vb app used to connect the

database. so I wonder how I can implement the connection code.







> I usualy create new report with new crystal report option. This asks for

the

> database connection at the start with the wizard.

>

> > -----Original Message-----

> > From: koo9@h... [SMTP:koo9@h...]

> > Sent: Monday, June 18, 2001 8:31 PM

> > To: crystal_reports

> > Subject: [crystal_reports] crystal report in VB .

> >

> > i am new to crystal report and I need to do report in VB with crystal

> > report. so I enbeded the CRviewer in VB6 form, all added all the field

> > that will appeal in the report, but when i run it, there is an error

> > said "server has not yet beed opened", my question is how I can

establish

> > an connection with the ODBC, example code will be great. thanks in

advance

> >

> > Mike

>

>

Message #4 by Ronnie McAuley <rmcauley@v...> on Tue, 19 Jun 2001 15:26:40 +0100
Erm, this seems to work for me. After picking ODBC connection I have to pick

the tables, queries etc. That is step 2 of the wizard, which will set the

data to be seen in your left hand panel



Ron



> -----Original Message-----

> From:	Mike [SMTP:koo9@h...]

> Sent:	Tuesday, June 19, 2001 3:00 PM

> To:	crystal_reports

> Subject:	[crystal_reports] RE: crystal report in VB .

> 

> yes. that's how I log into the database and do all the design, but then

> after I finished it. when I run the vb app. the report said" server has

> not

> yet been open", because there is no code in my vb app used to connect the

> database. so I wonder how I can implement the connection code.

> 

> 
Message #5 by "Mike" <koo9@h...> on Tue, 19 Jun 2001 08:53:43 -0600
yes. I did that. I mean after designing the report, when I run the report

again, (not in design phase), it give me that error.







> Erm, this seems to work for me. After picking ODBC connection I have to

pick

> the tables, queries etc. That is step 2 of the wizard, which will set the

> data to be seen in your left hand panel

>

> Ron

>

> > -----Original Message-----

> > From: Mike [SMTP:koo9@h...]

> > Sent: Tuesday, June 19, 2001 3:00 PM

> > To: crystal_reports

> > Subject: [crystal_reports] RE: crystal report in VB .

> >

> > yes. that's how I log into the database and do all the design, but then

> > after I finished it. when I run the vb app. the report said" server has

> > not

> > yet been open", because there is no code in my vb app used to connect

the

> > database. so I wonder how I can implement the connection code.

>

Message #6 by Ronnie McAuley <rmcauley@v...> on Tue, 19 Jun 2001 16:05:16 +0100
Sorry can't think of anything, but I do have a similar problem with an

install recently. Maybe CR isbuggy???



> -----Original Message-----

> From:	Mike [SMTP:koo9@h...]

> Sent:	Tuesday, June 19, 2001 3:54 PM

> To:	crystal_reports

> Subject:	[crystal_reports] RE: crystal report in VB .

> 

> yes. I did that. I mean after designing the report, when I run the report

> again, (not in design phase), it give me that error.

> 

> 

> 

> > Erm, this seems to work for me. After picking ODBC connection I have to

> pick

> > the tables, queries etc. That is step 2 of the wizard, which will set

> the

> > data to be seen in your left hand panel

> >

> > Ron

> >

> > > -----Original Message-----

> > > From: Mike [SMTP:koo9@h...]

> > > Sent: Tuesday, June 19, 2001 3:00 PM

> > > To: crystal_reports

> > > Subject: [crystal_reports] RE: crystal report in VB .

> > >

> > > yes. that's how I log into the database and do all the design, but

> then

> > > after I finished it. when I run the vb app. the report said" server

> has

> > > not

> > > yet been open", because there is no code in my vb app used to connect

> the

> > > database. so I wonder how I can implement the connection code.



Message #7 by "Mike" <koo9@h...> on Tue, 19 Jun 2001 11:40:44 -0600
now I change to use Crystal report Control,

and I am able to view thoes reports that I have designed,

but the thing is how I can reflesh the report data everytime I run the

report? any idea?











> Sorry can't think of anything, but I do have a similar problem with an

> install recently. Maybe CR isbuggy???

>

> > -----Original Message-----

> > From: Mike [SMTP:koo9@h...]

> > Sent: Tuesday, June 19, 2001 3:54 PM

> > To: crystal_reports

> > Subject: [crystal_reports] RE: crystal report in VB .

> >

> > yes. I did that. I mean after designing the report, when I run the

report

> > again, (not in design phase), it give me that error.

> >

> >

> >

> > > Erm, this seems to work for me. After picking ODBC connection I have

to

> > pick

> > > the tables, queries etc. That is step 2 of the wizard, which will set

> > the

> > > data to be seen in your left hand panel

> > >

> > > Ron

> > >

> > > > -----Original Message-----

> > > > From: Mike [SMTP:koo9@h...]

> > > > Sent: Tuesday, June 19, 2001 3:00 PM

> > > > To: crystal_reports

> > > > Subject: [crystal_reports] RE: crystal report in VB .

> > > >

> > > > yes. that's how I log into the database and do all the design, but

> > then

> > > > after I finished it. when I run the vb app. the report said" server

> > has

> > > > not

> > > > yet been open", because there is no code in my vb app used to

connect

> > the

> > > > database. so I wonder how I can implement the connection code.

>

>




$subst('Email.Unsub')

>

>

Message #8 by Angelo_PARDINAS@e... on Wed, 20 Jun 2001 09:25:29 +0800

To refresh the data just use the DiscardSavedData property of the Crystal

Report Control :



  cryReport.DiscardSavedData = True



and if you're still interested in connecting to a Server - here's the code

I use to connect to an Oracle DB:





  cryReport.Connect = "DSN=dsnname;UID = your_userid;PWD 

your_password;DSQ = database_name"





-  Angelo







                                                                                              

                    koo9@h...                                                             

                    com                  To:     crystal_reports@p... @ SMTP          

                                         cc:                                                  

                    20/06/2001           Subject:     [crystal_reports] RE: crystal report in 

                    01:44 AM             VB .                                                 

                    Please                                                                    

                    respond to                                                                

                    crystal_repor                                                             

                    ts                                                                        

                                                                                              

                                                                                              







now I change to use Crystal report Control,

and I am able to view thoes reports that I have designed,

but the thing is how I can reflesh the report data everytime I run the

report? any idea?











> Sorry can't think of anything, but I do have a similar problem with an

> install recently. Maybe CR isbuggy???

>

> > -----Original Message-----

> > From: Mike [SMTP:koo9@h...]

> > Sent: Tuesday, June 19, 2001 3:54 PM

> > To: crystal_reports

> > Subject: [crystal_reports] RE: crystal report in VB .

> >

> > yes. I did that. I mean after designing the report, when I run the

report

> > again, (not in design phase), it give me that error.

> >

> >

> >

> > > Erm, this seems to work for me. After picking ODBC connection I have

to

> > pick

> > > the tables, queries etc. That is step 2 of the wizard, which will set

> > the

> > > data to be seen in your left hand panel

> > >

> > > Ron

> > >

> > > > -----Original Message-----

> > > > From: Mike [SMTP:koo9@h...]

> > > > Sent: Tuesday, June 19, 2001 3:00 PM

> > > > To: crystal_reports

> > > > Subject: [crystal_reports] RE: crystal report in VB .

> > > >

> > > > yes. that's how I log into the database and do all the design, but

> > then

> > > > after I finished it. when I run the vb app. the report said" server

> > has

> > > > not

> > > > yet been open", because there is no code in my vb app used to

connect

> > the

> > > > database. so I wonder how I can implement the connection code.

>

>




$subst('Email.Unsub')

>

>














Message #9 by "Mike" <koo9@h...> on Wed, 20 Jun 2001 09:11:31 -0600
if I discard the saved date, the report will try to connect to the database

and retrive the data set, but I don't have any code in my app to connect to

the databaes for the report, you also have this piece of code below,



cryReport.Connect = "DSN=dsnname;UID = your_userid;PWD = your_password;DSQ 

database_name"



I wonder how you connect to the DB ( I work with oracle as well), and

retrive the new report data set. complete code will be nice. thanks.







>

> To refresh the data just use the DiscardSavedData property of the Crystal

> Report Control :

>

>   cryReport.DiscardSavedData = True

>

> and if you're still interested in connecting to a Server - here's the code

> I use to connect to an Oracle DB:

>

>

>   cryReport.Connect = "DSN=dsnname;UID = your_userid;PWD 

> your_password;DSQ = database_name"

>

>

> -  Angelo

>

Message #10 by Angelo_PARDINAS@e... on Thu, 21 Jun 2001 09:11:12 +0800
OK .. here's the code that I use to connect to an Oracle DB. BTW, I used

Crystal Report ver. 7 and Oracle 7 DB.



  cryReport.ReportFileName = strReportName



  ' The next line is what I use to connect to the Oracle DB.

' The DSN value is the Oracle service that you want to connect to.

' UID is the user ID you want to use, PWD is the password, DSQ is the DB

you want to connect to.

  cryReport.Connect = "DSN=OracleService;UID = UserID;PWD = Password;DSQ 

DBName"



 ' The next line will discard any saved data. Also in the CR Designer,

there's an option 'Save Data With Report' - to be safe I       'remove the

check mark next to it.

  cryReport.DiscardSavedData = True



  cryReport.Destination = crptToWindow

  cryReport.WindowState = crptMaximized

  If strFilter <> "" Then cryReport.SelectionFormula = strFilter ' this is

where I place any additional 'Record Selection Formula'

  intError = cryReport.PrintReport

  If intError <> 0 Then

      ' Display error messages here.

  End If







- Angelo









                                                                                              

                    koo9@h...                                                             

                    com                  To:     crystal_reports@p... @ SMTP          

                                         cc:                                                  

                    20/06/2001           Subject:     [crystal_reports] RE: crystal report in 

                    11:04 PM             VB .                                                 

                    Please                                                                    

                    respond to                                                                

                    crystal_repor                                                             

                    ts                                                                        

                                                                                              

                                                                                              







if I discard the saved date, the report will try to connect to the database

and retrive the data set, but I don't have any code in my app to connect to

the databaes for the report, you also have this piece of code below,



cryReport.Connect = "DSN=dsnname;UID = your_userid;PWD = your_password;DSQ 

database_name"



I wonder how you connect to the DB ( I work with oracle as well), and

retrive the new report data set. complete code will be nice. thanks.







>

> To refresh the data just use the DiscardSavedData property of the Crystal

> Report Control :

>

>   cryReport.DiscardSavedData = True

>

> and if you're still interested in connecting to a Server - here's the code

> I use to connect to an Oracle DB:

>

>

>   cryReport.Connect = "DSN=dsnname;UID = your_userid;PWD 

> your_password;DSQ = database_name"

>

>

> -  Angelo



Message #11 by "fred ahsmann" <fred.ahsmann@v...> on Thu, 21 Jun 2001 09:02:02 +0200
What you should do is to set the logon info on each table within the

report:





    Dim crApp As New CRAXDRT.Application

    Dim crTable As CRAXDRT.DatabaseTable

    Set myReport =3D crApp.OpenReport("<reportFileRef.rpt>")

    For Each crTable In myReport.Database.Tables

        crTable.SetLogOnInfo "<ODBC Datasource name>", , "<DB-user>",

"<DB-password>"    Next

    Set crApp =3D Nothing

    Set crTable =3D Nothing







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

From: Mike [mailto:koo9@h...]

Sent: Wednesday, June 20, 2001 5:12 PM

To: crystal_reports

Subject: [crystal_reports] RE: crystal report in VB .





if I discard the saved date, the report will try to connect to the

database

and retrive the data set, but I don't have any code in my app to connect

to

the databaes for the report, you also have this piece of code below,



cryReport.Connect =3D "DSN=3Ddsnname;UID =3D your_userid;PWD =3D

your_password;DSQ =3D

database_name"



I wonder how you connect to the DB ( I work with oracle as well), and

retrive the new report data set. complete code will be nice. thanks.







>

> To refresh the data just use the DiscardSavedData property of the

Crystal

> Report Control :

>

>   cryReport.DiscardSavedData =3D True

>

> and if you're still interested in connecting to a Server - here's the

code

> I use to connect to an Oracle DB:

>

>

>   cryReport.Connect =3D "DSN=3Ddsnname;UID =3D your_userid;PWD =3D

> your_password;DSQ =3D database_name"

>

>

> -  Angelo



Message #12 by "Mike" <koo9@h...> on Thu, 21 Jun 2001 08:06:23 -0600
what's the control or type library do I include to declare

CRAXDRT.Application?







What you should do is to set the logon info on each table within the

report:





    Dim crApp As New CRAXDRT.Application

    Dim crTable As CRAXDRT.DatabaseTable

    Set myReport = crApp.OpenReport("<reportFileRef.rpt>")

    For Each crTable In myReport.Database.Tables

        crTable.SetLogOnInfo "<ODBC Datasource name>", , "<DB-user>",

"<DB-password>"    Next

    Set crApp = Nothing

    Set crTable = Nothing







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

From: Mike [mailto:koo9@h...]

Sent: Wednesday, June 20, 2001 5:12 PM

To: crystal_reports

Subject: [crystal_reports] RE: crystal report in VB .





if I discard the saved date, the report will try to connect to the

database

and retrive the data set, but I don't have any code in my app to connect

to

the databaes for the report, you also have this piece of code below,



cryReport.Connect = "DSN=dsnname;UID = your_userid;PWD 

your_password;DSQ 

database_name"



I wonder how you connect to the DB ( I work with oracle as well), and

retrive the new report data set. complete code will be nice. thanks.







>

> To refresh the data just use the DiscardSavedData property of the

Crystal

> Report Control :

>

>   cryReport.DiscardSavedData = True

>

> and if you're still interested in connecting to a Server - here's the

code

> I use to connect to an Oracle DB:

>

>

>   cryReport.Connect = "DSN=dsnname;UID = your_userid;PWD 

> your_password;DSQ = database_name"

>

>

> -  Angelo



Message #13 by "fred ahsmann" <fred.ahsmann@v...> on Thu, 21 Jun 2001 16:04:06 +0200
You should reference to

Crystal Report ActiveX Designer Run Time Library - Craxdrt.dll





-----------------------

what's the control or type library do I include to declare

CRAXDRT.Application?







What you should do is to set the logon info on each table within the

report:





    Dim crApp As New CRAXDRT.Application

    Dim crTable As CRAXDRT.DatabaseTable

    Set myReport =3D crApp.OpenReport("<reportFileRef.rpt>")

    For Each crTable In myReport.Database.Tables

        crTable.SetLogOnInfo "<ODBC Datasource name>", , "<DB-user>",

"<DB-password>"    Next

    Set crApp =3D Nothing

    Set crTable =3D Nothing







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

From: Mike [mailto:koo9@h...]

Sent: Wednesday, June 20, 2001 5:12 PM

To: crystal_reports

Subject: [crystal_reports] RE: crystal report in VB .





if I discard the saved date, the report will try to connect to the

database

and retrive the data set, but I don't have any code in my app to connect

to

the databaes for the report, you also have this piece of code below,



cryReport.Connect =3D "DSN=3Ddsnname;UID =3D your_userid;PWD =3D

your_password;DSQ =3D

database_name"



I wonder how you connect to the DB ( I work with oracle as well), and

retrive the new report data set. complete code will be nice. thanks.







>

> To refresh the data just use the DiscardSavedData property of the

Crystal

> Report Control :

>

>   cryReport.DiscardSavedData =3D True

>

> and if you're still interested in connecting to a Server - here's the

code

> I use to connect to an Oracle DB:

>

>

>   cryReport.Connect =3D "DSN=3Ddsnname;UID =3D your_userid;PWD =3D

> your_password;DSQ =3D database_name"

>

>

> -  Angelo



Message #14 by "Mike" <koo9@h...> on Thu, 21 Jun 2001 08:32:10 -0600
ok, here is the problem i have when I running your code:

1. the report just flash and gone, it's like it close by itself.

2. DSN = OracleService? it's ODBC, the Data Source Name in ODBC

   is astOracle, but service name is oranw81a, I put astOracle for DSN, it

seems

   to connect to Oracle without error( I don't think it will report any

error even I just make up a DSN, don't know why)



3. you use cryReport.printreport, for problem 1, i try to use

cryReport.action = 1, it give me error "Cann't open SQL server"

    any idea?







> OK .. here's the code that I use to connect to an Oracle DB. BTW, I used

> Crystal Report ver. 7 and Oracle 7 DB.

>

>   cryReport.ReportFileName = strReportName

>

>   ' The next line is what I use to connect to the Oracle DB.

> ' The DSN value is the Oracle service that you want to connect to.

> ' UID is the user ID you want to use, PWD is the password, DSQ is the DB

> you want to connect to.

>   cryReport.Connect = "DSN=OracleService;UID = UserID;PWD = Password;DSQ 

> DBName"

>

>  ' The next line will discard any saved data. Also in the CR Designer,

> there's an option 'Save Data With Report' - to be safe I       'remove the

> check mark next to it.

>   cryReport.DiscardSavedData = True

>

>   cryReport.Destination = crptToWindow

>   cryReport.WindowState = crptMaximized

>   If strFilter <> "" Then cryReport.SelectionFormula = strFilter ' this is

> where I place any additional 'Record Selection Formula'

>   intError = cryReport.PrintReport

>   If intError <> 0 Then

>       ' Display error messages here.

>   End If

>

>

>

> - Angelo

>

>

>

>

>

>                     koo9@h...

>                     com                  To:

crystal_reports@p... @ SMTP

>                                          cc:

>                     20/06/2001           Subject:     [crystal_reports]

RE: crystal report in

>                     11:04 PM             VB .

>                     Please

>                     respond to

>                     crystal_repor

>                     ts

>

>

>

>

>

> if I discard the saved date, the report will try to connect to the

database

> and retrive the data set, but I don't have any code in my app to connect

to

> the databaes for the report, you also have this piece of code below,

>

> cryReport.Connect = "DSN=dsnname;UID = your_userid;PWD = your_password;DSQ



> database_name"

>

> I wonder how you connect to the DB ( I work with oracle as well), and

> retrive the new report data set. complete code will be nice. thanks.

>

>

>

> >

> > To refresh the data just use the DiscardSavedData property of the

Crystal

> > Report Control :

> >

> >   cryReport.DiscardSavedData = True

> >

> > and if you're still interested in connecting to a Server - here's the

code

> > I use to connect to an Oracle DB:

> >

> >

> >   cryReport.Connect = "DSN=dsnname;UID = your_userid;PWD 

> > your_password;DSQ = database_name"

> >

> >

> > -  Angelo

>

>




$subst('Email.Unsub')

>

>

Message #15 by "Mike" <koo9@h...> on Thu, 21 Jun 2001 13:56:03 -0600
hi, Angelo

ok. I finally got it kind of working.because I misunderstand the DSQ name, I

thought I should put in the real database name in oracle server.



but now I have another problem, since some of my report have data from

multiple tables, that mean I have multiple databases in my "Set Location" in

the Crystal report. how can I connect to the databases(tables) in the

cryReport.connect  statement, because I don't want to create a big VIEW in

the oracle server that inclues all the tables.



any idea?





> OK .. here's the code that I use to connect to an Oracle DB. BTW, I used

> Crystal Report ver. 7 and Oracle 7 DB.

>

>   cryReport.ReportFileName = strReportName

>

>   ' The next line is what I use to connect to the Oracle DB.

> ' The DSN value is the Oracle service that you want to connect to.

> ' UID is the user ID you want to use, PWD is the password, DSQ is the DB

> you want to connect to.

>   cryReport.Connect = "DSN=OracleService;UID = UserID;PWD = Password;DSQ 

> DBName"

>

>  ' The next line will discard any saved data. Also in the CR Designer,

> there's an option 'Save Data With Report' - to be safe I       'remove the

> check mark next to it.

>   cryReport.DiscardSavedData = True

>

>   cryReport.Destination = crptToWindow

>   cryReport.WindowState = crptMaximized

>   If strFilter <> "" Then cryReport.SelectionFormula = strFilter ' this is

> where I place any additional 'Record Selection Formula'

>   intError = cryReport.PrintReport

>   If intError <> 0 Then

>       ' Display error messages here.

>   End If

>

>

>

> - Angelo

>

>

>

>

>

>                     koo9@h...

>                     com                  To:

crystal_reports@p... @ SMTP

>                                          cc:

>                     20/06/2001           Subject:     [crystal_reports]

RE: crystal report in

>                     11:04 PM             VB .

>                     Please

>                     respond to

>                     crystal_repor

>                     ts

>

>

>

>

>

> if I discard the saved date, the report will try to connect to the

database

> and retrive the data set, but I don't have any code in my app to connect

to

> the databaes for the report, you also have this piece of code below,

>

> cryReport.Connect = "DSN=dsnname;UID = your_userid;PWD = your_password;DSQ



> database_name"

>

> I wonder how you connect to the DB ( I work with oracle as well), and

> retrive the new report data set. complete code will be nice. thanks.

>

>

>

> >

> > To refresh the data just use the DiscardSavedData property of the

Crystal

> > Report Control :

> >

> >   cryReport.DiscardSavedData = True

> >

> > and if you're still interested in connecting to a Server - here's the

code

> > I use to connect to an Oracle DB:

> >

> >

> >   cryReport.Connect = "DSN=dsnname;UID = your_userid;PWD 

> > your_password;DSQ = database_name"

> >

> >

> > -  Angelo

>



Message #16 by Angelo_PARDINAS@e... on Fri, 22 Jun 2001 09:51:16 +0800
  Hmmmmm, here in our office, the value I placed in the DSQ name contains

all the tables our system uses. I don't know if this is the "view" that you

were referring to. All the while I thought that this (DSQ) was a database

name containing several tables.

   Anyway, try repeating the "connect" statements for each "tables" that

you need in your report ( I haven't tried this so I don't know if this will

work).





- Angelo









                                                                                              

                    "Mike"                                                                    

                    <koo9@h...        To:     "crystal_reports"                            

                    .com>                <crystal_reports@p...>                       

                                         cc:                                                  

                    22/06/2001           Subject:     [crystal_reports] RE: crystal report in 

                    03:56 AM             VB .                                                 

                    Please                                                                    

                    respond to                                                                

                    "crystal_repo                                                             

                    rts"                                                                      

                                                                                              

                                                                                              









hi, Angelo

ok. I finally got it kind of working.because I misunderstand the DSQ name,

I

thought I should put in the real database name in oracle server.



but now I have another problem, since some of my report have data from

multiple tables, that mean I have multiple databases in my "Set Location"

in

the Crystal report. how can I connect to the databases(tables) in the

cryReport.connect  statement, because I don't want to create a big VIEW in

the oracle server that inclues all the tables.



any idea?





> OK .. here's the code that I use to connect to an Oracle DB. BTW, I used

> Crystal Report ver. 7 and Oracle 7 DB.

>

>   cryReport.ReportFileName = strReportName

>

>   ' The next line is what I use to connect to the Oracle DB.

> ' The DSN value is the Oracle service that you want to connect to.

> ' UID is the user ID you want to use, PWD is the password, DSQ is the DB

> you want to connect to.

>   cryReport.Connect = "DSN=OracleService;UID = UserID;PWD = Password;DSQ



> DBName"

>

>  ' The next line will discard any saved data. Also in the CR Designer,

> there's an option 'Save Data With Report' - to be safe I       'remove

the

> check mark next to it.

>   cryReport.DiscardSavedData = True

>

>   cryReport.Destination = crptToWindow

>   cryReport.WindowState = crptMaximized

>   If strFilter <> "" Then cryReport.SelectionFormula = strFilter ' this

is

> where I place any additional 'Record Selection Formula'

>   intError = cryReport.PrintReport

>   If intError <> 0 Then

>       ' Display error messages here.

>   End If

>

>

>

> - Angelo

>

>

>

>

>

>                     koo9@h...

>                     com                  To:

crystal_reports@p... @ SMTP

>                                          cc:

>                     20/06/2001           Subject:     [crystal_reports]

RE: crystal report in

>                     11:04 PM             VB .

>                     Please

>                     respond to

>                     crystal_repor

>                     ts

>

>

>

>

>

> if I discard the saved date, the report will try to connect to the

database

> and retrive the data set, but I don't have any code in my app to connect

to

> the databaes for the report, you also have this piece of code below,

>

> cryReport.Connect = "DSN=dsnname;UID = your_userid;PWD 

your_password;DSQ



> database_name"

>

> I wonder how you connect to the DB ( I work with oracle as well), and

> retrive the new report data set. complete code will be nice. thanks.

>

  Return to Index