简体   繁体   中英

Crystal Reports 13: Trying to grab past 8 months data from report via Formula (Oracle database)

I have a report that asks for a start date and end date, grabs the Data from our ERP system(Oracle) and then outputs the data according to those date parameters. I want to remove the parameters and hardcode a formula that shows past 8 months data. The Crystal Reports table has only one date field I and use called: Date ({TR_BATCH.TIME_STAMP}) I believe I can add a statement to that to show only past 8 months data and save the report as the Past_8_Months report. However, I'm not sure how to code that in. I'm sure it's a fairly simple statement, but I've only worked mostly with select expert and filters within Crystal. Thanks!

I tried using the Select Expert Record , in period xxxx but it doesn't show period of past 8 months.

Date ({TR_BATCH.TIME_STAMP})

No results because I'm unsure of the correct code to use.

IDK how your query is defined in sql reports, the following clause will subtract 8 months from the current date ( or replace sysdate with some other report date parameter).

select stuff....
from ... stuff...
where ...  add_months(trunc(sysdate,'mm'),-8)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM