0

We use ReportViewer to generate our reports. I'm attempting to automate checking reports. However, the HTML that is generated by the system is... both intense and difficult to navigate. Nested tables, no classes or IDs, that sort of thing.

Is it at all possible for someone to add class or ID attributes to the RDL file that controls the report, so that I can find things in the table more easily?

For an example:

  <Fields>
    <Field Name="Date">
      <DataField>Date</DataField>
    </Field>
  </Fields>

I would want to add an attribute like ID=Date to the Field key there. So that when the table is generated, that TD element that contains the date also has id="Date".

(Or anything. Right now, the HTML is a jumbled mess, and tracking down the XPATH to an area makes me want to flip tables.)

Is this even possible?

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
XtinaS
  • 194
  • 3
  • 15

1 Answers1

0

One idea might be to add very unique data points to your report test data (guid or special dates etc) to make it easier to navigate the xml.

If your table looks like this

<table>
<tr>
  <td>dddd-dddd-2222-dddd</td>
</tr>
</table>

Your xpath can potentially be less complex since you can leverage the unique value when creating your expressions.

Unsure if you can add to the rdl xml since the schema is validated.

TGH
  • 38,769
  • 12
  • 102
  • 135