Integrating Crystal Reports with VB6?

I have a suite of vb6 applications using MS SQL Server.  I want to use Crystal Reports to write some reports that can be integrated into the vb6 applications.  

Is this possible to accomplish with recent versions of CR?   No design capabilities are needed; just the ability to launch reports with specific criteria from within our modules.  

For example, if my application has a client's profile on the screen, a button 'Open Order Report' would launch that report for client = clientID.  And in some cases have a dialog box with other criteria (date selection, etc).

Any input or direction would be helpful.

Lynn
lthamesAsked:
Who is Participating?
 
Brook BraswellConnect With a Mentor Application Development ManagerCommented:
Logistically speaking...
If you have vb6 with a CR com object ( CRAXDRT ) then you can attempt to open a .rpt file within your application.

Check your EULA to make sure you will be ok to do that.

Public Sub OpenMyReport( ReportName as string)
' ReportName in this case should include the path, else you will have to set that elsewhere
Dim NewApp as new CRAXDRT.Application
Dim NewRpt as CraxDrt.Report


set NewRpt = NewApp.OpenReport(ReportName,1)
if PreviewReport then
   ' you would need a Viewer Control object...
   MyForm.CRViewer1.ReportSource = NewRpt
   MyForm.CRViewer1.ViewReport
else
   NewRpt.VerifyOnEveryPrint = false
   NewRpt.PrintOut false,1
end if



End Sub

Open in new window

0
 
Brook BraswellApplication Development ManagerCommented:
Lynn,
   To my knowledge you can still open the new versions of crystal report with the same objects in vb6 although you will have to check your licenses.  Which version of Crystal do you intend to use ?
Crystal XI was the last version supporting com.  Using this same object you should be technically be able to open them.  
This would be the CRAXDRT resource in your vb6 project.
0
 
lthamesAuthor Commented:
I was hoping to get v 13 or the most current SAP version.
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
vastoConnect With a Mentor Commented:
You can create a .NET dll using VS2010, register it as a COM object and use it inside your VB6 application. In such way you will have 2 advantages :
 - access to Crystal Report for VS2010  (which ver.13)
 - much better development IDE

If you don't have VS2010 available you may try one of the available on the market SDKs. As far as I know R-Tag Report Manager (www.r-tag.com) provides a SDK, which is available to .NET and VB6 applications. This will allow you to use Crystal Reports 13 too.

I would suggest you before to start the development to check if you really need the latest Crystal Reports version. Crystal XI is available for VB^ and is able to open the reports created with CR2011. If you are not using the new functionalities of CR2011 there will be no difference for you.
0
 
mlmccCommented:
CR XI R2 is the last version compatible with VB6 and .COM.  

Even though there have been no file format changes, CRAXDRT and other .COM methods with VB6 are not licensed for use with later versions.  Using them with VB6 directly through CRAXDRT would be a violation of the Crystal licensing agreement and the EULA.

I have not seen anything that would prevent you from building an interface in VS2010 and calling it from VB6.  Vasto says that is possible.  You would be wise to check with SAP/Crystal on the whether that method violates the EULA.

CR XI R2 is still available from SAP primarily because it will interface with VB6 and other .COM languages.

mlmcc
0
 
lthamesAuthor Commented:
Thanks all for your input.

This makes me question whether trying to implement within vb6 is practical for moving forward.  

Would we be losing anything important if we go with CR XI R2?  And I assume that it is legal to redistribute the CRAXDRT if we buy that version?
0
 
vastoCommented:
There are some new things in each of the versions after XI . For example support for xlsx files and more than 65k records when you export to excel. However there are so many users who are still with CR ver 8.5 .

Do you have a commercial application written in vb6 or this is an in house project?
0
 
lthamesAuthor Commented:
It is a commercial application.

I have been trying to get direction from SAP online and evidently you need special licensing to embed reports in a commercial application.  I knew this to be the case for web apps or SaaS type apps, but assume they had a developer version like the old versions (we used CR 7.0 previously) that let you embed just the report viewer.

We are a small company with a very specialized application business forms manufacturers.  We just don't have the customer base or the potential market to justify large oem licensing fees . . . so it looks like version XI  might be our best bet.
0
 
lthamesAuthor Commented:
Actually,  even the XI developer license is only for internal corporate applications

Free runtime licensing: Royalty free runtime license for unlimited internal corporate deployment of the Crystal Reports .NET, Java, and COM (RDC) report engine components without having to pay additional licensing fees for multiple servers or CPUs

So now I am waiting to find out about the oem licensing fees . . . . . may be a deal breaker.
0
 
mlmccConnect With a Mentor Commented:
That is true however Crystal allows you a way around it.  You just have to purchase a developer edition of Crystal for the company.  They don't have to install it, they just have to own a developer license.  In fact I believe you can keep the copy in your office and mark it as theirs.  

Here is a link to their stance on the RDC and .COM
http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/80bd35e5-c71d-2b10-4593-d09907d95289?QuickLink=index&overridelayout=true&29549375000173

As far as other feature, CR2008 added
    optional parameters - parmaeters can be created but do not require a value.  There is a new HasValue function to test it for a value.  If no value you can ignore it in the filter.

On report sorting based on user selections - When you dsign the report you can designate some fields to have sorting controls.  The user can then set the controls when viewing the report to change the sort order or change the field(s) used in sorting

CR2011 did not add much in new functionality but was an total redesign effort to make maintenance easier, adding features easier and make it easier to provide specialized versions like for Visual Studio.

mlmcc
0
 
lthamesAuthor Commented:
excellent links, mlmcc.  They were very helpful.

It seems as if my oem licensing concerns were unfounded and that the information I got from the support operator was misleading.  Our applications are installed locally on full windows computers and the data resides on a local area network.  The 'report engine' will be running on the workstation, not the server and there is web access to the reports.  There also will not be any design capabilities for the users.  All report will be designed and embedded directly by us.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.