Link to home
Start Free TrialLog in
Avatar of rhservan
rhservanFlag for United States of America

asked on

What's wrong with my SSRS XML File report?

Problem: The file name is Test.xml and I cannot get it to integrate as datasource and query it in my ssrs report.

Below is the contents of the XML file:

<Query>
  <XmlData>
    <Root>
      <ID RecordID="1">
        <Name>TRIF</Name>
        <Target>1.08</Target>
        <YTD>2.4</YTD>
        <FY_FCST>1.2</FY_FCST>
        <Comments>6 Incidents YTD; 3 Snow and Ice related - excluded TRIF = 1.20; No further incidents TRIF est. 1.20; May 8 - reported June 17: Potential Recordable potential Chemical exposure - fume hood; improper PPE - Investigating.</Comments>
      </ID>
      <ID RecordID="2">
        <Name>SIF</Name>
        <Target>0.33</Target>
        <YTD>0.4</YTD>
        <FY_FCST></FY_FCST>
        <Comments>1 SIF YTD (Back injury - slip from ladder); 3 SIF Near Miss - LOTO related 2 in JF1 and 1 NE Gas Property;</Comments>
      </ID>
      <ID RecordID="3">
        <Name>Name 3</Name>
        <Target></Target>
        <YTD></YTD>
        <FY_FCST></FY_FCST>
        <Comments></Comments>
      </ID>
      <ID RecordID="4">
        <Name>Name 4</Name>
        <Target></Target>
        <YTD></YTD>
        <FY_FCST></FY_FCST>
        <Comments></Comments>
      </ID>
      <ID RecordID="5">
        <Name>Name 5</Name>
        <Target></Target>
        <YTD></YTD>
        <FY_FCST></FY_FCST>
        <Comments></Comments>
      </ID>
    </Root>
  </XmlData>
</Query>

Open in new window


Steps performed in SSRS
1. Create the datasource in report manager as Test_local
        http//localhost/temp/Test.xml
2. In designer I create the datasource as Test_local
3. In designer I create the dataset
      -Select the datasource Test_local
      - In the query window I type <Query />
4. Execute Query Designer.

At this point I receive an error "Failed to perpare web request for the specified URL.(mscorlib)

Also, If I copy the text from the file and run it as code in the query window it runs successfully.
ASKER CERTIFIED SOLUTION
Avatar of Nico Bontenbal
Nico Bontenbal
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rhservan

ASKER

I do have a problem with the the file location.  Does it need to be accessed through IIS or can it just be located in a file directory and what syntax is required?


http//localhost/temp/Test.xml
E:\temp\Test.xml
\\<server name>\temp\Test.xml

?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I've deleted the file from dropbox. The link https://dl.dropboxusercontent.com/u/6977672/Test.xml no longer works.