cancel
Showing results for 
Search instead for 
Did you mean: 

XL Reporter : Date critaries aren't working correctly

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

former_member346201
Active Participant
0 Kudos

Make the parameter a Literal Type with the Date type

Answers (1)

Answers (1)

Former Member
0 Kudos

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...