I am working on my company's ledger and my accounts department need a search ledger by COA id with from date to date.

I am able to find the record from date to date but when I write the code for COA ID, then it ignore the date formula.

Below is my complete code that I tried

 {ledgerdetails.date} in {?datef}to{?dateto}

       {ledgerdetails.Accountnamedr} = {?tran} or 

I also tried

{ledgerdetails.date} >= {?datef}


        {ledgerdetails.date} <= {?dateto}

For the backend, I'm using vb.net and MS SQL.