Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Integrating Crystal Reports with VB6?

Posted on 2013-01-16
12
Medium Priority
?
1,344 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 400 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 18

Assisted Solution

by:vasto
vasto earned 800 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 101

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
 
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 101

Assisted Solution

by:mlmcc
mlmcc earned 800 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 101

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

618 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