holla...

wrong room perhaps... but pls help... since I know this room will reply faster that other.... and I need this help soon.

I have a .RPT file which have an empty formula.
if you ask why empty formula ? coz, I'll send a value to this empty formula from my VB project.

PS : only 1 formula exist in that .RPT file

let's say this empty formula name = "period"

and I have a text box object, name = "txtPeriod"

what i need to do is to send txtPeriod.Text (in VB) to formula "{period}" in Crystal Report.

I did as below, but error.....

VB Code:
  1. Dim CApp As New CRAXDRT.Application
  2.     Dim CReport As CRAXDRT.Report
  3.     Dim myPeriode as String
  4.    
  5.     Screen.MousePointer = vbHourglass
  6.    
  7.     Set CReport = CApp.OpenReport(App.Path & "\myReport.rpt")
  8.    
  9.     CReport.DiscardSavedData
  10.     CReport.PrinterSetup (0)
  11.     myPeriode = "As Of : " & Format(cDate(txtPeriod.Text), "mmm-yyyy")
  12.  
  13.      'error occured at below line
  14.     CReport.FormulaFields(1).Value = myPeriode

any help ?
pls...

thx a lot,
[-w-]