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

Print Preview in VB6 using Crystal Reports 6 1

Status
Not open for further replies.

3169

Programmer
Jan 9, 2002
6
CA
I am having problems creating a report. I have changed my VB program to pass date parameters to a Crystal Report that I have created. The crystal report is using the parameters being sent to call a stored procedure used on a SQL 6.5 database. I have tested my stored procedure and it works fine. I have created the parameters in Crystal using Stored Procedure parameters but when I run the program it does not bring the report up.
any help would be appreciated.

thanks
Jeff
 
What code are you using to display the report?

mlmcc
 
If OptFOBRpt.Value = True Then
crReports.StoredProcParam(0) = acMonthly2.Text & " 12:00:00.000"
crReports.StoredProcParam(1) = acMonthly3.Text & " 12:00:00.000"
crReports.WindowTitle = "Monthly FOB Report"
crReports.ReportFileName = App.Path & "\Monthfob.rpt"
crReports.Destination = 0
iResult = crReports.PrintReport
endif
 
A couple of ideas
When I pass dates there is no space between the date and the time.

What does App.Path have. It may already have the \ on the end.

Is destination 0 the screen. I always use the VB constants
crptToWindow

mlmcc
 
I have tried all of those suggestions with no luck.
thanks
for your help
Jeff

 
HAve you tried running the reports without passing the parameters and letting CR prompt for the values?

Does the report run in design mode?

mlmcc
 
can this be done while using a stored procedure? or would I have to use select statements instead?
 
yes it does run in the crystal report design mode.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top