Skip to Content
avatar image
Former Member

XL Reporter : Date critaries aren't working correctly

Hi,

yesterday I found a bug in my reports. I wanted to show all transactions between two dates : 08/01/07 and 08/14/07 but the query retrieves records it shouldn't

FACT JOU( RefDate >= @Date1 And RefDate <= @Date2 And TransTypeCode = "ARInvoice" Or TransTypeCode = "ARCreditMemo" Or TransTypeCode = "CashReceipt" ) Group By JOU.RefDate ,JOU.TransTypeCode ,FIG.OJDT_BaseRef ,FIG.OJDT_Ref1 ,FIG.OJDT_Ref2

But when I do a similar SQL query using the cast as Datetime, it works perfectly. Isn't there a way to do something like this with XL Reporter ?

select RefDate,Memo from dbo.OJDT where RefDate >= cast('05/01/2007' as Datetime) and RefDate <= cast('08/14/2007' as Datetime) and TransId in (select TransId from OJDT where Memo like 'A/R I%' or Memo like 'A/R C%' or Memo like 'Inc%')

Is anyone had the same kind of problems as me with dates ? Do you have any solutions.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Aug 20, 2007 at 11:48 PM

    Make the parameter a Literal Type with the Date type

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 16, 2007 at 05:43 PM

    It seems critaries doesn't work with dimension, I changed it for a light dimension and the report works correctly. I don't understand why...

    Add comment
    10|10000 characters needed characters exceeded