maandag 23 september 2013

Crystal Reports: presenting data in a graphical way without a chart

Based on some simple data I tried to create a special graphical presentation:



Here are the data, an Excel sheet:


year number month amount
20091jan100
20092feb200
20093mrt100
20094apr200
20095mei-100
20096jun200
20097jul100
20098aug200
20099sep-200
200910okt200
200911nov100
200912dec200
20101jan100
20102feb200
20103mrt100
20104apr200
20105mei-100
20106jun200
20107jul100
20108aug200
20109sep-200
201010okt200
201011nov100
201012dec200
20111jan100
20112feb200
20113mrt100
20114apr200
20115mei-100
20116jun200
20117jul100
20118aug200
20119sep-200
201110okt200
201111nov100
201112dec200
20121jan100
20122feb200
20123mrt100
20124apr200
20125mei-100
20126jun200
20127jul100
20128aug200
20129sep-200
201210okt200
201211nov100
201212dec200

Furthermore, I created two formula fields.

Blockleft:

if {Sheet1_.amount}>0 then
    replicatestring(chrw(110),abs({Sheet1_.amount}\10))

Blockright:

if {Sheet1_.amount}<=0 then
   replicatestring(chrw(110),abs({Sheet1_.amount}\10))

  • In the Details section I put  the fields Blockright, Month, Blockleft.
  • The fields Blockright and Blockleft I gave the font WingDings.
  • Blockright should be right aligned and Blockleft left aligned.
  • Blockright should get the color red; Blockleft the color green.
  • I grouped on Year.
  • The rows I colored alternating using the formula:
if recordnumber mod 2 = 0 then
    color(255,255,200)
else
    color(255,200,255)


Een reactie posten