0

データを日付別に列にグループ化するクロス集計コントロールを使用してレポートを作成しました。今月の1日(レポートの実行時)より前のすべての日付を取得し、それらとデータを[前へ]という1つの列にまとめたいと思います。

したがって、このようなものを見る代わりに:

Oct Nov Dec Jan Feb Mar Apr May Jun Jul

私はこのようなものを見ました:

Previous Jan Feb Mar Apr May Jun Jul

CR XIでこれを行う方法はありますか?

4

2 に答える 2

1

これを行うには、数式を作成する必要があります(または、正しい順序で取得するための数式と、正しい文字列を表示するための数式が2つあります)。

グループ化式:if {table.datefield} < currentdate then '0000' else cStr({table.datefield}, 'yyMM')

数式の表示:if {table.datefield} < currentdate then 'Previous' else cStr({table.datefield}, 'MMM')

スクリーンショットを追加

ここに画像の説明を入力してください

ここに画像の説明を入力してください

于 2013-01-09T09:42:56.520 に答える
0

答えは実際にはリーの答えの修正でした。

if {Command.ReqDate} < date(year({?StartDate}),month({?StartDate}),1) then dateadd('m',-1,{?StartDate}) else {Command.ReqDate}

use this to group on in the CT set to monthly
right click on the column header
select Format field,
select common tab
select display string formula
if currentfieldvalue < date(year({?StartDate}),month({?StartDate}),1) then 'previous' 
else totext(currentfieldvalue,'MMM')
于 2013-01-29T17:51:59.930 に答える