Quantcast
Viewing all articles
Browse latest Browse all 3636

Field not found error when trying to modify a report object

I am using SAP Crystal Reports for Visual Studio SP5.

When I try to modify a Text Object using RAS I get a "Field not found" error.

 

My code look like this:

 

            ReportDocument reportDoc = new ReportDocument();

            reportDoc.Load(filePath);

 

            var reportClientDoc = reportDoc.ReportClientDocument;

            foreach (var obj in reportClientDoc.ReportDefController.ReportObjectController.GetAllReportObjects())

            {

                if (obj is CrystalDecisions.ReportAppServer.ReportDefModel.TextObject2)

                {

                    var textObj = (CrystalDecisions.ReportAppServer.ReportDefModel.TextObject2)obj;

                    reportClientDoc.ReportDefController.ReportObjectController.Modify(textObj, textObj);

                }

            }

 

 

This is only happening if I have a Text Object in the Report Footer section that has an embedded "Horizontal Page Number" special field embedded in it. The problem does not occur if I place this Text Object in any other section and also it does not occur if I remove the "Horizontal Page Number" special field.

 

Any idea what the problem might be?


Viewing all articles
Browse latest Browse all 3636

Trending Articles