summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpshi2011-11-23 03:57:35 (EST)
committer mwu2011-11-23 03:57:35 (EST)
commit45c8c0aaa44f826e58bbe3ca1fe6afcc769b1ad0 (patch)
tree2ee7afec39ab134d4c544dc8e419c72140250323
parente4530c6df0bb43a8f22d2c9c789cfe074b16359f (diff)
downloadorg.eclipse.birt-45c8c0aaa44f826e58bbe3ca1fe6afcc769b1ad0.zip
org.eclipse.birt-45c8c0aaa44f826e58bbe3ca1fe6afcc769b1ad0.tar.gz
org.eclipse.birt-45c8c0aaa44f826e58bbe3ca1fe6afcc769b1ad0.tar.bz2
set current flag for current period from n periods ago calculation type
-rw-r--r--data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/ModelAdapter.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/ModelAdapter.java b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/ModelAdapter.java
index 3c7dd59..3c24207 100644
--- a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/ModelAdapter.java
+++ b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/ModelAdapter.java
@@ -569,7 +569,17 @@ public class ModelAdapter implements IModelAdapter
break;
}
}
- baseTimePeriod = new TimePeriod( 0, DataAdapterUtil.toTimePeriodType( period1 ) );
+ if ( IBuildInBaseTimeFunction.CURRENT_PERIOD_FROM_N_PERIOD_AGO.equals( calculateType ) )
+ {
+ baseTimePeriod = new TimePeriod( 0,
+ DataAdapterUtil.toTimePeriodType( period1 ),
+ true );
+ }
+ else
+ {
+ baseTimePeriod = new TimePeriod( 0,
+ DataAdapterUtil.toTimePeriodType( period1 ) );
+ }
}
else if ( IBuildInBaseTimeFunction.TRAILING_N_PERIOD_FROM_N_PERIOD_AGO.equals( calculateType ) )
{