Todd Klosnick
Todd Klosnick

Reputation: 1

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.

Upvotes: 0

Views: 56

Answers (1)

OldProgrammer
OldProgrammer

Reputation: 12169

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)

Upvotes: 0

Related Questions