Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
in Search
Welcome to AspAdvice Sign in | Join | Help

Programatically determine if a table field has been used in a report

Last post 06-13-2007, 9:24 AM by Adam2002. 1 replies.
Sort Posts: Previous Next
  •  05-30-2006, 10:32 PM 18187

    Programatically determine if a table field has been used in a report

    Hi,

    First time get on this forum. Hope to get an answer with a CR .net SDK question.

    I am trying to find a way to programatically determine if a table field has been displayed on a report canvas or used in a formula. I tried to use a method called useCount() inherited from the fieldDefinition class. But the useCount of any given field always shows 1 no matter if it really used in the report or not. Somewhere on the BO site tells me this useCount property has been deprecated. I have looked all over the SDK for a replacement method to do the same thing. No luck so far! Is there anyone know how else would I accomplish this without using the useCount property?

    thanks in advance
  •  06-13-2007, 9:24 AM 31829 in reply to 18187

    Re: Programatically determine if a table field has been used in a report

    Does anyone have a solution to the above question that flozee posed? I am trying to deal with the same issue. I need to find out which database fields are actually used in a report. I iterate through the tables collection of a reportdocument and for each field check the usecount property. However as indicated above and detailed here - http://technicalsupport.businessobjects.com/Publishing/998/c2017430_f.html this property has a bug that always returns 1. The workaround given in that knowledge base article is to iterate through the ReportObjects collection. However that doesn't work with reports that have charts or crosstab objects.

     So my question is is there another way of knowing reliably which fields are used in a report. Im using Crystal 11.

     Thanks

View as RSS news feed in XML