p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: Report Database Path


Message #1 by "Rick Dunmire" <dunnie@p...> on Wed, 5 Feb 2003 22:30:55
Hello
I am using a crystal report viewer in VB and need to code the database 
path to it. Everytime the database gets moved I have to delete the 
cryatslreport designer and start a new one pointing to the crystal report 
that I built from crystal report.If I remove the crystal report the 
designer still finds the database so somewhere the database path is 
getting set at that time. Does this make any sense?
How is this done?
Thanks
Rick
Message #2 by "Enzo Zaragoza" <enzaux@g...> on Thu, 6 Feb 2003 08:57:00 +0800
	I dont know if this may be of help.  But before that was my problem too.  But with the help of this forum
I ended doing external report file instead of designer.  Below is the code I use so that there would be no
problem no matter where the database would be.

~~~~~
With CrystalReport1
              .DataFiles(0) = App.Path & "\Databases\MyDB.mdb"
              .ReportFileName = App.Path & "\Reports\rptBalances.rpt"
              .UserName = "Admin"
              .Password = "letmein"
              .WindowState = crptMaximized
              .Formulas(0) = "SubHeading='Period of " & Format(FromDate, "mmm dd yyyy") & _
                              " - " & Format(ToDate, "mmm dd yyyy") & "'"
              .SelectionFormula = "{qryPaymentsNBalances.DatePosted} >= #" & FromDate & "# AND
{qryPaymentsNBalances.DatePosted} <
#" & _
                                  ToDate & "#"
              .ReportTitle = "Bills Paid"
              .Action = 1
End With
~~~~~~~~~~

enzo c",)
o!O TWW Business Solutions, Inc.
Email : twwbsi@y...
Cel No: (63) 9205426540


-----Original Message-----
From: Rick Dunmire [mailto:dunnie@p...]
Sent: Wednesday, February 05, 2003 10:31 PM
To: crystal_reports
Subject: [crystal_reports] Report Database Path


Hello
I am using a crystal report viewer in VB and need to code the database
path to it. Everytime the database gets moved I have to delete the
cryatslreport designer and start a new one pointing to the crystal report
that I built from crystal report.If I remove the crystal report the
designer still finds the database so somewhere the database path is
getting set at that time. Does this make any sense?
How is this done?
Thanks
Rick



Message #3 by "Rick Dunmire" <dunnie@p...> on Thu, 6 Feb 2003 11:39:43 -0500
Hello and thanks for responding Enzo
When I can't seem to get those properties from CrystalReport1.
I also tried to get them from my CrystalViewer with no luck.
Am I doing something wrong?
Thanks in advance
Rick
----- Original Message -----
From: "Enzo Zaragoza" <enzaux@g...>
To: "crystal_reports" <crystal_reports@p...>
Sent: Wednesday, February 05, 2003 7:57 PM
Subject: [crystal_reports] RE: Report Database Path


>
> I dont know if this may be of help.  But before that was my problem too.
But with the help of this forum
> I ended doing external report file instead of designer.  Below is the code
I use so that there would be no
> problem no matter where the database would be.
>
> ~~~~~
> With CrystalReport1
>               .DataFiles(0) = App.Path & "\Databases\MyDB.mdb"
>               .ReportFileName = App.Path & "\Reports\rptBalances.rpt"
>               .UserName = "Admin"
>               .Password = "letmein"
>               .WindowState = crptMaximized
>               .Formulas(0) = "SubHeading='Period of " & Format(FromDate,
"mmm dd yyyy") & _
>                               " - " & Format(ToDate, "mmm dd yyyy") & "'"
>               .SelectionFormula = "{qryPaymentsNBalances.DatePosted} >= #"
& FromDate & "# AND {qryPaymentsNBalances.DatePosted} <
> #" & _
>                                   ToDate & "#"
>               .ReportTitle = "Bills Paid"
>               .Action = 1
> End With
> ~~~~~~~~~~
>
> enzo c",)
> o!O TWW Business Solutions, Inc.
> Email : twwbsi@y...
> Cel No: (63) 9205426540
>
>
> -----Original Message-----
> From: Rick Dunmire [mailto:dunnie@p...]
> Sent: Wednesday, February 05, 2003 10:31 PM
> To: crystal_reports
> Subject: [crystal_reports] Report Database Path
>
>
> Hello
> I am using a crystal report viewer in VB and need to code the database
> path to it. Everytime the database gets moved I have to delete the
> cryatslreport designer and start a new one pointing to the crystal report
> that I built from crystal report.If I remove the crystal report the
> designer still finds the database so somewhere the database path is
> getting set at that time. Does this make any sense?
> How is this done?
> Thanks
> Rick
>
>
>
>
>
>


Message #4 by "Enzo Zaragoza" <enzaux@g...> on Fri, 7 Feb 2003 09:10:55 +0800

	Ooops sorry i forgot to say to include in your references Crystal Report Viewer Control :D
and then you add the control to your form.  "CrystalReport1" is a crystal report viewer control.


enzo c",)



Hello and thanks for responding Enzo
When I can't seem to get those properties from CrystalReport1.
I also tried to get them from my CrystalViewer with no luck.
Am I doing something wrong?
Thanks in advance
Rick
----- Original Message -----
From: "Enzo Zaragoza" <enzaux@g...>
To: "crystal_reports" <crystal_reports@p...>
Sent: Wednesday, February 05, 2003 7:57 PM
Subject: [crystal_reports] RE: Report Database Path


>
> I dont know if this may be of help.  But before that was my problem too.
But with the help of this forum
> I ended doing external report file instead of designer.  Below is the code
I use so that there would be no
> problem no matter where the database would be.
>
> ~~~~~
> With CrystalReport1
>               .DataFiles(0) = App.Path & "\Databases\MyDB.mdb"
>               .ReportFileName = App.Path & "\Reports\rptBalances.rpt"
>               .UserName = "Admin"
>               .Password = "letmein"
>               .WindowState = crptMaximized
>               .Formulas(0) = "SubHeading='Period of " & Format(FromDate,
"mmm dd yyyy") & _
>                               " - " & Format(ToDate, "mmm dd yyyy") & "'"
>               .SelectionFormula = "{qryPaymentsNBalances.DatePosted} >= #"
& FromDate & "# AND {qryPaymentsNBalances.DatePosted} <
> #" & _
>                                   ToDate & "#"
>               .ReportTitle = "Bills Paid"
>               .Action = 1
> End With
> ~~~~~~~~~~
>
> enzo c",)
> o!O TWW Business Solutions, Inc.
> Email : twwbsi@y...
> Cel No: (63) 9205426540
>
>
> -----Original Message-----
> From: Rick Dunmire [mailto:dunnie@p...]
> Sent: Wednesday, February 05, 2003 10:31 PM
> To: crystal_reports
> Subject: [crystal_reports] Report Database Path
>
>
> Hello
> I am using a crystal report viewer in VB and need to code the database
> path to it. Everytime the database gets moved I have to delete the
> cryatslreport designer and start a new one pointing to the crystal report
> that I built from crystal report.If I remove the crystal report the
> designer still finds the database so somewhere the database path is
> getting set at that time. Does this make any sense?
> How is this done?
> Thanks
> Rick
>
>
>
>
>
>






Message #5 by "Rick Dunmire" <dunnie@p...> on Fri, 7 Feb 2003 08:49:59 -0500
That fixed it for me
Thanks Enzo
----- Original Message -----
From: "Enzo Zaragoza" <enzaux@g...>
To: "crystal_reports" <crystal_reports@p...>
Sent: Thursday, February 06, 2003 8:10 PM
Subject: [crystal_reports] RE: Report Database Path


>
>
> Ooops sorry i forgot to say to include in your references Crystal Report
Viewer Control :D
> and then you add the control to your form.  "CrystalReport1" is a crystal
report viewer control.
>
>
> enzo c",)
>
>
>
> Hello and thanks for responding Enzo
> When I can't seem to get those properties from CrystalReport1.
> I also tried to get them from my CrystalViewer with no luck.
> Am I doing something wrong?
> Thanks in advance
> Rick
> ----- Original Message -----
> From: "Enzo Zaragoza" <enzaux@g...>
> To: "crystal_reports" <crystal_reports@p...>
> Sent: Wednesday, February 05, 2003 7:57 PM
> Subject: [crystal_reports] RE: Report Database Path
>
>
> >
> > I dont know if this may be of help.  But before that was my problem too.
> But with the help of this forum
> > I ended doing external report file instead of designer.  Below is the
code
> I use so that there would be no
> > problem no matter where the database would be.
> >
> > ~~~~~
> > With CrystalReport1
> >               .DataFiles(0) = App.Path & "\Databases\MyDB.mdb"
> >               .ReportFileName = App.Path & "\Reports\rptBalances.rpt"
> >               .UserName = "Admin"
> >               .Password = "letmein"
> >               .WindowState = crptMaximized
> >               .Formulas(0) = "SubHeading='Period of " & Format(FromDate,
> "mmm dd yyyy") & _
> >                               " - " & Format(ToDate, "mmm dd yyyy") &
"'"
> >               .SelectionFormula = "{qryPaymentsNBalances.DatePosted} >
#"
> & FromDate & "# AND {qryPaymentsNBalances.DatePosted} <
> > #" & _
> >                                   ToDate & "#"
> >               .ReportTitle = "Bills Paid"
> >               .Action = 1
> > End With
> > ~~~~~~~~~~
> >
> > enzo c",)
> > o!O TWW Business Solutions, Inc.
> > Email : twwbsi@y...
> > Cel No: (63) 9205426540
> >
> >
> > -----Original Message-----
> > From: Rick Dunmire [mailto:dunnie@p...]
> > Sent: Wednesday, February 05, 2003 10:31 PM
> > To: crystal_reports
> > Subject: [crystal_reports] Report Database Path
> >
> >
> > Hello
> > I am using a crystal report viewer in VB and need to code the database
> > path to it. Everytime the database gets moved I have to delete the
> > cryatslreport designer and start a new one pointing to the crystal
report
> > that I built from crystal report.If I remove the crystal report the
> > designer still finds the database so somewhere the database path is
> > getting set at that time. Does this make any sense?
> > How is this done?
> > Thanks
> > Rick
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>
>
>
>



  Return to Index