Link to home
Start Free TrialLog in
Avatar of ElmDutch
ElmDutch

asked on

Passing Date peramiters from VB to crystal9 into a record formula

I am passing in my VB application the report selection date into the following fields

CRXReport.FormulaFields(3).Text = (Day(txtmaxvaldt))
CRXReport.FormulaFields(4).Text = (Month(txtmaxvaldt))
CRXReport.FormulaFields(5).Text = (Year(txtmaxvaldt))

I have watched these field loads through the DEBUGER and the fields look to be loaded correctly, but when the report is executed it returns nothing but the report form.

The crystal9 record selection formula in question is
{CMINV_INV_EXTRACT.CASE_NO} like "DU*" and
{CMINV_INV_EXTRACT.SYSTEM_ORIG_CD} in ["1", "2", "3"] and
{CMINV_INV_EXTRACT.VALUATION_DT} = Date ( {@tstyyyy},{@tstmm},{@tstdd})

I load this Date info through the crystal 9 formula expert and the report loads.  I need to know what I am missing in this load process

Thanks for your help
Avatar of Mike McCracken
Mike McCracken

Is your date field actually a date time field?  If so it will never equal the date.

mlmcc
Avatar of ElmDutch

ASKER

this is true -- oracle date filed is 10/29/2004 00:00:00
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Another way


{CMINV_INV_EXTRACT.VALUATION_DT} >= Date ( {@tstyyyy},{@tstmm},{@tstdd}) AND
{CMINV_INV_EXTRACT.VALUATION_DT} < Date ( {@tstyyyy},{@tstmm},{@tstdd}+1)

mlmcc



Should have solved it.

mlmcc