p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: Generating Report on Recordset


Message #1 by "Upendra Jahagirdar" <upenonline@y...> on Fri, 8 Nov 2002 05:32:13
hi,
  i am using VB 6.0 & Cryastal report 8.0
i have a recordset open in vb
can anybody tell me how to generate report on Recordset in VB
thanks in advance
Message #2 by "Enzo Zaragoza" <enzaux@g...> on Fri, 8 Nov 2002 13:52:53 +0800
	I guess Uprenda no one's answering here even I have a query but no one answers wahehehehe.  If
I found out the answer I'll tell you.  I'm figuring it out myself.  Right now I'm looking at the
samples on the Seagate folder.  There are VB samples there.

Enzo

-----Original Message-----
From: Upendra Jahagirdar [mailto:upenonline@y...]
Sent: Friday, November 08, 2002 5:32 AM
To: crystal_reports
Subject: [crystal_reports] Generating Report on Recordset


hi,
  i am using VB 6.0 & Cryastal report 8.0
i have a recordset open in vb
can anybody tell me how to generate report on Recordset in VB
thanks in advance



Message #3 by Parik****.Basu@c... on Fri, 08 Nov 2002 11:58:38 +0530
Hi Enzo & Upendra,
U can pass the values of the recordset as parameters to the crystal report.
That will solve the problem.
Parik****.

> -----Original Message-----
> From:	Enzo Zaragoza [SMTP:enzaux@g...]
> Sent:	Friday, November 08, 2002 11:23 AM
> To:	crystal_reports
> Subject:	[crystal_reports] RE: Generating Report on Recordset
> 
> 
> 	I guess Uprenda no one's answering here even I have a query but no
> one answers wahehehehe.  If
> I found out the answer I'll tell you.  I'm figuring it out myself.  Right
> now I'm looking at the
> samples on the Seagate folder.  There are VB samples there.
> 
> Enzo
> 
> -----Original Message-----
> From: Upendra Jahagirdar [mailto:upenonline@y...]
> Sent: Friday, November 08, 2002 5:32 AM
> To: crystal_reports
> Subject: [crystal_reports] Generating Report on Recordset
> 
> 
> hi,
>   i am using VB 6.0 & Cryastal report 8.0
> i have a recordset open in vb
> can anybody tell me how to generate report on Recordset in VB
> thanks in advance
> 
> 
> 
> 
Message #4 by "Enzo Zaragoza" <enzaux@g...> on Fri, 8 Nov 2002 14:57:35 +0800
	I have a problem, because the database is on different folder on every machine so I cannot
set the dbase on the report, I have to do it on codes and then set there where the database is located.
any ideas?  I'm using MS Access as my back end dbase.

	And also I know that CR can change the paper size thru coding but what is the const number for
a userdefined size of paper?


Thanks,

Enzo


-----Original Message-----
From: Parik****.Basu@c...
[mailto:Parik****.Basu@c...]
Sent: Friday, November 08, 2002 2:29 PM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset


Hi Enzo & Upendra,
U can pass the values of the recordset as parameters to the crystal report.
That will solve the problem.
Parik****.

> -----Original Message-----
> From:	Enzo Zaragoza [SMTP:enzaux@g...]
> Sent:	Friday, November 08, 2002 11:23 AM
> To:	crystal_reports
> Subject:	[crystal_reports] RE: Generating Report on Recordset
> 
> 
> 	I guess Uprenda no one's answering here even I have a query but no
> one answers wahehehehe.  If
> I found out the answer I'll tell you.  I'm figuring it out myself.  Right
> now I'm looking at the
> samples on the Seagate folder.  There are VB samples there.
> 
> Enzo
> 
> -----Original Message-----
> From: Upendra Jahagirdar [mailto:upenonline@y...]
> Sent: Friday, November 08, 2002 5:32 AM
> To: crystal_reports
> Subject: [crystal_reports] Generating Report on Recordset
> 
> 
> hi,
>   i am using VB 6.0 & Cryastal report 8.0
> i have a recordset open in vb
> can anybody tell me how to generate report on Recordset in VB
> thanks in advance
> 
> 
> 
> 




Message #5 by Parik****.Basu@c... on Fri, 08 Nov 2002 13:06:18 +0530
Hi Enzo 
I think this is the code u need........
Try this out.....

Parik****

     Use CRVIEWER with this code
     Drag and drop a crviewer object on a form called FrmReport
........(change it as per ur requirement)
     In the  FrmReport  form the code should be :-
     Private Sub Form_Load()
     Me.CRViewername.ReportSource = FrmGenerateReport.Report
     Me.CRViewername.ViewReport
     End Sub
 


      Drag and drop a crystal report object on a form called
FrmGenerateReport  ........(change it as per ur requirement)
     In the  FrmGenerateReport  form this code should be :-
     Set Report = crxApplication.OpenReport("path\reportname.rpt")      
     Report.Database.Tables(1).SetLogOnInfo "path", "dbname.mdb", "userid",
"password"   
     Report.ParameterFields.Item(1).AddCurrentValue (value)
     Report.ParameterFields.Item(2).AddCurrentValue (value)
     Report.ParameterFields.Item(3).AddCurrentValue (value)
     Report.ParameterFields.Item(4).AddCurrentValue (value)
     FrmReport.Show

> -----Original Message-----
> From:	Enzo Zaragoza [SMTP:enzaux@g...]
> Sent:	Friday, November 08, 2002 12:28 PM
> To:	crystal_reports
> Subject:	[crystal_reports] RE: Generating Report on Recordset
> 
> 
> 	I have a problem, because the database is on different folder on
> every machine so I cannot
> set the dbase on the report, I have to do it on codes and then set there
> where the database is located.
> any ideas?  I'm using MS Access as my back end dbase.
> 
> 	And also I know that CR can change the paper size thru coding but
> what is the const number for
> a userdefined size of paper?
> 
> 
> Thanks,
> 
> Enzo
> 
> 
> -----Original Message-----
> From: Parik****.Basu@c...
> [mailto:Parik****.Basu@c...]
> Sent: Friday, November 08, 2002 2:29 PM
> To: crystal_reports
> Subject: [crystal_reports] RE: Generating Report on Recordset
> 
> 
> Hi Enzo & Upendra,
> U can pass the values of the recordset as parameters to the crystal
> report.
> That will solve the problem.
> Parik****.
> 
> > -----Original Message-----
> > From:	Enzo Zaragoza [SMTP:enzaux@g...]
> > Sent:	Friday, November 08, 2002 11:23 AM
> > To:	crystal_reports
> > Subject:	[crystal_reports] RE: Generating Report on Recordset
> > 
> > 
> > 	I guess Uprenda no one's answering here even I have a query but no
> > one answers wahehehehe.  If
> > I found out the answer I'll tell you.  I'm figuring it out myself.
> Right
> > now I'm looking at the
> > samples on the Seagate folder.  There are VB samples there.
> > 
> > Enzo
> > 
> > -----Original Message-----
> > From: Upendra Jahagirdar [mailto:upenonline@y...]
> > Sent: Friday, November 08, 2002 5:32 AM
> > To: crystal_reports
> > Subject: [crystal_reports] Generating Report on Recordset
> > 
> > 
> > hi,
> >   i am using VB 6.0 & Cryastal report 8.0
> > i have a recordset open in vb
> > can anybody tell me how to generate report on Recordset in VB
> > thanks in advance
> > 
> > 
> > 
> > 
> 
> 
> 
> 
> 
Message #6 by "Enzo Zaragoza" <enzaux@g...> on Fri, 8 Nov 2002 16:20:28 +0800
Parik****,

	Thanks!  by the way while I'm researching I have found out that I can set the recordsource of
the report thru codes.  I'm kinda confused on the samples provided seagate it does not make use
of external report file (*.rpt) and on ur example you do use so.  What way is better to use, to have
it added in the Designer of the Project or have it as an external file (*.rpt)

Thanks a lot,

Enzo :)

-----Original Message-----
From: Parik****.Basu@c...
[mailto:Parik****.Basu@c...]
Sent: Friday, November 08, 2002 3:36 PM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset


Hi Enzo 
I think this is the code u need........
Try this out.....

Parik****

     Use CRVIEWER with this code
     Drag and drop a crviewer object on a form called FrmReport
........(change it as per ur requirement)
     In the  FrmReport  form the code should be :-
     Private Sub Form_Load()
     Me.CRViewername.ReportSource = FrmGenerateReport.Report
     Me.CRViewername.ViewReport
     End Sub
 


      Drag and drop a crystal report object on a form called
FrmGenerateReport  ........(change it as per ur requirement)
     In the  FrmGenerateReport  form this code should be :-
     Set Report = crxApplication.OpenReport("path\reportname.rpt")      
     Report.Database.Tables(1).SetLogOnInfo "path", "dbname.mdb", "userid",
"password"   
     Report.ParameterFields.Item(1).AddCurrentValue (value)
     Report.ParameterFields.Item(2).AddCurrentValue (value)
     Report.ParameterFields.Item(3).AddCurrentValue (value)
     Report.ParameterFields.Item(4).AddCurrentValue (value)
     FrmReport.Show

> -----Original Message-----
> From:	Enzo Zaragoza [SMTP:enzaux@g...]
> Sent:	Friday, November 08, 2002 12:28 PM
> To:	crystal_reports
> Subject:	[crystal_reports] RE: Generating Report on Recordset
> 
> 
> 	I have a problem, because the database is on different folder on
> every machine so I cannot
> set the dbase on the report, I have to do it on codes and then set there
> where the database is located.
> any ideas?  I'm using MS Access as my back end dbase.
> 
> 	And also I know that CR can change the paper size thru coding but
> what is the const number for
> a userdefined size of paper?
> 
> 
> Thanks,
> 
> Enzo
> 
> 
> -----Original Message-----
> From: Parik****.Basu@c...
> [mailto:Parik****.Basu@c...]
> Sent: Friday, November 08, 2002 2:29 PM
> To: crystal_reports
> Subject: [crystal_reports] RE: Generating Report on Recordset
> 
> 
> Hi Enzo & Upendra,
> U can pass the values of the recordset as parameters to the crystal
> report.
> That will solve the problem.
> Parik****.
> 
> > -----Original Message-----
> > From:	Enzo Zaragoza [SMTP:enzaux@g...]
> > Sent:	Friday, November 08, 2002 11:23 AM
> > To:	crystal_reports
> > Subject:	[crystal_reports] RE: Generating Report on Recordset
> > 
> > 
> > 	I guess Uprenda no one's answering here even I have a query but no
> > one answers wahehehehe.  If
> > I found out the answer I'll tell you.  I'm figuring it out myself.
> Right
> > now I'm looking at the
> > samples on the Seagate folder.  There are VB samples there.
> > 
> > Enzo
> > 
> > -----Original Message-----
> > From: Upendra Jahagirdar [mailto:upenonline@y...]
> > Sent: Friday, November 08, 2002 5:32 AM
> > To: crystal_reports
> > Subject: [crystal_reports] Generating Report on Recordset
> > 
> > 
> > hi,
> >   i am using VB 6.0 & Cryastal report 8.0
> > i have a recordset open in vb
> > can anybody tell me how to generate report on Recordset in VB
> > thanks in advance
> > 
> > 
> > 
> > 
> 
> 
> 
> 
> 




Message #7 by Parik****.Basu@c... on Fri, 08 Nov 2002 13:59:12 +0530
U r most welcome Enzo,

It varies as per the end-user's requirement.
If u have nothing to change in the rintime
then u go for the external file and vice versa.
Bye

Cheers(:-))
Parik****

> -----Original Message-----
> From:	Enzo Zaragoza [SMTP:enzaux@g...]
> Sent:	Friday, November 08, 2002 1:50 PM
> To:	crystal_reports
> Subject:	[crystal_reports] RE: Generating Report on Recordset
> 
> Parik****,
> 
> 	Thanks!  by the way while I'm researching I have found out that I
> can set the recordsource of
> the report thru codes.  I'm kinda confused on the samples provided seagate
> it does not make use
> of external report file (*.rpt) and on ur example you do use so.  What way
> is better to use, to have
> it added in the Designer of the Project or have it as an external file
> (*.rpt)
> 
> Thanks a lot,
> 
> Enzo :)
> 
> -----Original Message-----
> From: Parik****.Basu@c...
> [mailto:Parik****.Basu@c...]
> Sent: Friday, November 08, 2002 3:36 PM
> To: crystal_reports
> Subject: [crystal_reports] RE: Generating Report on Recordset
> 
> 
> Hi Enzo 
> I think this is the code u need........
> Try this out.....
> 
> Parik****
> 
>      Use CRVIEWER with this code
>      Drag and drop a crviewer object on a form called FrmReport
> ........(change it as per ur requirement)
>      In the  FrmReport  form the code should be :-
>      Private Sub Form_Load()
>      Me.CRViewername.ReportSource = FrmGenerateReport.Report
>      Me.CRViewername.ViewReport
>      End Sub
>  
> 
> 
>       Drag and drop a crystal report object on a form called
> FrmGenerateReport  ........(change it as per ur requirement)
>      In the  FrmGenerateReport  form this code should be :-
>      Set Report = crxApplication.OpenReport("path\reportname.rpt")      
>      Report.Database.Tables(1).SetLogOnInfo "path", "dbname.mdb",
> "userid",
> "password"   
>      Report.ParameterFields.Item(1).AddCurrentValue (value)
>      Report.ParameterFields.Item(2).AddCurrentValue (value)
>      Report.ParameterFields.Item(3).AddCurrentValue (value)
>      Report.ParameterFields.Item(4).AddCurrentValue (value)
>      FrmReport.Show
> 
> > -----Original Message-----
> > From:	Enzo Zaragoza [SMTP:enzaux@g...]
> > Sent:	Friday, November 08, 2002 12:28 PM
> > To:	crystal_reports
> > Subject:	[crystal_reports] RE: Generating Report on Recordset
> > 
> > 
> > 	I have a problem, because the database is on different folder on
> > every machine so I cannot
> > set the dbase on the report, I have to do it on codes and then set there
> > where the database is located.
> > any ideas?  I'm using MS Access as my back end dbase.
> > 
> > 	And also I know that CR can change the paper size thru coding but
> > what is the const number for
> > a userdefined size of paper?
> > 
> > 
> > Thanks,
> > 
> > Enzo
> > 
> > 
> > -----Original Message-----
> > From: Parik****.Basu@c...
> > [mailto:Parik****.Basu@c...]
> > Sent: Friday, November 08, 2002 2:29 PM
> > To: crystal_reports
> > Subject: [crystal_reports] RE: Generating Report on Recordset
> > 
> > 
> > Hi Enzo & Upendra,
> > U can pass the values of the recordset as parameters to the crystal
> > report.
> > That will solve the problem.
> > Parik****.
> > 
> > > -----Original Message-----
> > > From:	Enzo Zaragoza [SMTP:enzaux@g...]
> > > Sent:	Friday, November 08, 2002 11:23 AM
> > > To:	crystal_reports
> > > Subject:	[crystal_reports] RE: Generating Report on Recordset
> > > 
> > > 
> > > 	I guess Uprenda no one's answering here even I have a query but no
> > > one answers wahehehehe.  If
> > > I found out the answer I'll tell you.  I'm figuring it out myself.
> > Right
> > > now I'm looking at the
> > > samples on the Seagate folder.  There are VB samples there.
> > > 
> > > Enzo
> > > 
> > > -----Original Message-----
> > > From: Upendra Jahagirdar [mailto:upenonline@y...]
> > > Sent: Friday, November 08, 2002 5:32 AM
> > > To: crystal_reports
> > > Subject: [crystal_reports] Generating Report on Recordset
> > > 
> > > 
> > > hi,
> > >   i am using VB 6.0 & Cryastal report 8.0
> > > i have a recordset open in vb
> > > can anybody tell me how to generate report on Recordset in VB
> > > thanks in advance
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> > 
> > 
> > 
> 
> 
> 
> 
> 
Message #8 by "Nicholas Trevatt" <nicholas@t...> on Sat, 9 Nov 2002 11:42:32 +1000
Enzo, I would always use an external report file because if changes need to
be made (formatting) you don't have to recompile and redeploy the VB
application.  Also, if you have many designer reports the .exe gets very big
and unusual errors start to creep in.

-----Original Message-----
From: Enzo Zaragoza [mailto:enzaux@g...]
Sent: Friday, November 08, 2002 6:20 PM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset


Parik****,

	Thanks!  by the way while I'm researching I have found out that I can set
the recordsource of
the report thru codes.  I'm kinda confused on the samples provided seagate
it does not make use
of external report file (*.rpt) and on ur example you do use so.  What way
is better to use, to have
it added in the Designer of the Project or have it as an external file
(*.rpt)

Thanks a lot,

Enzo :)

-----Original Message-----
From: Parik****.Basu@c...
[mailto:Parik****.Basu@c...]
Sent: Friday, November 08, 2002 3:36 PM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset


Hi Enzo
I think this is the code u need........
Try this out.....

Parik****

     Use CRVIEWER with this code
     Drag and drop a crviewer object on a form called FrmReport
........(change it as per ur requirement)
     In the  FrmReport  form the code should be :-
     Private Sub Form_Load()
     Me.CRViewername.ReportSource = FrmGenerateReport.Report
     Me.CRViewername.ViewReport
     End Sub



      Drag and drop a crystal report object on a form called
FrmGenerateReport  ........(change it as per ur requirement)
     In the  FrmGenerateReport  form this code should be :-
     Set Report = crxApplication.OpenReport("path\reportname.rpt")
     Report.Database.Tables(1).SetLogOnInfo "path", "dbname.mdb", "userid",
"password"
     Report.ParameterFields.Item(1).AddCurrentValue (value)
     Report.ParameterFields.Item(2).AddCurrentValue (value)
     Report.ParameterFields.Item(3).AddCurrentValue (value)
     Report.ParameterFields.Item(4).AddCurrentValue (value)
     FrmReport.Show

> -----Original Message-----
> From:	Enzo Zaragoza [SMTP:enzaux@g...]
> Sent:	Friday, November 08, 2002 12:28 PM
> To:	crystal_reports
> Subject:	[crystal_reports] RE: Generating Report on Recordset
>
>
> 	I have a problem, because the database is on different folder on
> every machine so I cannot
> set the dbase on the report, I have to do it on codes and then set there
> where the database is located.
> any ideas?  I'm using MS Access as my back end dbase.
>
> 	And also I know that CR can change the paper size thru coding but
> what is the const number for
> a userdefined size of paper?
>
>
> Thanks,
>
> Enzo
>
>
> -----Original Message-----
> From: Parik****.Basu@c...
> [mailto:Parik****.Basu@c...]
> Sent: Friday, November 08, 2002 2:29 PM
> To: crystal_reports
> Subject: [crystal_reports] RE: Generating Report on Recordset
>
>
> Hi Enzo & Upendra,
> U can pass the values of the recordset as parameters to the crystal
> report.
> That will solve the problem.
> Parik****.
>
> > -----Original Message-----
> > From:	Enzo Zaragoza [SMTP:enzaux@g...]
> > Sent:	Friday, November 08, 2002 11:23 AM
> > To:	crystal_reports
> > Subject:	[crystal_reports] RE: Generating Report on Recordset
> >
> >
> > 	I guess Uprenda no one's answering here even I have a query but no
> > one answers wahehehehe.  If
> > I found out the answer I'll tell you.  I'm figuring it out myself.
> Right
> > now I'm looking at the
> > samples on the Seagate folder.  There are VB samples there.
> >
> > Enzo
> >
> > -----Original Message-----
> > From: Upendra Jahagirdar [mailto:upenonline@y...]
> > Sent: Friday, November 08, 2002 5:32 AM
> > To: crystal_reports
> > Subject: [crystal_reports] Generating Report on Recordset
> >
> >
> > hi,
> >   i am using VB 6.0 & Cryastal report 8.0
> > i have a recordset open in vb
> > can anybody tell me how to generate report on Recordset in VB
> > thanks in advance
> >
> >
> >
> >
>
>
>
>
>








Message #9 by "Enzo Zaragoza" <enzaux@g...> on Sat, 9 Nov 2002 11:34:36 +0800
	Thanks for saying ur opinion, I guess you have a point there.  I think I'll go
to use an external report file.

Thanks,

Enzo

-----Original Message-----
From: Nicholas Trevatt [mailto:nicholas@t...]
Sent: Saturday, November 09, 2002 9:43 AM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset


Enzo, I would always use an external report file because if changes need to
be made (formatting) you don't have to recompile and redeploy the VB
application.  Also, if you have many designer reports the .exe gets very big
and unusual errors start to creep in.

-----Original Message-----
From: Enzo Zaragoza [mailto:enzaux@g...]
Sent: Friday, November 08, 2002 6:20 PM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset


Parik****,

	Thanks!  by the way while I'm researching I have found out that I can set
the recordsource of
the report thru codes.  I'm kinda confused on the samples provided seagate
it does not make use
of external report file (*.rpt) and on ur example you do use so.  What way
is better to use, to have
it added in the Designer of the Project or have it as an external file
(*.rpt)

Thanks a lot,

Enzo :)

-----Original Message-----
From: Parik****.Basu@c...
[mailto:Parik****.Basu@c...]
Sent: Friday, November 08, 2002 3:36 PM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset


Hi Enzo
I think this is the code u need........
Try this out.....

Parik****

     Use CRVIEWER with this code
     Drag and drop a crviewer object on a form called FrmReport
........(change it as per ur requirement)
     In the  FrmReport  form the code should be :-
     Private Sub Form_Load()
     Me.CRViewername.ReportSource = FrmGenerateReport.Report
     Me.CRViewername.ViewReport
     End Sub



      Drag and drop a crystal report object on a form called
FrmGenerateReport  ........(change it as per ur requirement)
     In the  FrmGenerateReport  form this code should be :-
     Set Report = crxApplication.OpenReport("path\reportname.rpt")
     Report.Database.Tables(1).SetLogOnInfo "path", "dbname.mdb", "userid",
"password"
     Report.ParameterFields.Item(1).AddCurrentValue (value)
     Report.ParameterFields.Item(2).AddCurrentValue (value)
     Report.ParameterFields.Item(3).AddCurrentValue (value)
     Report.ParameterFields.Item(4).AddCurrentValue (value)
     FrmReport.Show

> -----Original Message-----
> From:	Enzo Zaragoza [SMTP:enzaux@g...]
> Sent:	Friday, November 08, 2002 12:28 PM
> To:	crystal_reports
> Subject:	[crystal_reports] RE: Generating Report on Recordset
>
>
> 	I have a problem, because the database is on different folder on
> every machine so I cannot
> set the dbase on the report, I have to do it on codes and then set there
> where the database is located.
> any ideas?  I'm using MS Access as my back end dbase.
>
> 	And also I know that CR can change the paper size thru coding but
> what is the const number for
> a userdefined size of paper?
>
>
> Thanks,
>
> Enzo
>
>
> -----Original Message-----
> From: Parik****.Basu@c...
> [mailto:Parik****.Basu@c...]
> Sent: Friday, November 08, 2002 2:29 PM
> To: crystal_reports
> Subject: [crystal_reports] RE: Generating Report on Recordset
>
>
> Hi Enzo & Upendra,
> U can pass the values of the recordset as parameters to the crystal
> report.
> That will solve the problem.
> Parik****.
>
> > -----Original Message-----
> > From:	Enzo Zaragoza [SMTP:enzaux@g...]
> > Sent:	Friday, November 08, 2002 11:23 AM
> > To:	crystal_reports
> > Subject:	[crystal_reports] RE: Generating Report on Recordset
> >
> >
> > 	I guess Uprenda no one's answering here even I have a query but no
> > one answers wahehehehe.  If
> > I found out the answer I'll tell you.  I'm figuring it out myself.
> Right
> > now I'm looking at the
> > samples on the Seagate folder.  There are VB samples there.
> >
> > Enzo
> >
> > -----Original Message-----
> > From: Upendra Jahagirdar [mailto:upenonline@y...]
> > Sent: Friday, November 08, 2002 5:32 AM
> > To: crystal_reports
> > Subject: [crystal_reports] Generating Report on Recordset
> >
> >
> > hi,
> >   i am using VB 6.0 & Cryastal report 8.0
> > i have a recordset open in vb
> > can anybody tell me how to generate report on Recordset in VB
> > thanks in advance
> >
> >
> >
> >
>
>
>
>
>












Message #10 by "Enzo Zaragoza" <enzaux@g...> on Sat, 9 Nov 2002 12:50:35 +0800
But one thing waaaaaaa I can't load the external report file in the CRViewer pls help how would
I do that?  There is one sample I'v got but it uses Crystal Report Control instead.

Thanks,

Enzo

-----Original Message-----
From: Nicholas Trevatt [mailto:nicholas@t...]
Sent: Saturday, November 09, 2002 9:43 AM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset


Enzo, I would always use an external report file because if changes need to
be made (formatting) you don't have to recompile and redeploy the VB
application.  Also, if you have many designer reports the .exe gets very big
and unusual errors start to creep in.

-----Original Message-----
From: Enzo Zaragoza [mailto:enzaux@g...]
Sent: Friday, November 08, 2002 6:20 PM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset


Parik****,

	Thanks!  by the way while I'm researching I have found out that I can set
the recordsource of
the report thru codes.  I'm kinda confused on the samples provided seagate
it does not make use
of external report file (*.rpt) and on ur example you do use so.  What way
is better to use, to have
it added in the Designer of the Project or have it as an external file
(*.rpt)

Thanks a lot,

Enzo :)

-----Original Message-----
From: Parik****.Basu@c...
[mailto:Parik****.Basu@c...]
Sent: Friday, November 08, 2002 3:36 PM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset


Hi Enzo
I think this is the code u need........
Try this out.....

Parik****

     Use CRVIEWER with this code
     Drag and drop a crviewer object on a form called FrmReport
........(change it as per ur requirement)
     In the  FrmReport  form the code should be :-
     Private Sub Form_Load()
     Me.CRViewername.ReportSource = FrmGenerateReport.Report
     Me.CRViewername.ViewReport
     End Sub



      Drag and drop a crystal report object on a form called
FrmGenerateReport  ........(change it as per ur requirement)
     In the  FrmGenerateReport  form this code should be :-
     Set Report = crxApplication.OpenReport("path\reportname.rpt")
     Report.Database.Tables(1).SetLogOnInfo "path", "dbname.mdb", "userid",
"password"
     Report.ParameterFields.Item(1).AddCurrentValue (value)
     Report.ParameterFields.Item(2).AddCurrentValue (value)
     Report.ParameterFields.Item(3).AddCurrentValue (value)
     Report.ParameterFields.Item(4).AddCurrentValue (value)
     FrmReport.Show

> -----Original Message-----
> From:	Enzo Zaragoza [SMTP:enzaux@g...]
> Sent:	Friday, November 08, 2002 12:28 PM
> To:	crystal_reports
> Subject:	[crystal_reports] RE: Generating Report on Recordset
>
>
> 	I have a problem, because the database is on different folder on
> every machine so I cannot
> set the dbase on the report, I have to do it on codes and then set there
> where the database is located.
> any ideas?  I'm using MS Access as my back end dbase.
>
> 	And also I know that CR can change the paper size thru coding but
> what is the const number for
> a userdefined size of paper?
>
>
> Thanks,
>
> Enzo
>
>
> -----Original Message-----
> From: Parik****.Basu@c...
> [mailto:Parik****.Basu@c...]
> Sent: Friday, November 08, 2002 2:29 PM
> To: crystal_reports
> Subject: [crystal_reports] RE: Generating Report on Recordset
>
>
> Hi Enzo & Upendra,
> U can pass the values of the recordset as parameters to the crystal
> report.
> That will solve the problem.
> Parik****.
>
> > -----Original Message-----
> > From:	Enzo Zaragoza [SMTP:enzaux@g...]
> > Sent:	Friday, November 08, 2002 11:23 AM
> > To:	crystal_reports
> > Subject:	[crystal_reports] RE: Generating Report on Recordset
> >
> >
> > 	I guess Uprenda no one's answering here even I have a query but no
> > one answers wahehehehe.  If
> > I found out the answer I'll tell you.  I'm figuring it out myself.
> Right
> > now I'm looking at the
> > samples on the Seagate folder.  There are VB samples there.
> >
> > Enzo
> >
> > -----Original Message-----
> > From: Upendra Jahagirdar [mailto:upenonline@y...]
> > Sent: Friday, November 08, 2002 5:32 AM
> > To: crystal_reports
> > Subject: [crystal_reports] Generating Report on Recordset
> >
> >
> > hi,
> >   i am using VB 6.0 & Cryastal report 8.0
> > i have a recordset open in vb
> > can anybody tell me how to generate report on Recordset in VB
> > thanks in advance
> >
> >
> >
> >
>
>
>
>
>












Message #11 by "Enzo Zaragoza" <enzaux@g...> on Sat, 9 Nov 2002 13:03:30 +0800
	What object is crxApplication? do I need somethin to put on frmGenerateReport?

Thanks,

Enzo

-----Original Message-----
From: Parik****.Basu@c...
[mailto:Parik****.Basu@c...]
Sent: Friday, November 08, 2002 3:36 PM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset


Hi Enzo 
I think this is the code u need........
Try this out.....

Parik****

     Use CRVIEWER with this code
     Drag and drop a crviewer object on a form called FrmReport
........(change it as per ur requirement)
     In the  FrmReport  form the code should be :-
     Private Sub Form_Load()
     Me.CRViewername.ReportSource = FrmGenerateReport.Report
     Me.CRViewername.ViewReport
     End Sub
 


      Drag and drop a crystal report object on a form called
FrmGenerateReport  ........(change it as per ur requirement)
     In the  FrmGenerateReport  form this code should be :-
     Set Report = crxApplication.OpenReport("path\reportname.rpt")      
     Report.Database.Tables(1).SetLogOnInfo "path", "dbname.mdb", "userid",
"password"   
     Report.ParameterFields.Item(1).AddCurrentValue (value)
     Report.ParameterFields.Item(2).AddCurrentValue (value)
     Report.ParameterFields.Item(3).AddCurrentValue (value)
     Report.ParameterFields.Item(4).AddCurrentValue (value)
     FrmReport.Show

> -----Original Message-----
> From:	Enzo Zaragoza [SMTP:enzaux@g...]
> Sent:	Friday, November 08, 2002 12:28 PM
> To:	crystal_reports
> Subject:	[crystal_reports] RE: Generating Report on Recordset
> 
> 
> 	I have a problem, because the database is on different folder on
> every machine so I cannot
> set the dbase on the report, I have to do it on codes and then set there
> where the database is located.
> any ideas?  I'm using MS Access as my back end dbase.
> 
> 	And also I know that CR can change the paper size thru coding but
> what is the const number for
> a userdefined size of paper?
> 
> 
> Thanks,
> 
> Enzo
> 
> 
> -----Original Message-----
> From: Parik****.Basu@c...
> [mailto:Parik****.Basu@c...]
> Sent: Friday, November 08, 2002 2:29 PM
> To: crystal_reports
> Subject: [crystal_reports] RE: Generating Report on Recordset
> 
> 
> Hi Enzo & Upendra,
> U can pass the values of the recordset as parameters to the crystal
> report.
> That will solve the problem.
> Parik****.
> 
> > -----Original Message-----
> > From:	Enzo Zaragoza [SMTP:enzaux@g...]
> > Sent:	Friday, November 08, 2002 11:23 AM
> > To:	crystal_reports
> > Subject:	[crystal_reports] RE: Generating Report on Recordset
> > 
> > 
> > 	I guess Uprenda no one's answering here even I have a query but no
> > one answers wahehehehe.  If
> > I found out the answer I'll tell you.  I'm figuring it out myself.
> Right
> > now I'm looking at the
> > samples on the Seagate folder.  There are VB samples there.
> > 
> > Enzo
> > 
> > -----Original Message-----
> > From: Upendra Jahagirdar [mailto:upenonline@y...]
> > Sent: Friday, November 08, 2002 5:32 AM
> > To: crystal_reports
> > Subject: [crystal_reports] Generating Report on Recordset
> > 
> > 
> > hi,
> >   i am using VB 6.0 & Cryastal report 8.0
> > i have a recordset open in vb
> > can anybody tell me how to generate report on Recordset in VB
> > thanks in advance
> > 
> > 
> > 
> > 
> 
> 
> 
> 
> 




Message #12 by "Nicholas Trevatt" <nicholas@t...> on Sat, 9 Nov 2002 22:51:13 +1000
Enzo, crxApplication is a reference to the Crystal Reports application
object from within VB.  I can't remember which reference it is exactly but
it's one of the following(I think it's the first one):
Crystal Report 8 ActiveX Designer Run Time Library
Crystal Report 8 ActiveX Designer Design Time Library(Internal)

To load an external report into the Crystal ViewER use something like the
following code:

Dim rdAPP As CRAXDRT.Application
Dim rpt As CRAXDRT.Report
Dim strPath As String

strPath = "C:\ReportPath\MyReport.rpt"
Set rdAPP = New CRAXDRT.Application
Set rpt = rdAPP.OpenReport(strPath)
rpt.Database.Tables(1).SetLogOnInfo strDSN, strDB, strUser, strPwd
rpt.Database.Tables(1).Location = "Proc(ap_RPTBillOfMaterials;1)" 'For SQL
Server
rpt.DiscardSavedData

' -- SET PARAMETERS HERE IF NEEDED ----

' ---- Show Report ----
Load frmRptViewer
With frmRptViewer
	.CRViewer1.ReportSource = rpt
	.CRViewer1.ViewReport
      .WindowState = vbMaximized
      .Visible = True
End With

Hope this helps,
Nicholas Trevatt






-----Original Message-----
From: Enzo Zaragoza [mailto:enzaux@g...]
Sent: Saturday, November 09, 2002 3:04 PM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset



	What object is crxApplication? do I need somethin to put on
frmGenerateReport?

Thanks,

Enzo

-----Original Message-----
From: Parik****.Basu@c...
[mailto:Parik****.Basu@c...]
Sent: Friday, November 08, 2002 3:36 PM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset


Hi Enzo
I think this is the code u need........
Try this out.....

Parik****

     Use CRVIEWER with this code
     Drag and drop a crviewer object on a form called FrmReport
........(change it as per ur requirement)
     In the  FrmReport  form the code should be :-
     Private Sub Form_Load()
     Me.CRViewername.ReportSource = FrmGenerateReport.Report
     Me.CRViewername.ViewReport
     End Sub



      Drag and drop a crystal report object on a form called
FrmGenerateReport  ........(change it as per ur requirement)
     In the  FrmGenerateReport  form this code should be :-
     Set Report = crxApplication.OpenReport("path\reportname.rpt")
     Report.Database.Tables(1).SetLogOnInfo "path", "dbname.mdb", "userid",
"password"
     Report.ParameterFields.Item(1).AddCurrentValue (value)
     Report.ParameterFields.Item(2).AddCurrentValue (value)
     Report.ParameterFields.Item(3).AddCurrentValue (value)
     Report.ParameterFields.Item(4).AddCurrentValue (value)
     FrmReport.Show

> -----Original Message-----
> From:	Enzo Zaragoza [SMTP:enzaux@g...]
> Sent:	Friday, November 08, 2002 12:28 PM
> To:	crystal_reports
> Subject:	[crystal_reports] RE: Generating Report on Recordset
>
>
> 	I have a problem, because the database is on different folder on
> every machine so I cannot
> set the dbase on the report, I have to do it on codes and then set there
> where the database is located.
> any ideas?  I'm using MS Access as my back end dbase.
>
> 	And also I know that CR can change the paper size thru coding but
> what is the const number for
> a userdefined size of paper?
>
>
> Thanks,
>
> Enzo
>
>
> -----Original Message-----
> From: Parik****.Basu@c...
> [mailto:Parik****.Basu@c...]
> Sent: Friday, November 08, 2002 2:29 PM
> To: crystal_reports
> Subject: [crystal_reports] RE: Generating Report on Recordset
>
>
> Hi Enzo & Upendra,
> U can pass the values of the recordset as parameters to the crystal
> report.
> That will solve the problem.
> Parik****.
>
> > -----Original Message-----
> > From:	Enzo Zaragoza [SMTP:enzaux@g...]
> > Sent:	Friday, November 08, 2002 11:23 AM
> > To:	crystal_reports
> > Subject:	[crystal_reports] RE: Generating Report on Recordset
> >
> >
> > 	I guess Uprenda no one's answering here even I have a query but no
> > one answers wahehehehe.  If
> > I found out the answer I'll tell you.  I'm figuring it out myself.
> Right
> > now I'm looking at the
> > samples on the Seagate folder.  There are VB samples there.
> >
> > Enzo
> >
> > -----Original Message-----
> > From: Upendra Jahagirdar [mailto:upenonline@y...]
> > Sent: Friday, November 08, 2002 5:32 AM
> > To: crystal_reports
> > Subject: [crystal_reports] Generating Report on Recordset
> >
> >
> > hi,
> >   i am using VB 6.0 & Cryastal report 8.0
> > i have a recordset open in vb
> > can anybody tell me how to generate report on Recordset in VB
> > thanks in advance
> >
> >
> >
> >
>
>
>
>
>








Message #13 by "Enzo Zaragoza" <enzaux@g...> on Mon, 11 Nov 2002 10:54:37 +0800
	Thanks this is a lot more clearer. What does the Index (1) means?  I'll still research on
the code you and Parik**** provided, I'm not yet sure if I'll get my reports works the way I want
to :D  About the TTX file, yes I would love to see.  I have encountered that TTX file but I don't 
where, all I know it is somewhere along as I go to crystal report application.

	Thank you very much for persistingly helping me out on my first Crystal Report adventure :D

Thanks,

Enzo
PS
how bout those field formatting? any idea?



-----Original Message-----
From: Nicholas Trevatt [mailto:nicholas@t...]
Sent: Saturday, November 09, 2002 8:51 PM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset


Enzo, crxApplication is a reference to the Crystal Reports application
object from within VB.  I can't remember which reference it is exactly but
it's one of the following(I think it's the first one):
Crystal Report 8 ActiveX Designer Run Time Library
Crystal Report 8 ActiveX Designer Design Time Library(Internal)

To load an external report into the Crystal ViewER use something like the
following code:

Dim rdAPP As CRAXDRT.Application
Dim rpt As CRAXDRT.Report
Dim strPath As String

strPath = "C:\ReportPath\MyReport.rpt"
Set rdAPP = New CRAXDRT.Application
Set rpt = rdAPP.OpenReport(strPath)
rpt.Database.Tables(1).SetLogOnInfo strDSN, strDB, strUser, strPwd
rpt.Database.Tables(1).Location = "Proc(ap_RPTBillOfMaterials;1)" 'For SQL
Server
rpt.DiscardSavedData

' -- SET PARAMETERS HERE IF NEEDED ----

' ---- Show Report ----
Load frmRptViewer
With frmRptViewer
	.CRViewer1.ReportSource = rpt
	.CRViewer1.ViewReport
      .WindowState = vbMaximized
      .Visible = True
End With

Hope this helps,
Nicholas Trevatt






-----Original Message-----
From: Enzo Zaragoza [mailto:enzaux@g...]
Sent: Saturday, November 09, 2002 3:04 PM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset



	What object is crxApplication? do I need somethin to put on
frmGenerateReport?

Thanks,

Enzo

-----Original Message-----
From: Parik****.Basu@c...
[mailto:Parik****.Basu@c...]
Sent: Friday, November 08, 2002 3:36 PM
To: crystal_reports
Subject: [crystal_reports] RE: Generating Report on Recordset


Hi Enzo
I think this is the code u need........
Try this out.....

Parik****

     Use CRVIEWER with this code
     Drag and drop a crviewer object on a form called FrmReport
........(change it as per ur requirement)
     In the  FrmReport  form the code should be :-
     Private Sub Form_Load()
     Me.CRViewername.ReportSource = FrmGenerateReport.Report
     Me.CRViewername.ViewReport
     End Sub



      Drag and drop a crystal report object on a form called
FrmGenerateReport  ........(change it as per ur requirement)
     In the  FrmGenerateReport  form this code should be :-
     Set Report = crxApplication.OpenReport("path\reportname.rpt")
     Report.Database.Tables(1).SetLogOnInfo "path", "dbname.mdb", "userid",
"password"
     Report.ParameterFields.Item(1).AddCurrentValue (value)
     Report.ParameterFields.Item(2).AddCurrentValue (value)
     Report.ParameterFields.Item(3).AddCurrentValue (value)
     Report.ParameterFields.Item(4).AddCurrentValue (value)
     FrmReport.Show

> -----Original Message-----
> From:	Enzo Zaragoza [SMTP:enzaux@g...]
> Sent:	Friday, November 08, 2002 12:28 PM
> To:	crystal_reports
> Subject:	[crystal_reports] RE: Generating Report on Recordset
>
>
> 	I have a problem, because the database is on different folder on
> every machine so I cannot
> set the dbase on the report, I have to do it on codes and then set there
> where the database is located.
> any ideas?  I'm using MS Access as my back end dbase.
>
> 	And also I know that CR can change the paper size thru coding but
> what is the const number for
> a userdefined size of paper?
>
>
> Thanks,
>
> Enzo
>
>
> -----Original Message-----
> From: Parik****.Basu@c...
> [mailto:Parik****.Basu@c...]
> Sent: Friday, November 08, 2002 2:29 PM
> To: crystal_reports
> Subject: [crystal_reports] RE: Generating Report on Recordset
>
>
> Hi Enzo & Upendra,
> U can pass the values of the recordset as parameters to the crystal
> report.
> That will solve the problem.
> Parik****.
>
> > -----Original Message-----
> > From:	Enzo Zaragoza [SMTP:enzaux@g...]
> > Sent:	Friday, November 08, 2002 11:23 AM
> > To:	crystal_reports
> > Subject:	[crystal_reports] RE: Generating Report on Recordset
> >
> >
> > 	I guess Uprenda no one's answering here even I have a query but no
> > one answers wahehehehe.  If
> > I found out the answer I'll tell you.  I'm figuring it out myself.
> Right
> > now I'm looking at the
> > samples on the Seagate folder.  There are VB samples there.
> >
> > Enzo
> >
> > -----Original Message-----
> > From: Upendra Jahagirdar [mailto:upenonline@y...]
> > Sent: Friday, November 08, 2002 5:32 AM
> > To: crystal_reports
> > Subject: [crystal_reports] Generating Report on Recordset
> >
> >
> > hi,
> >   i am using VB 6.0 & Cryastal report 8.0
> > i have a recordset open in vb
> > can anybody tell me how to generate report on Recordset in VB
> > thanks in advance
> >
> >
> >
> >
>
>
>
>
>













  Return to Index