Creating a table with dynamic columns

Stimulsoft Reports.Flex discussion
Locked
davidmeddings
Posts: 3
Joined: Mon Apr 29, 2019 9:47 am

Creating a table with dynamic columns

Post by davidmeddings »

Hi,

I'm trying to create a report in table format from a dynamically generated XML file.

The report should look like the attached image and sample XML data below.

Most of the columns are dynamic meaning that column header labels can change and the total amount of columns can change also.

I'm fine with loading the data in but i'm not sure what components to use in the report builder to achieve this.

Code: Select all

 <history>
    <history>
      <address>Bcontract Ltd Bridge St, WS1 1HP</address>
      <BTflyVent>0xB22D00</BTflyVent>
      <Cill>0xFFFFFF</Cill>
      <CMoS>0x00B200</CMoS>
      <contractId>142</contractId>
      <contractName>Benx - Lonsdale Chambers</contractName>
      <CSoM>0xB22D00</CSoM>
      <masterClientAddress5>WS1 1HP</masterClientAddress5>
      <masterClientDateSurveyed>2019-04-17</masterClientDateSurveyed>
      <masterClientFullname>Survey 2</masterClientFullname>
      <masterClientId>190</masterClientId>
      <percentComplete>0</percentComplete>
      <PoS>0x00B200</PoS>
      <surveyorId>9</surveyorId>
    </history>
    <history>
      <address>Bcontract Ltd Bridge St, WS1 1HP</address>
      <BTflyVent>0x00B200</BTflyVent>
      <Cill>0x00B200</Cill>
      <CMoS>0x00B200</CMoS>
      <contractId>142</contractId>
      <contractName>Benx - Lonsdale Chambers</contractName>
      <CSoM>0x00B200</CSoM>
      <masterClientAddress5>WS1 1HP</masterClientAddress5>
      <masterClientDateSurveyed>2019-04-23</masterClientDateSurveyed>
      <masterClientFullname>Survey 3</masterClientFullname>
      <masterClientId>198</masterClientId>
      <percentComplete>0</percentComplete>
      <PoS>0x00B200</PoS>
      <surveyorId>9</surveyorId>
      <VTPSeals>0x00B200</VTPSeals>
    </history>
    <history>
      <address>Bcontract Ltd Bridge St, WS1 1HP</address>
      <BTflyVent>0xFFFFFF</BTflyVent>
      <Cill>0xB22D00</Cill>
      <CMoS>0x00B200</CMoS>
      <contractId>142</contractId>
      <contractName>Benx - Lonsdale Chambers</contractName>
      <CSoM>0xB22D00</CSoM>
      <LScutsO>0x00B200</LScutsO>
      <masterClientAddress5>WS1 1HP</masterClientAddress5>
      <masterClientDateSurveyed>2019-04-26</masterClientDateSurveyed>
      <masterClientFullname>Survey 4</masterClientFullname>
      <masterClientId>219</masterClientId>
      <percentComplete>0</percentComplete>
      <PoS>0x00B200</PoS>
      <surveyorId>9</surveyorId>
      <VTPSeals>0x00B200</VTPSeals>
    </history>
    <history>
      <address>Bcontract Ltd Bridge St, WS1 1HP</address>
      <BTflyVent>0x00B200</BTflyVent>
      <Cill>0xFFFFFF</Cill>
      <CMoS>0x00B200</CMoS>
      <contractId>142</contractId>
      <contractName>Benx - Lonsdale Chambers</contractName>
      <CSoM>0xB22D00</CSoM>
      <IsizeG200>0x00B200</IsizeG200>
      <LScutsO>0xB22D00</LScutsO>
      <masterClientAddress5>WS1 1HP</masterClientAddress5>
      <masterClientDateSurveyed>2019-04-23</masterClientDateSurveyed>
      <masterClientFullname>Survey 1</masterClientFullname>
      <masterClientId>142</masterClientId>
      <MfixType>0x00B200</MfixType>
      <percentComplete>0</percentComplete>
      <PoS>0x00B200</PoS>
      <STatAbut>0x00B200</STatAbut>
      <StressP>0x00B200</StressP>
      <surveyorId>9</surveyorId>
      <VTPSeals>0x00B200</VTPSeals>
    </history>
  </history>
Attachments
Capture.PNG
Capture.PNG (19.8 KiB) Viewed 16093 times
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: Creating a table with dynamic columns

Post by Lech Kulikowski »

Hello,

Unfortunately, with the current data structure, it is not possible.
You can try to place all dynamic columns in a separate table and then use Cross-Data component for that task.

Thank you.
davidmeddings
Posts: 3
Joined: Mon Apr 29, 2019 9:47 am

Re: Creating a table with dynamic columns

Post by davidmeddings »

Hello,

My data structure can be changed to suit the reports needs. What data structure would work?

Thanks.

David
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: Creating a table with dynamic columns

Post by Lech Kulikowski »

Hello,

please check the sample report in the attachment. Will work with any count of dynamic columns.

Thank you.
Attachments
Annotation 2019-05-03 113851.jpg
Annotation 2019-05-03 113851.jpg (234.08 KiB) Viewed 16049 times
ReportSample.mrt
(13.07 KiB) Downloaded 1167 times
davidmeddings
Posts: 3
Joined: Mon Apr 29, 2019 9:47 am

Re: Creating a table with dynamic columns

Post by davidmeddings »

Hello,

Thank you for providing that solution. That's exactly what i'm looking for.
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: Creating a table with dynamic columns

Post by Lech Kulikowski »

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
Locked