Currently Used Database fields on the report
Similar problem is how to retrieve all fields that are used on the report:
//'---------------------------------------------------------
//
// GetCurrentlyUsedDatabaseFields
//
// ICollection
// Get all used db fields from the report.
//
//'---------------------------------------------------------
private ICollection GetCurrentlyUsedDatabaseFields()
{
SortedList sortedlist = new SortedList();
string strShortFieldName;
Fields fields = _reportClientDocument.DataDefinition.ResultFields;
foreach(Field field in fields)
{
if(field.Kind == CrFieldKindEnum.crFieldKindDBField)
{
char period = '.';
int periodIndex = field.FormulaForm.IndexOf(period);
// parse out table and field name
strShortFieldName = field.FormulaForm.Substring(periodIndex+1, field.FormulaForm.Length-(periodIndex+2));
sortedlist.Add(field.FormulaForm, strShortFieldName);
}
}
return sortedlist;
}
2 Comments:
At 1:27 PM, Johnny said…
Glad to see someone is carrying on the war against erm something.
I used CR for a while but gave it up and went back to Java.
I really enjoyed how CSP was really ASP with their proprietary tags. hehe, Cheers!
At 10:07 AM, Branka said…
Well, version 9 that I'm using is ASP all over - I think that CSP tags were experiment in one of the older version... Problem is missing documentation for .NET now...
Post a Comment
<< Home