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

Passing Parameter From VB (Excel)

Status
Not open for further replies.

CurtR

Programmer
Aug 9, 2000
66
US
I am sorry I know this subject has been brought up many times. But I can not get the Parameter to pass from VB ( in Excel) to Crystal 7.0 Report.
Not looking for anything Fancy. Have one Command Button that I would like to have pass the Date Parameter( single Date) on to multiple ( 5) reports and Have them all run with a single click. But I can not get even one to fire up trying to pass a parameter, and without trying to logon to a server. I can get the report to run From Vb. ( CrystalReport1.PrintReport) But as soon as I try any of the suggestions that I have found on this subject of passing a parameter I get nothing.
The data is going to be coming from an Orcale database soon which means that I will need to log on to the server besides passing a parameter to the report. That should make it even more fun!
Have tried :
CrystalReport1.ParameterFields(0)="2001,01,01"
CrystalReport1.PrintReport
And
CrystalReport1.ParameterFields(0)= Calendar1.Value
CrystalReport1.PrintReport
Everything that I can think of to pass this to Crystal.
Lost and Frustrated, Not use to Vb.
Thanks
 
I have, since posting this gotten the Parameters to Pass to Crystal. But Only if I enter them into the statement. I would Like to use the Calendar Function for the user to choose the date for the report.
The parameteritself I have changed from Date, to Date/Time, to String and back again trying to get this to pick up from the calendar. I have also tried to use Format in the statement to change the format to match that set in the parameter but nothing seems to be helping.
While I am closer, It's still not working. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top