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

How to pass parameter info to a Crystal Report

Status
Not open for further replies.

Sielah

Programmer
Oct 9, 2007
50
0
0
CA
I have just finished developing a fairly complex report in Crystal Reports 10.

I want to be able to distribute this report to other people who don't have Crystal installed on their computers. I have therefore created a simple VB6 container application that uses the CrystalReportViewer control.

The user should be able to enter a Start Date and an End Date. What is the best way to pass these parameters from the VB code to the report file?

I have looked at various code samples on the web. Many of them build a custom query string in the VB code first, then use this string as the data source of the report object.

This seems awfully inefficient. It took me the best part of a week to build the report, using the Database Expert, Record Sort Expert and Select Expert in Crystal to specify how the data set should be constructed. I don't want to have to translate all of this work into a huge long query string.

And it also looks as if I have to specify the report's database connection from within the code. Why can't it just use whatever database connection is already defined in the report at design time?

Any advice?


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top