Is it possible to browse data in a formula field placed inside a Crystal report using the Report Application Server (RAS) .NET SDK?
- Visual Studio 2008
- Crystal Reports 2008
Reproducing the Issue
- Run the code shown in the below snapshot in an attempt to access data in a formula field.
- Note the exception thrown with message stating that the field cannot be browsed.
protected void Page_Load(object sender, EventArgs e)
rd = new ReportDocument();
rcd = rd.ReportClientDocument;
ISCRField iscrfield=(ISCRField) rcd.DataDefController.DataDefinition.FormulaFields;
It is not possible to browse a formula field using the RAS or Crystal reports .NET SDK.
The reason for this is that the rowset controller only stores data from the database which it currently needs for efficiencies sake. Items like database field values are stored.
Report objects that can be calculated, like formulas, are calculated when the report is generated. This is doubly important as the values could change while the report is printing due to things like UFLs, formulas based on current date time, random number functions, current date and the like.
The rowset controller doesn’t store data in calculated fields such as formulas for efficiencies sake.
ras cr .net access runtime , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Product Enhancement