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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FAIRLY URGENT!! (Dynamically swapping Crystal Reports through VB 1

Status
Not open for further replies.

Jman2

Programmer
Sep 16, 2000
2
CA
Here is what I want to do. We are using Oracle 8I Spatial database. We have created a number of Crystal Reports that take parameters. We have a table that contains a list of the reports along with the path location of the .rpt file. We want to be able to allow the user to select which report they want and based on their selection hit our table to determine the location and name of the corresonding .rpt file. We then want it to load into VB. Once there we want them to be able to select the parameter values they want and then have the report display. I am an experienced programmer but new to both VB and Crystal. Does anyone have any ideas? [sig][/sig]
 
Crystal 4 ways that it can be launched from VB. This depends somewhat on which version of VB and Crystal you are using. VB comes with Crystal 4.5 and the Active X control. The other methods require a more recent version of Crystal.

The Active X is the easiest:

Put the Active X control on the form and give it a name like rptMyReport.

You can give the user a screen that allows them to select the report, and pass the path they select to commands like the following:

rptMyReport.ReportFileName = "C:\directory\vblesson.rpt"
rptMyReport.PrintReport

Of course, you would pass the string as a variable.

This would bring up the parameter prompts and then preview the report. There are techniques for overriding some of the basic settings in the report like sorting, grouping , selection, etc.

There are 3 other techniques for launching the report (API, Automation Server, and RDC) which have advantages and disadvantages. Not being an experienced programmer I am not qualified to make recommendations, but in general as the techniques get more complex, you get more control over the report from the program. If you need more control than the Active X, I have heard good things about the Automation Server. The RDC is the latest and Seagate recommends it strongly, but I have been told it can be cumbersome to work with.

The support area at Seagate's web site has some documents that compare the different techniques:

SCR8DevToolsFeatureCompare.pdf
SCR8WaysToIntegrateSCR.pdf

Seagate has a printed developers guide that gives the basics of each, and a few developers help files that are installed in a Help directory in the program directory.

There is also one book on the market that gives a more detailed look at each of the techniques. It is the &quot;Crystal Reports 8 (or 7) The Complete Reference&quot; by George Peck, $30 from bookpool.com. [sig]<p>Ken Hamady<br><a href=mailto:ken@kenhamady.com>ken@kenhamady.com</a><br><a href= Reports Taining by Ken Hamady</a><br>[/sig]
 
The Active X control is one of the easiest methods for previewing a report from VB. The Automation Server is very easy to use as well. The RDC, (Report Designer Component) offers much more than you would need. Using the API calls is much more code intensive and is usually an area of programming for the very experienced.

[sig]<p>Cody ford<br><a href=mailto:codyjford@hotmail.com>codyjford@hotmail.com</a><br><a href= > </a><br>VB, VBS, Seagate Info/Crystal Reports<br>
[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top