Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9159

Format summary field

$
0
0

Hi,

I need to put the summary field in group footer area and format it. I saw this discussion How to format the summary field in GROUP? but how to do this: "use FieldObject class and embed the summary field's primary detail to FieldObject" programmatically.


I tried this but it doesn't work:


CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject fi = new CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject();

fi.Left = 500;

CrystalDecisions.ReportAppServer.DataDefModel.SummaryField summaryField = new CrystalDecisions.ReportAppServer.DataDefModel.SummaryField();

 

summaryField.SummarizedField = fieldToSummarize;

summaryField.Group = boGroup;

summaryField.Operation = (CrystalDecisions.ReportAppServer.DataDefModel.CrSummaryOperationEnum)elem.TypeCumul;

fi =(CrystalDecisions.ReportAppServer.ReportDefModel.FieldObject) summaryField; // this line generates error

                           

report.DataDefController.SummaryFieldController.Add(indexSummaryField, summaryField);

report.ReportDefController.ReportObjectController.Add(fi, section2, -1);


Thanks in advance.


Viewing all articles
Browse latest Browse all 9159

Trending Articles



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