SAP Knowledge Base Article - Public

1650615 - Is it possible to browse data in a formula field placed inside a Crystal report using the Report Application Server (RAS) .NET SDK?

Symptom

Is it possible to browse data in a formula field placed inside a Crystal report using the Report Application Server (RAS) .NET SDK?

Environment

  • 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();
        rd.Load(Server.MapPath("Mithal803264.rpt"));
        rcd = rd.ReportClientDocument;
        ISCRField iscrfield=(ISCRField) rcd.DataDefController.DataDefinition.FormulaFields[0];
        rcd.RowsetController.BrowseFieldValues(iscrfield,10);
        } browsefield.PNG

Resolution

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. 

 

Keywords

ras cr .net access runtime , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Product Enhancement

Product

Crystal Reports 2008 V0 ; Crystal Reports 2008 V1