I have a crystal report 4.6 where the selection formula for record read as follows:
{SALES_ORDER_MASTER.CUSTOMER_NO}="AB1" AND
{SALES_ORDER_MASTER.INV_DATE} IN DATE(2001,01,01) TO DATE(2001,03,28) AND
{SALES_ORDER_TRANSACTIONS.TRANS_TYPE}=1
It works fine.
I put this formula in Vb 5.00 with the following modifications:
CRYSTALREPORT1.SELECTIONFORMULA= _
"{SALES_ORDER_MASTER.CUSTOMER_NO}='"& COMBO1.TEXT &"' AND" _
& " {SALES_ORDER_MASTER.INV_DATE} IN "'& text1.text & "'" _ & " TO "'& text1.text & "' AND"_
&" {SALES_ORDER_TRANSACTIONS.TRANS_TYPE}=1"
It gives error in formula
Text1.text and Text2.text are input from calender control.
function- isdate(text1.text) returns True
I tested the statement for customerno and trans_type.
They work fine. Now the problem is date format.
Please correct my code for my mistakes.
{SALES_ORDER_MASTER.CUSTOMER_NO}="AB1" AND
{SALES_ORDER_MASTER.INV_DATE} IN DATE(2001,01,01) TO DATE(2001,03,28) AND
{SALES_ORDER_TRANSACTIONS.TRANS_TYPE}=1
It works fine.
I put this formula in Vb 5.00 with the following modifications:
CRYSTALREPORT1.SELECTIONFORMULA= _
"{SALES_ORDER_MASTER.CUSTOMER_NO}='"& COMBO1.TEXT &"' AND" _
& " {SALES_ORDER_MASTER.INV_DATE} IN "'& text1.text & "'" _ & " TO "'& text1.text & "' AND"_
&" {SALES_ORDER_TRANSACTIONS.TRANS_TYPE}=1"
It gives error in formula
Text1.text and Text2.text are input from calender control.
function- isdate(text1.text) returns True
I tested the statement for customerno and trans_type.
They work fine. Now the problem is date format.
Please correct my code for my mistakes.