Quantcast
Viewing all articles
Browse latest Browse all 3636

How to implement Custom formula in Cross Tab Report

Hi,

 

I have used Cross tab on my report form to display Grades in columnwise. All works well except last column Total.. I want to use my own formula for calculation instead of crosstab like Sum of Column name.

 

We have requirement in our project to design report file which will looks give below (ref Image-1) using Crystal report functionality.

I have tried to design such kind of report file using cross tab feature of Crystal report and it almost works well except for last column TOTAL.

Cross tab functionality is used to display grades in column wise as they can be vary too.

 

Cross Tab Working :

Let’s say if we have column name as tag.Maths and Tag.Stat then crosstab by default do arithmetic calculation in Total field.. I mean it show sum of Tag.Maths and sum of Tag.Stat and display value

Mathematics Total = 30

Statistics Total = 45

 

KG-11

KG-12

TOTAL

MATHEMATICS

10

20

30

STATISTICS

20

25

45

Image -1

Report Requirement:

  1.   Display all grades KG-1 to KGn in column wise. And subjects in row manner.
  2.   Use custom formula for Total instead of Sum of()

Refer Image-2  for requirement of Total

I do not want to reliable on Crystal report arithmetic’s operation. I have separate formula to do calculation..

Example of Custom formula:

Mathematics Total = Column1 value * 1.1 + column2 value * 1.1 ….

Statistics Total = Column1 value * 1.2 + Column2 value * 1.2 …

Maths Total = 10*1.1 + 20*1.1 = 33

Stat Total =  20 * 1.2 + 25*1.2 =  54

 

KG-11

KG-12

TOTAL

MATHEMATICS

10

20

33

STATISTICS

20

25

54

Image-2

 

 

Can any one suggest way to handle calculation? Or way around to handle this? I can statically display columns as columns vary thats why used cross tab feature.

 

Thanks in advance,

 

Vaibhav


Viewing all articles
Browse latest Browse all 3636

Trending Articles