Question

Crystal Report 2008 & Custom Control in VB6

Asked by: gowflow

Hello Experts,
I hv been devlopping VB6 apps and using CR custom controls for versions prior to 2008. I wonder if it is possible to use CR 2008 in VB6 and positively what is the library that should be added to show the custom control.
Tks
gowflow

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-11-06 at 08:52:19ID24878471
Tags

CR 2008 VB6 Custom Control

Topics

Crystal Reports Software

,

VB Controls

,

VB Objects

Participating Experts
2
Points
500
Comments
32

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Crystal Report with VB6
    Hi, I have got an exe file for a VB6 program that is done with Crystal reports. When I run the exe file I get an error that tolds me that the oxc file for the Crystal report is not found. I need the Setup file for the Crystal Report, please. Thanks in advance.
  2. VB6 and Crystal 9
    Hi all, I know there's a million thread about Crystal and VB6 trying to run it, but they all have such slightly different nuances in the answers, depending on the version of vb, and crystal, and etc. etc. Maybe someone can help me. I have an .rpt file Now, I have no clue ...
  3. VB6 / SQL 2000 / CR Reports
    I need to use VB6 and Crystal Reports 8.5 to generate reports from a SQL2000 database. The VB6 program works well with the SQL tables for accessing and updating data. When I use the reports, oiginally connecting to an Access table but updated to connect to the SQL data, fro...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: mlmccPosted on 2009-11-06 at 09:27:03ID: 25761097

Sorry.  They dropped .Com support with CR2008.

I am told that so long as you dont use any of the new features of Crystal 2008 the reports will work in an application built for CR XI.

Supported platforms
http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/80f1086a-35c4-2b10-a7a3-c94c7ee45cf1&overridelayout=true

Statement of RDC Direction
http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/80bd35e5-c71d-2b10-4593-d09907d95289&overridelayout=true

How to migrate from the RDC to the .Net Assemblies
http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/e0eb394f-931e-2b10-3b82-9413bfc3f457&overridelayout=true

mlmcc

 

by: gowflowPosted on 2009-11-06 at 10:06:38ID: 25761428

mlmcc,
tks your info much appreciated. Could you by any chance know what are the libraries/dll/ocx ... I need to add in my Project to run a CR XI ?
I am using the CR of VB6 that can run my Seagate Crystal Report ver 8.0. When I load a report of CR 2008 with this control it gives me an error: Cannot Load Report !
Any idea ?
rgds/gowflow

 

by: Brook1966Posted on 2009-11-06 at 10:34:49ID: 25761729

If you have XR XI.
The tools you most likely would need are:
CRAXDRT.dll
CRAXDRT.dep
CRAXDDRT.dll
EnterpriseControls.dll
CrViewer.dll

The compiled installation required 2 merge modules that I had to request from Business Objecs
CR11_rdc_reportengine
CR11_rdc_runtime

Some of these you only need if you are doing report design tools embedded in your application.

Most of my clients use CR XI but we have migrated to CR2008 and these tools in my vb6 app still work just fine with these reports.

 

by: gowflowPosted on 2009-11-06 at 10:47:48ID: 25761858

1. I have Seagate Crystal Report v8.0 would it work ?
2. What are the generic names of the dlls? and where do I find them under References or Components as there are plenty of Crystal on my machine and don't want to fiddle around guessing what files to add.
Any idea ?
rgds/gowflow

 

by: Brook1966Posted on 2009-11-06 at 11:45:45ID: 25762417

What do you mean the "Generic" names of the dlls?
Where you "might" find them would be:
Common Files\Busness Objects\..\bin
Best way to know for sure is to search your drive for these components.

You would possibly want to use the Crystal Report Viewer.
CRViewer.dll
This would be in your Project Components.
I also added the EnterpriseControls.dll
This is so that you can have DSR's (embedded reports) as object in your project.
Also under components on the Designers Tab in have included the craxdui.dll

If you have crystal reports installed and it is only version 2008 then you may not find what you are looking for.
My suggestion is to get the XI version installed and get your components from there.
VB6 will expose to you the objects available.
The Project References would be where you add the craxdrt.dll or craxddrt.dll

If you have version 8 then I am sure you can put objects in your code.
I can not tell you that 2008 reports will display under CR8 or not.
You can create one and try.  My hunch is that basic reports will work but report using new features in 2008 may give you unexpected results trying to show them with a CR8 driver.
You may want to check with Crystal Reports themselves for that answer.

 

by: mlmccPosted on 2009-11-06 at 13:08:16ID: 25763071

DO you have CR XI?

Which edition?  You need the developer edition or advanced edition.

Crystal made a major change in the report file format with CR9.  Previous versions of Crystal (that is CR8.5 and before) cannot read/open CR9 and later files.  The dlls included with CR8 will not open a CR9 or later (that includes CR2008) files.

You will need to get a copy of CR XI.

mlmcc



 

by: gowflowPosted on 2009-11-07 at 02:14:35ID: 25765692

mlmcc,
Well that's exactly my question: I hv VB6 pgm and hv on my machine both CR 2008 and CR 8.0 is it possible with these 2 only to include controls/references so I can open my reports developped un CR 2008 in VB6 ??? Not intrested to add an other CR version as it could also create some incompatibilities with all my users using ver 8.0 pro and ver 4.0 pro ! I was thinking to migrate to the latest which is CR 2008

Brook1966,
Tks your lengthy explanation which is much appreciated. I will try to add in my project the references you pointed at and chk the result and will revert.

rgds/gowflow

 

by: mlmccPosted on 2009-11-07 at 07:51:43ID: 25766695

No.

CR2008 cannot be used with VB6.  CR8 and its dlls cannot open CR2008 reports.
The report files created by CR2008 should work (so long as you don't use the new features) with a VB6 application built with the CR XI dlls.

The dlls suggesteed by Brook1966 are for CR XI.  Some of them are availale with CR8 but not all.
CRAXDRT.dll - available but is version specific.  The CR8 version will not work with CR2008.
CRAXDRT.dep - available but is version specific.  The CR8 version will not work with CR2008.
CRAXDDRT.dll - available but is version specific.  The CR8 version will not work with CR2008.
EnterpriseControls.dll - Not available for CR8
CrViewer.dll - available but is version specific.  The CR8 version will not work with CR2008.
CR11_rdc_reportengine - Not available for CR8.  Specific to CR XI
CR11_rdc_runtime - Not available for CR8.  Specific to CR XI

If you want to use CR2008 in an application you have 2 options
Move to VB.Net or VS.Net
Buy CR XI to get the dlls that are compatible with CR2008.  If you buy CR XI then to avoid the potential to use a feature of CR2008 that isn't supported I would just use CR XI to build the reports.

mlmcc
mlmcc



 

by: gowflowPosted on 2009-11-07 at 10:46:35ID: 25767506

I appreciate the help but mlmcc both your options:
1. move to vb.net or VS.net is not a solution for me as users now using the software that is running the whole offic'es operation .. maybe an option to look for on a long term
2. Get CR XI to use the reports developped in CR 2008 is subject to following:

I am using mainly CR 2008 for reports that uses memo fields that need to be handled in formulas (something previous version did not support) so my key question is: does CR XI accept memo fields in formulas ? if yes them option 2 could be an option but still before that I wonder does CR 2008 have a feature like Report Distribution (that was avail in ver 4.0 and 8.0 that I hv presently ?) if yes then this would be my best choice is to pack the reports in .exe and run them as shell from my vb6 !!!

gowflow

 

by: mlmccPosted on 2009-11-07 at 10:58:13ID: 25767567

There is no compile/report distribution feature in CR2008  CR8 was the last versionn that included it.

Another idea since you said to run them using a shell command would be to use a third-party viewer that can display 2008 reports.

You will probably have to load the correct .Net framework on all user machines plus you may have to buy a viewer license for each user or at least each machine if the machines are shared.

Here is a link to a page with several good viewing application
http://www.kenhamady.com/bookmarks.html

mlmcc

 

by: gowflowPosted on 2009-11-07 at 23:50:34ID: 25769729

mlmcc,
If CR8 is the last compile report Distribution then it seems like we are heading to CR XI. You did not answer my cruitial question about memo fields in formulas: Does CR XI allow using memo fields in formulas?

As far as your 3rd party viewer can you pls ellaborate specifically on a clear case on how to do it. I check the link but so many other links that it is not clear what to do.

rgds/gowflow

 

by: mlmccPosted on 2009-11-08 at 07:11:45ID: 25770691

The third party viewer - Since I haven't used any of them all I can say is to pick a couple of them and see if they meet your requirements.  I have heard good things about the DataLink viewer.  Also remember you may have to buy a copy for each user.  You might also send th enote to Ken requesting his list of favorite products.

Memo fields (at leadt from Access) can be used in formulas.

mlmcc

 

by: gowflowPosted on 2009-11-08 at 10:01:37ID: 25771207

I guess I am heading to getting a copy of CR XI and will install it and chk if it does the job. Meantime, I will keep this question opened in case some challenges with CR XI. I will proceed with this in the course of this week and for sure it has 1st priority. Hope you can bear with me just a little bit
tks your help
gowflow

 

by: gowflowPosted on 2009-11-08 at 10:04:04ID: 25771219

By the way what is the best version to get ?
Professional, developper ... ? I usually get the full. and what version is the latest ?
gowflow

 

by: mlmccPosted on 2009-11-08 at 10:53:35ID: 25771392

You need the developer edition and I would get Release 2 since they have essentially dropped support for release 1

Here is a link to a free trial.  It is a full copy and when you get your license you only need apply the key code.
http://www.sap.com/usa/solutions/sapbusinessobjects/sme/freetrials/index.epx

mlmcc

 

by: gowflowPosted on 2009-11-10 at 13:44:04ID: 25790215

I did install CR XI and found lot of library on top of what I had. Still my program does not run the new version  created in CR 2008. So I looked up a diffrent post where the requester was using the former CrystalReport.Action = 1 to launch the viewer and the solution was with following code:

Dim CrystalApp As CRAXDDRT.Application
Dim CrystalReport As CRAXDDRT.Report
Set CrystalApp = CreateObject("CrystalRunTime.Application")
Set CrystalReport = CrystalApp.OpenReport("c:\tmp\balance sheet.rpt")

I did integrate above code in my program and cancelled all old instances and removed all old library and installed new one.

Am getting following error when I run the code at instruction:
CrystalReport2.FormulaFields.Item(1) = "VSLVOY= '" & LCurrentVesselLoaded.Caption & "'"
Object doesn't support this method.

I appreciate equivalent to following:
CrystalReport1.Formulas(0) =
CrystalReport1.WindowTitle = gstFOReports & Combo2.Text
CrystalReport1.ReportFileName = gstFOReports & Combo2.Text
CrystalReport1.DataFiles(0) = gstDBName
CrystalReport1.UserName = "Admin"
CrystalReport1.Password = vbNullString
CrystalReport1.Action = 1

tks/rgds
gowflow

  • CRVI.jpg
    • 203 KB

    VB6 sample routine running CR report

    VB6 sample routine running CR report
 

by: mlmccPosted on 2009-11-10 at 19:24:06ID: 25792105

 

by: gowflowPosted on 2009-11-11 at 02:26:17ID: 31651106

Great Help mlmcc and Brook1966
Tks

 

by: gowflowPosted on 2009-11-12 at 00:15:04ID: 25802337

I still have a small challenge don't know if you can help me.
I use in Crystal a formula VSLVOY = {Table1.Vessel} + totext({Table1.Voyage})
Voyage is a numeric field and Vessel a string field. My program in VB identifies all Vessels and Voyage as this Sequence. When I used this formulas with CR8 and previous It was always formating the voyage like this: "VESSEL TRADE 41.00" where Vessel ='VESSEL TRADE" Voyage = 41.
Obviously I want "VESSEL TRADE 41" (not the ".00") I tried every single formula in crystal from Int to Round to Trunc ... name it and could not get the .00 out the only was I was able to do so was in setting the NUMBER field in OPTIONS as default 1 not 1.00 (no decimals) and then it worked.

When I installed CR XI and with the RDC change I am not able to get rid of the ".00" although I changed in options the NUMBER format to 1 in CR XI but still ".00" shows

Any idea ???? Is there a formulas I can pass to eliminate the ".00" when calling the report using RDC ??
Appreciate any help
Tks/rgds
gowflow

 

by: Brook1966Posted on 2009-11-12 at 05:29:05ID: 25804218

To my knowledge, that is the point of the Number field options as to how it should be displayed.  Even integer fields in a table will display .00 when you have that as your option.
There is not a formula that changes the display except to put a formula in the rounding option of your report.

 

by: gowflowPosted on 2009-11-12 at 06:16:20ID: 25804621

Yes but my formula VSLVOY is of string type and I need the Vessel + the Integer of the Voyage without the .00 in this variable or else I cannot filter the records only for that VSLVOY !!!
You mean to say why it worked with CR8 and before but not when I installed CR XI ??
rgds/gowflow

 

by: Brook1966Posted on 2009-11-12 at 06:31:10ID: 25804761

You could put these in a formula where:

VSLVOY = {Table1.Vessel} + totext({Table1.Voyage},"####0")

 

by: mlmccPosted on 2009-11-12 at 06:49:35ID: 25804965

That or use the other options for ToText

ToText({YourNumber},#Decimals,ThousandSeparator)

If you want 0 decimals and no thousand separator
Totext({YourNumber},0,'')

mlmcc

 

by: gowflowPosted on 2009-11-12 at 08:23:03ID: 25805917

GUYS !!!
mlmcc you nailed it big time !!! tks u saved me (hv been strugling with this for ages !!!)
Brook1966 sorry yours didn't work ....!!!
Tks a million !!! sorry this one was closed let me know how I can reward it !!
tks/rgds
gowflow

 

by: Brook1966Posted on 2009-11-12 at 09:29:51ID: 25806638

That's kewl...
Both of these should have worked...
' a way to control your number format
ToText({Table.DecimalField},"####0")
should have given same result as
' a way to show no decimals and no comma
ToText({Table.DecimalField},0,'')

Crystal Reports OnLine Help
ToText (x, y, z, w, q)

For Number and Currency values (formatting)

  • x is a Number or Currency value to be converted into a text string;  it can be a whole or fractional value.  
  •   y is a text string used to indicate the format for displaying the  value in x. See Format Strings for  information on creating a format string.  
  •   z is a whole number indicating the number of decimal places to  carry the value in x to. (This argument is optional.)  
  •   w is a single character text string indicating the character to be  used to separate thousands in x. Default is the character specified in your  International or Regional settings control panel. (This argument is  optional.)  
  •   q is a single character text string indicating the character to be  used as a decimal separator in x. The default is the character specified in your  International or Regional settings control panel. (This argument is  optional.) 

 

by: Brook1966Posted on 2009-11-12 at 09:31:43ID: 25806658

in my opinion - mlmcc should be given the points
I am glad to provide the Crystal Information and help you understand the function usage.

 

by: mlmccPosted on 2009-11-12 at 11:04:06ID: 25807658

The question can be reopened and the points reawarded if he wants.
gowflow - Click the Request Attention link in the questiion block and provide the details of what you want to do.

mlmcc

 

by: gowflowPosted on 2009-11-12 at 16:34:25ID: 25810339

Well Tks for the info from Crystal Brook1966. But in my case when I tried
ToText({Table.DecimalField},"####0") it worked for a voyage 49. So I wanted to test it for a crazy number so I put 499999 and then I didn't
When I tired mlmcc it worked for any value as the ',' will never be there and digits will compare to digits !!!

Isn't our buisness testing the extreems all the time !!!
Sorry but surely points go to the one who gave me the formulas that will NEVER FAIL !

Hv asked for Request Attention and asked to add points to this question.
rgds/gowflow

 

by: gowflowPosted on 2009-11-12 at 16:40:24ID: 25810366

I received a link with a new question what do I do ?

 

by: gowflowPosted on 2009-11-13 at 08:01:12ID: 25815009

Sorry mlmcc their reply was no points could be added over and above 500. Do you want me to post the question on a new post ? pls let me know
rgds/gowflow

 

by: mlmccPosted on 2009-11-13 at 11:37:45ID: 25817002

No.  I got points for the question here and there is no real issue on my part for helping on the followup.  If there was I wouldn't have posted or would have said, yes add a new question.

mlmcc

 

by: gowflowPosted on 2009-11-13 at 22:33:59ID: 25819622

TKs mlmcc your gentlemen !
Gowflow

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...