Quantcast
Channel: SCN : Discussion List - SAP BusinessObjects Web Intelligence
Viewing all articles
Browse latest Browse all 5402

Filter not working

$
0
0

Hi,

 

The code below is working for all records but its not working for "Last month" and "Current month" values. If I select "Last month" when running the report query, its not showing last month records instead showing all the records. Can you please advise?

 

to_char(fffdate, 'yyyymmdd') >= decode(@Prompt('Select time for which to run the report(or * for all):', 'A', {'Current Month', 'Last Month','*'}, MONO, CONSTRAINED,persistent,{'*'},User:0)                              

                                              , '*', '*'

                                              , 'Current Month', to_char((select sysdate from sys.dual), 'YYYYMM') || '01'

                                              , 'Last Month', to_char(add_months((select sysdate from sys.dual), -1), 'YYYYMM') || '01'

)

AND

to_char(fffdate, 'yyyymmdd') < decode(@Prompt('Select time for which to run the report(or * for all):', 'A', {'ALL','Current Month', 'Last Month','*'}, MONO, CONSTRAINED,persistent,{'*'})                                      

                                             , '*', '*'

                                             , 'Current Month', to_char(add_months((select sysdate from sys.dual), 1), 'YYYYMM') || 01

                                             , 'Last Month', to_char((select sysdate from sys.dual), 'YYYYMM') || '01'

                                            

) '*' = '*'

 

Thanks.


Viewing all articles
Browse latest Browse all 5402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>