Groups > dBase > dBase reports > Re: Working with Crystal XI & ActiveX




Working with Crystal XI & ActiveX

Working with Crystal XI & ActiveX
Mon, 13 Aug 2007 10:55:36 -040
I'm having a small problem in writing a dBase routine to bring up via ActiveX a
report form generated in Crystal Reports XI.  

Background (bear with me as I explain):  My firm is using an insurance business
management system that was originally written way back when in a flavor of
dBase.  Current version that we're using is a mix of Visual FoxPro and .Net, but
to maintain compatibility, the databases themselves are still in dBase format,
thank goodness.  

Since starting here last January, one of my tasks has been to run reports
derived from these databases, bypassing the internal reporting system (those of
you who have figured out the app I'm indirectly referring too will understand
why!).  To date, there hasn't been a problem; even though we bought a copy of
dBase Plus 2.6.1, I'm still using Visual dBase 5.7 & Crystal Reports 3 that
came with it.  

(Why?  Because I'm still a "dot prompt" programmer at heart, and it
gets the job done, and yes, I know I have to get up to speed on using dBase Plus
properly, but getting the reports done has been a priority -- that's what they
hired me for, and who'd have thought I'd be making a living using dBase these
days?)

Now, the problem that has come up is that my boss wants me to somewhat automate
the monthly report running.  Should be no problem... set up a routine to run the
program, then trigger the report printout.  Right?  Well, I'd hoped to do that
with the full-blown Crystal Reports, currently version XI.  I have to re-do some
of the reports, no big deal.  But I should be able to trigger the reports using
ActiveX -- and I can't get it to work.  

Don't know if I've not installed something correctly, or have overlooked some
small configuration, but I can't seem to get it to work.  It might even be that
I can't do it during the 30 day trial but have to buy the full-blown package,
which we will do if I can figure this out.

So... does anyone have any suggestions of what to look for, or any sample code
that will give me a clue?

Thanks!

Post Reply
Re: Working with Crystal XI & ActiveX
Tue, 14 Aug 2007 00:52:46 -070
"Ron Notarius" <rjnotarius@hendersonbrothers.com> wrote in
message 
news:E54bBob3HHA.1836@news-server...
> I'm having a small problem in writing a dBase routine to bring up via 
> ActiveX a report form generated in Crystal Reports XI.

Don't know what you have tried but the first thing to do is to see if it 
will work the way it has and does in all previous versions.
You can find a class for automating some of the task involved from the 
Binaries group called "Rep32.cc"
Here are some samples of how to run it.  I will try to help you more once I 
have a better understanding of your difficulties.


*-   Simple Usage Example next 3 lines below:

*-   set procedure to rep32.cc addi
*-   form.pJob = new printAx(cReport)  // this is a style that fit my needs, 
it could be done a different way.
*-   beginprinting(cReport, PathToDBFTables) // pass more only if needed.


*-   Usage Example next 4 lines below:

*-   set procedure to rep32.cc addi
*-   form.pJob = new printAx(cReport)
*-   form.pJob.hReport.recordselectionformula = &cSelect
*-
beginprinting(cReport,pathToTables,false,false,"sqlAliasName","sq
lAliasNameAgain","SQLLoginID","SQLPassword",number
of SQLTable)


*-   Even Simpler Usage Example next 3 lines below:

*-   set procedure to rep32.cc addi
*-   form.pJob = new printAx(cReport)
*-   printNoParameters() // note the function name here
*  This requires that the tables are in the same place they were for 
developing the report.



*- More stuff:
*- You can change the contents of a Crystal Object using the
getReportObject.prg
*- In the following example I change the contents of a Text object in the
Crystal Report
*- With a class name of "PrintDate" as follows:

//   cRep        = "JohnJ"
//   cLocation   = "LOS ANGELES"
//
//   dateSpan = dtoc(Date()-7)+' - '+dtoc(date())
//   set proce to getReportObject.prg addi
//   gr = new getRepObj()
//   "PrintDate"  IS THE NAME OF A OBJECT FIELD IN THE CRYSTAL REPORT.
 You
can change the name of an object in Crystal Designer.

//   gr.execute(form.pJob.hReport,"PrintDate","Print Range:
"+dateSpan+chr(13)+"Location:    "+cLocation+chr(13)+"Agent:
      "+cRep)
//   release object gr
//   gr = null
//   close procedure getReportObject.prg

//   hFld      = Null
//   hSection  = Null








\


> Background (bear with me as I explain):  My firm is using an insurance 
> business management system that was originally written way back when in a 
> flavor of dBase.  Current version that we're using is a mix of Visual 
> FoxPro and .Net, but to maintain compatibility, the databases themselves 
> are still in dBase format, thank goodness.
>
> Since starting here last January, one of my tasks has been to run reports 
> derived from these databases, bypassing the internal reporting system 
> (those of you who have figured out the app I'm indirectly referring too 
> will understand why!).  To date, there hasn't been a problem; even though 
> we bought a copy of dBase Plus 2.6.1, I'm still using Visual dBase 5.7
& 
> Crystal Reports 3 that came with it.
>
> (Why?  Because I'm still a "dot prompt" programmer at heart, and
it gets 
> the job done, and yes, I know I have to get up to speed on using dBase 
> Plus properly, but getting the reports done has been a priority -- that's 
> what they hired me for, and who'd have thought I'd be making a living 
> using dBase these days?)
>
> Now, the problem that has come up is that my boss wants me to somewhat 
> automate the monthly report running.  Should be no problem... set up a 
> routine to run the program, then trigger the report printout.  Right? 
> Well, I'd hoped to do that with the full-blown Crystal Reports, currently 
> version XI.  I have to re-do some of the reports, no big deal.  But I 
> should be able to trigger the reports using ActiveX -- and I can't get it 
> to work.
>
> Don't know if I've not installed something correctly, or have overlooked 
> some small configuration, but I can't seem to get it to work.  It might 
> even be that I can't do it during the 30 day trial but have to buy the 
> full-blown package, which we will do if I can figure this out.
>
> So... does anyone have any suggestions of what to look for, or any sample 
> code that will give me a clue?
>
> Thanks!
>
> 73 

Post Reply
Re: Working with Crystal XI & ActiveX
Tue, 14 Aug 2007 00:58:25 -040
In article <E54bBob3HHA.1836@news-server>, 
rjnotarius@hendersonbrothers.com says...
> I'm having a small problem in writing a dBase routine to bring up via
ActiveX a report form generated in Crystal Reports XI.  
> 
> Background (bear with me as I explain):  My firm is using an insurance
business management system that was originally written way back when in a flavor
of dBase.  Current version that we're using is a mix of Visual FoxPro and 
.Net, but to maintain compatibility, the databases themselves are still in dBase
format, thank goodness.  
> 
> Since starting here last January, one of my tasks has been to run reports
derived from these databases, bypassing the internal reporting system (those of
you who have figured out the app I'm indirectly referring too will 
understand why!).  To date, there hasn't been a problem; even though we bought a
copy of dBase Plus 2.6.1, I'm still using Visual dBase 5.7 & Crystal Reports
3 that came with it.  
> 
> (Why?  Because I'm still a "dot prompt" programmer at heart, and
it gets the job done, and yes, I know I have to get up to speed on using dBase
Plus properly, but getting the reports done has been a priority -- that's what
they 
hired me for, and who'd have thought I'd be making a living using dBase these
days?)
> 
> Now, the problem that has come up is that my boss wants me to somewhat
automate the monthly report running.  Should be no problem... set up a routine
to run the program, then trigger the report printout.  Right?  Well, I'd hoped 
to do that with the full-blown Crystal Reports, currently version XI.  I have to
re-do some of the reports, no big deal.  But I should be able to trigger the
reports using ActiveX -- and I can't get it to work.  
> 
> Don't know if I've not installed something correctly, or have overlooked
some small configuration, but I can't seem to get it to work.  It might even be
that I can't do it during the 30 day trial but have to buy the full-blown 
package, which we will do if I can figure this out.
> 
> So... does anyone have any suggestions of what to look for, or any sample
code that will give me a clue?
> 
> Thanks!
> 
> 73
 

Ron,

I'm not terribly experienced with Crystal Reports and not CR XI. Can you 
show us a snippet of your program code and explain to us what is and is 
not happening? I know earlier releases of CR worked so I would think 
this should be the same or similiar.

-- 
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.|        dBASE info at http://geocities.com/geoff_wass       |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
Post Reply
Re: Working with Crystal XI & ActiveX
Tue, 14 Aug 2007 09:37:54 -070
Ron,

 Are you trying to run the XI reports from dBASE 5.7? If so
you may not be able to, because XI is 32bit and 5.7 is 16bit.

HTH,
Bruce

"Ron Notarius" <rjnotarius@hendersonbrothers.com> wrote in
message 
news:E54bBob3HHA.1836@news-server...
> I'm having a small problem in writing a dBase routine to bring up via 
> ActiveX a report form generated in Crystal Reports XI.
>
> Background (bear with me as I explain):  My firm is using an insurance 
> business management system that was originally written way back when in a 
> flavor of dBase.  Current version that we're using is a mix of Visual 
> FoxPro and .Net, but to maintain compatibility, the databases themselves 
> are still in dBase format, thank goodness.
>
> Since starting here last January, one of my tasks has been to run reports 
> derived from these databases, bypassing the internal reporting system 
> (those of you who have figured out the app I'm indirectly referring too 
> will understand why!).  To date, there hasn't been a problem; even though 
> we bought a copy of dBase Plus 2.6.1, I'm still using Visual dBase 5.7
& 
> Crystal Reports 3 that came with it.
>
> (Why?  Because I'm still a "dot prompt" programmer at heart, and
it gets 
> the job done, and yes, I know I have to get up to speed on using dBase 
> Plus properly, but getting the reports done has been a priority -- that's 
> what they hired me for, and who'd have thought I'd be making a living 
> using dBase these days?)
>
> Now, the problem that has come up is that my boss wants me to somewhat 
> automate the monthly report running.  Should be no problem... set up a 
> routine to run the program, then trigger the report printout.  Right? 
> Well, I'd hoped to do that with the full-blown Crystal Reports, currently 
> version XI.  I have to re-do some of the reports, no big deal.  But I 
> should be able to trigger the reports using ActiveX -- and I can't get it 
> to work.
>
> Don't know if I've not installed something correctly, or have overlooked 
> some small configuration, but I can't seem to get it to work.  It might 
> even be that I can't do it during the 30 day trial but have to buy the 
> full-blown package, which we will do if I can figure this out.
>
> So... does anyone have any suggestions of what to look for, or any sample 
> code that will give me a clue?
>
> Thanks!
>
> 73 

Post Reply
about | contact