How can I access which fields are placed in a report design with Devexpress Xtrareport in C#?

89 views Asked by At

I have about 50 fields that users can add to their reports. I need to know which of these 50 fields users have placed in their designs on the report. Because sometimes these fields can be empty, I need to check this.

How can I access which fields are placed on report designs in c#?

Thank you very much in advance for your help.

enter image description here

I examined the forms on the devexpress side but I could not get this result.

1

There are 1 answers

3
Marko Juvančič On

Each band (Detail in your case) has property Controls. Iterate through it and check DataBinding of each control.

foreach (XRControl control in this.Detail.Controls) {
  if (control.DataBindings != null) {
    var binding = control.DataBindigs[0];
    
    // your logic here 
  }
}