Quantcast
Channel: Jive Syndication Feed
Viewing all articles
Browse latest Browse all 10881

Crystal Reports Cross-Tab

$
0
0

Hello,

 

I was asked to create a report which summarizes the sum of checks, the count of the customers paid the checks, and the count of the checks which are due within the selected month and year. Also, I was asked to make the summary divided into periods for example 5 days.

 

screenshot.png


In this case, the report should show the sum of checks, the count of the customers paid the checks, and the count of the checks which are due in November 2014. The summary is divided into periods of 5 days as the following:

 

screenshot2.png

 

If the period is 10 days, the report will be as the following:

 

screenshot3.png

 

I used the following formula as Cross-Tab Columns Formula:

Ceiling (day({Command.CheckDate})/{?days}) // This formula name is d which will be used in another formula later

 

DayFormula (d)    DayFormula (d)     DayFormula (d)
11113215
21123225
31133235
41143245
51153255
62164266
72174276
82184286
92194296
102204306
317

 

Here is the result:

 

screenshot5.png

 

 

To make the column header more meaningful, I added the following formula into the Cross-Tab Group Options > Group Name Formula as shown in the screenshot:

 

screenshot4.png

 

if ({@d}-1)*{?days}+1=Day(DateAdd("d",-1,DateAdd ("m",1 , Date ({?Year},{?Month} ,1 )))) then

// The first day in the period = the last day in the month then show only that day for example 31

CSTR(({@d}-1)*{?days}+1,0)

 

 

Else if {@d}*{?days}>Day(DateAdd("d",-1,DateAdd ("m",1 , Date ({?Year},{?Month} ,1 )))) then

// The last day in the period > The last day in the month then show the beginning of the period with ++ for example if the period is 7 days then the last period will be 29++

CSTR(({@d}-1)*{?days}+1,0)+"++"

 

Else

CSTR(({@d}-1)*{?days}+1,0)+"-"+Cstr(({@d})*{?days},0)

 

 

The final result as the following:

screenshot2.png

 

 

 

 

I hope this was helpful

 

Best regards,

Alaa


Viewing all articles
Browse latest Browse all 10881

Trending Articles



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