Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 28687

How to Edit XML (Report model XML)

$
0
0
I am assigned to maintain a SQL Server Report Builder Datamodel, I am a newbie to SSRS .The requirement came was --Hovering (mouse pointing over datamodel attribute)  should include description along with the attibute name.

eg: If the move the mouse over an attribute called "Status" in report builder , it should show something like" Status indicates if this person is active (A) or non active (N)".The client want description for all the fields like this so that the report building can be done by any newbie to the system. So the solution I found was putting the detailed description of the attribute under the description property of the attribute so that when the report builder place the mouse over the attribute it will show the description as well for about 5-6 seconds. My problem is the volume of change-- there are around 3000 attributes in the model (.smdl file which is a xml file), and changing one property at a time is a not a good efficient solution.Is it possible to do it programatically.

Is there a way by which I can write a function to retrive the property value from a table or a config file in the format  PROPERTY - DESCRIPTION.  Thanks in advance.

     <Attribute ID="G4c173b36-19fb-421a-b260-c9ab35622cdb">

              <Name>Branch</Name>

             <Description>This is the Branch description</Description>

              <DataType>Integer</DataType>

              <Nullable>true</Nullable>

              <SortDirection>Descending</SortDirection>

              <Width>2</Width>

              <Format>g</Format>

              <DiscourageGrouping>true</DiscourageGrouping>

              <ValueSelection>Dropdown</ValueSelection>

              <Column Name="Branch" />

            </Attribute>

There is one more issue with Attribute property. The property tag is created only if there is value, else the node itself is not created in .smdl (model XML file).

eg: If you do not give any description for status it will be like

              <Format>g</Format>

              <DiscourageGrouping>true</DiscourageGrouping>

              <ValueSelection>Dropdown</ValueSelection>

              <Column Name="Branch" />

            </Attribute>

            <Attribute ID="Gd60fff67-d88c-4dea-a18c-83e5075f7637">

              <Name>Status</Name>

              <DataType>String</DataType>

              <Nullable>true</Nullable>

              <SortDirection>Ascending</SortDirection>

              <Width>10</Width>

              <ValueSelection>Dropdown</ValueSelection>

              <Column Name="Status" />

            </Attribute>

            <Attribute ID="G13cabe95-c542-4e80-8dcd-f8cf4032b35a">

              <Name>Organization Account</Name>

              <DataType>String</DataType>

The description tag gets created only when the description is added manually from the property window.

              <ValueSelection>Dropdown</ValueSelection>

              <Column Name="Branch" />

           </Attribute>

            <Attribute ID="Gd60fff67-d88c-4dea-a18c-83e5075f7637">

              <Name>Status</Name>

              <Description>this is a test status</Description>

              <DataType>String</DataType>

              <Nullable>true</Nullable>

              <SortDirection>Ascending</SortDirection>

              <Width>10</Width>

              <ValueSelection>Dropdown</ValueSelection>

              <Column Name="Status" />

            </Attribute>

            <Attribute ID="G13cabe95-c542-4e80-8dcd-f8cf4032b35a">

              <Name>Organization Account</Name>

              <DataType>String</DataType>

So my task will be

1) Create a tag <Description> for all the attributes (around 500+)

2)Insert value for these tags -- with values from a file / table

Can you please suggest a solution for this.


Viewing all articles
Browse latest Browse all 28687

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>