Convert date to Integer for Cognos Drill Through
We can pass dates as number for drill through report if there is range filter is involved from in built date prompt:
Steps:
1. In Detail report, Create data item where filter is
applied on date range
[IntegerDate]
extract(year,[Date1])
*10000 + extract(month,[Date1])*100+extract(day,[Date1])
2. In Detail report, Apply filter - [IntegerDate] between
?date1? and ?date2?
3. In Summary report list query add below data items:
Start Date:
extract(year,[date1]) *10000
+ extract(month,[date1])*100+extract(day,[date1])
End Date:
extract(year,[date2]) *10000
+ extract(month,[date2])*100+extract(day,[date2])
4. Update Drill through to pass new data items for
?date1? and ?date2?
For single date passing via
value prompt, it can be passed as To_Char/cast to compare and pass.