Crystal Reports storing input parameters/Calling from VB6
Posted on 2007-03-22
I have a Crystal Reports 8 report whose SQL command is:
GetHistoricalApprovalRecords is a stored procedure that takes two DateTime parameters, the period's start date and the period's end date.
The report itself works great. If I hit refresh, it gives me the option to prompt for new values or use the current values. That's not a problem.
However, when I call this report from Visual Basic 6, it uses the current values in the two DateTime input parameters (specifically, it uses the last two values I explicitly put in and saved the report). I imagine Crystal stores those values in the report itself.
My question is if it is possible to stop this behavior. I would like to be prompted every time the report is opened, refreshed, etd. I do not want to store any values in the report itself.
The two input parameters are from the stored procedure that I added to the report.
The code from VB6 is:
Set app1 = CreateObject("Crystal.CRPE.Application")
Set rpt2 = app1.OpenReport("\\reportShares\ApprovalRecords.rpt")
rpt2.Database.Tables(1).SetLogOnInfo sqlserver, db, uid, pwd
If possible, I do not want to pass the input values from VB6 to the report. I would like to open the report from VB6 and ahve it automatically prompt me for the values.
Thanks in advance!