Skip to Content
0
Jan 09, 2020 at 10:59 AM

Bug in ReportObjectController.Modify?

75 Views

I am trying to Change the Color of an ISCRTextObject as follows.

CrystalDecisions.CrystalReports.Engine.ReportDocument rd = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
rd.Load(fileName);

ISCDReportClientDocument rcd = rd.ReportClientDocument;
ReportObjects allObjects = rcd.ReportDefController.ReportObjectController.GetAllReportObjects();
foreach (ReportObject o in allObjects)
{
   if (o.Kind == CrReportObjectKindEnum.crReportObjectKindText)
   {
       ISCRTextObject to = (ISCRTextObject)o;
       to.FontColor.Color = 255;
       rcd.ReportDefController.ReportObjectController.Modify(o, to);
   }
}

This works well! But if the text of the ISCRTextObject contains a forced line break only the first line has Color 255, all following lines remain black! See ISCRTextObject1. Any idea?

Attachments

k1w2u.png (5.3 kB)