• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 144
  • Last Modified:

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
0
ElmDutch
Asked:
ElmDutch
  • 4
1 Solution
 
mlmccCommented:
Is your date field actually a date time field?  If so it will never equal the date.

mlmcc
0
 
ElmDutchAuthor Commented:
this is true -- oracle date filed is 10/29/2004 00:00:00
0
 
mlmccCommented:
Try
{CMINV_INV_EXTRACT.VALUATION_DT} = DateTime ( {@tstyyyy},{@tstmm},{@tstdd},0,0,0)

mlmcc

0
 
mlmccCommented:
Another way


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

mlmcc



0
 
mlmccCommented:
Should have solved it.

mlmcc
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now