Sunday, March 11, 2012

Export to XML from Report - is this possible

Hello All,
I've got some data which is grouped using a table. The output of the report
looks Ok, however the output when exported to XML from the viewer needs to be
formatted specifically. The current output seems to add extra tags in which
is not required. The format of the XML should be smothing like this. Is it
possible to get something like this out of the box in SQL RS.
<Regions>
<RegionDetails>
<Region>Agricultural Region</Region>
<CandidateGroups>
<CandidateGroupTicketDetails>
<Group>Australian Labor Party</Group>
<Ticket>VOTING TICKET FOR: Australian Labor Party</Ticket>
<CandidateDetails>
<BallotPaperName>Ken Dones</BallotPaperName>
</CandidateDetails>
<CandidateDetails>
<BallotPaperName>Ken Dids</BallotPaperName>
</CandidateDetails>
</CandidateGroups>
</RegionDetails>
</Regions>
An example of extra tags is shown here:
<Regions> <-- This is extra an not required
<Regions>
<RegionDetails>
<Region>Agricultural</Region>
<CandidateGroups>
<CandidateGroupTicketDetails>
<Group>Liberal</Group>
<Ticket>VOTING TICKET FOR: Liberal</Ticket>
<CandidateDetails_Collection> <-- This is extra and not
required
<CandidateDetails>
<BallotPaperName>Ken Dones</BallotPaperName>
</CandidateDetails>
<CandidateDetails>
<BallotPaperName>ken Didd</BallotPaperName>
</CandidateDetails>Nick,
You can specify an XSLT to accompany your report and get the resultant
XML formatted anyway you like.
Andy Potter|||Currently just using standard settings in the report to get the tags I want
I haven't used XSLT - are there examples around for aplying this report
server output.
The users just use Save As to export as XML, how does XSLT get applied then.
Is there a setting in the reprt itself
"Potter" wrote:
> Nick,
> You can specify an XSLT to accompany your report and get the resultant
> XML formatted anyway you like.
> Andy Potter
>

No comments:

Post a Comment