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 runtime parameters from Visua Basic to Crystal reports 1

Status
Not open for further replies.

Rkalia

Programmer
Dec 23, 1999
1
US
How can I generate a report according to user preference for the dates.How can I send the variables from VB to crystal reports?
 
rkalia,

1) create a blank formula. Ex: form_Parameter
2) Place this formula on your report. Use the format option to hide when printing if you do not wish to show this information.
3) In your VB program:

CrystalReport1.ReportFileName = "Test.Rpt"
CrystalReport1.Formulas(0) = "form_Parameter = '" & My_Parameter & "'"
CrystalReport1.Action = 1
CrystalReport1.Formulas(0) = ""
4) The forumula 'form_Parameter' will contain My_Parameter generated from your VB program.

Hope this is what you needed.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top