BusinessObjects Board

How to find data from date to date and ID

0

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}

   and 
   {ledgerdetails.Accountnamedr} = {?tran} or 
  {ledgerdetails.accountnamecr}={?tran} 

Also I tried

    {ledgerdetails.date} >= {?datef}

     and

    {ledgerdetails.date} <= {?dateto}

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


omi4u (BOB member since 2019-07-22)

Welcome to B:bob:B!

Which SAP Business Objects tool do you use? Crystal, WebI, Lumira, any other?


Marek Chladny :slovakia: (BOB member since 2003-11-27)

From the format of the code, it appears to be Crystal Reports. But to answer the question. There are couple of ways to filter for a date range. My preference is this:

{ledgerdetails.date} >= {?datef} and
{ledgerdetails.date} <= {?dateto}

and to avoid issues with the or statement. The whole filter should probably look something like this.

{ledgerdetails.date} >= {?datef} and
{ledgerdetails.date} <= {?dateto}
(
{ledgerdetails.Accountnamedr} = {?tran} or
{ledgerdetails.accountnamecr}={?tran}
)


kevlray :us: (BOB member since 2010-06-23)

[Moderator Note: Moved from General Discussion to Crystal Reports]


Marek Chladny :slovakia: (BOB member since 2003-11-27)