Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I "Import" CR9 Reports into VB6? 1

Status
Not open for further replies.

theseus1976

Programmer
Apr 19, 2004
6
US
I apologize if this is something that has already been addressed elsewhere, but I haven't had much luck searching through the forums...

I was hopeful when I came across Thread204-722625 (I hope the link works), but it was redirected to this forum and I haven't come across it yet... That describes my problem exactly.

What I'm trying to do: I have a Crystal Reports 9 report I developed and saved as an .rpt file. This report needs to DYNAMICALLY show a different graphic per record. I downloaded the example code from Business Objects, but I can't load the project due to the error described in Thread204-722625 .

I'm able to view the code in a stand-alone text editor (Notepad), so I CAN use the example as a guide, but ONLY if I can somehow "import" my .rpt file into VB6. I've read all kinds of [other] forums and they say "Go to Project > Add Crystal Report, then choose Import" (what could be simpler?), but that's somehow not an option for me!

Please forgive me for posting 2 problems in one thread; however, since they are (I feel) no doubt related, maybe solving one will solve the other.

I'm using VB6.0 (Version 8176) and CR9 (Version 9.2.3.970). If there's any other info you need, let me know. Your help is GREATLY appreciated! :)

-e
 
You're using the Developer or Advanced Developer version of Crystal 9, right?

Go to Project > References, and see if you've got any of these in the list of available references:
1) Crystal Reports 9 ActiveX Designer Design and Runtime Library
2) Crystal Reports 9 ActiveX Designer Run Time Library
3) Crystal Report Viewer Control 9

If not, you probably don't have a developer version, or the components didn't get installed.

-dave
 
You can try and reinstall Crystal Reports and see if it fixes the missing references.


In my menus I have
Project->Add Crystal Reports 9

In the componentes I have
Crystal Enterprise UI controls - win32_x86\enterprisecontrols.dll
Crystal Analysis common controls (1.0 and 2.0) - sacommoncontrols.dll
Crystal file dialog - filedialog.dll
Crystal Query viewer 9 Type library - xqviewer.dll
Crystal report select expert 9 - cselexpt.ocx
Crystal report viewer control 9 - crviewer9.dll
Crystal report repository explorer type library - repositoryexplorer.dll

In the references I have (selected)
Crystal reports Viewer Control 9
Crystal reports 9 ActiveX designer Run time library
Crystal reports 9 ActiveX designer design and Runtime library

and a lot of others, not selected.

See if you can get them or most of them.


Not a solution probably, but maybe it is related with the version of CR that you have on your computer.

If by any change this is not a legal version you may wish to download version 10 from
Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
I'm sorry I didn't specify earlier, I'm using CR9 Professional... Do I need to be using CR9 Developer to have that ability? (I sure hope not!)

Vidru, I have #2 and #3 showing, but I can't find #1 anywhere. (Is that something that only comes w/ CR9 Developer?)

I did the install myself and chose to install everything (to hopefully avoid situations like this to begin with). ;)

I have the ability to add a "Data Report", but NOT a Crystal Report. When I choose to add a Data Report, a .dsr gets created, but there's no way (that I've found) for me to import the existing CR report.

Fredericofonseca, it's a fully licensed copy (the State is rather touchy about things like that)... ;) Unfortunately, it's not like I can go out and buy an upgrade: I'm going to have to keep using CR9 until the State decides it's time for EVERYONE to upgrade, and I'm nearly positive that WON'T happen before the trial for CR10 is up! ;)

As for what I have in my components (designers), I have:

-Addin Class
-Data Environment
-Data Report
-DHTML Page
-Microsoft Forms 2.0 Form
-WebClass

All are checked except for MS Forms 2.

Again, thank you for (everyone's) assistance. :)

-e
 
theseus1976,

I'm a little surprised that #'s 2 and 3 show up without the developer version. With those, you should be able to take this sample and change the references from CR 8.5 to CR9 to get you started.

-dave
 
Do I need to be using CR9 Developer

Yes, you need CR9 Developer.

"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
 
Yep. As far as I know you need the Developer edition to be able to use the UI on VB.
May be wrong though, and as you have a legal version I would contact and confirm with them.

I have CR Advanced, so I have more controls than you need, but the Developer will allow you to do most of the stuff you require.

And getting an upgrade to the Developer edition is not that expensive, so your department may find it worthwhile to get it for you.


Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Thanks Vidru! (And everyone else.) :)

I had already downloaded that example and _thought_ I took a look at it... Of course, I'm still getting an error when trying to load the example (after changing the reference): "Line 13: Class CRVIEWERLibCtl.CRViewer of control CRViewer1 was not a loaded control class." I suspect it has something to do with the change in reference from CR8/8.5 to CR9. The funny thing is, I've got CR8.5 installed side-by-side... To be honest, though, I think the install went awry because I can't actually LOAD 8.5 (but that's an entirely different problem and one that I'm not concerned with right now).

Anyway, I'd already coded most of a viewer app, made appropriate references, etc., just couldn't get the section formatting done... (I'm kinda new to handling CR in VB, if it wasn't already obvious.) ;)

SO, updated status:

1) Still can't import/create CR reports in VB (apparently I need CR9 Developer for that)
2) I get the error Line 13 (above) when loading Vidru's suggested example
3) I have the problem as described in Thread204-722625 when loading Business Objects' suggested example

I suspect #2 and #3 are related to #1, and this would all be moot if I had CR9 Developer.

HOWEVER, my ultimate goal in posting was to be able to change pictures dynamically at run-time, and with everyone's help (especially Vidru's) I believe that's accomplished. (My test report only has one page, but I'm able to select and modify which picture gets changed -- and to what -- at run-time, so I suspect multiple pages will work the same.)

Again, thanks for all your collective help! :)

-e
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top