Solved

Integrating Crystal Reports with VB6?

Posted on 2013-01-16
12
1,097 Views
Last Modified: 2013-02-05
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
0
Comment
Question by:lthames
  • 5
  • 3
  • 2
  • +1
12 Comments
 
LVL 14

Expert Comment

by:Brook Braswell
ID: 38784107
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
 

Author Comment

by:lthames
ID: 38784123
I was hoping to get v 13 or the most current SAP version.
0
 
LVL 14

Accepted Solution

by:
Brook Braswell earned 100 total points
ID: 38784484
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
 
LVL 18

Assisted Solution

by:vasto
vasto earned 200 total points
ID: 38784501
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 38785449
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
 

Author Comment

by:lthames
ID: 38787830
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 18

Expert Comment

by:vasto
ID: 38787867
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
 

Author Comment

by:lthames
ID: 38788020
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
 

Author Comment

by:lthames
ID: 38788102
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
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 200 total points
ID: 38790254
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 38790260
0
 

Author Comment

by:lthames
ID: 38793104
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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to shrink a transaction log file down to a reasonable size.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now