locked
XML Data Source RRS feed

  • Question

  • I'm wondering if there is a way to pass an XMLDocument to a report rather than querying the database to provide the data or using a web service to get the data for the report?

    I've created a report with a dataset of type XML and set the query string to the XML data.  This works great but it's static.  I want to pass the XML data to the report dynamically as an XMLDocument.  The XML data is simple (see example).  If I could only set the query string as a property of the report but I can't figure out whether it's possible or not.

    Any help would be appreciated!
    Wednesday, July 29, 2009 9:16 PM

Answers

  • That really depends on what "report" is and how it works. It it can accept XML (not XMLDocument which is just in memory representation of XML) then just save your data to an XML file and feed it to the "report".


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, July 29, 2009 10:42 PM

All replies

  • Here's an example of the XML data:

    - <Query>
    - <XmlData>
    - <Root>
    - <Job>
    - <Page>
      <WorkOrderNumber />
      <PurchaseOrderNumber />
      <WarehouseName />
      <ManufacturerDate>7/27/2009</ManufacturerDate>
      <KitNumber>testkit10</KitNumber>
      <ItemNumber>YAM0639060604-104-WS</ItemNumber>
      <ItemDescription>AM04_100.78_106HY-6-4/139HY-6-4</ItemDescription>
      <CustomerItemNumber>104IN_HoseAssembly</CustomerItemNumber>
      <CustomerItemDescription>(None)</CustomerItemDescription>
      <CustomerBinLocation>(None)</CustomerBinLocation>
      <OAL>104.00000000</OAL>
      <Diameter>0.2500</Diameter>
      <BundleNumber>(None)</BundleNumber>
      <Image />
      </Page>
    - <Page>
      <WorkOrderNumber />
      <PurchaseOrderNumber />
      <WarehouseName />
      <ManufacturerDate>7/27/2009</ManufacturerDate>
      <KitNumber>testkit10</KitNumber>
      <ItemNumber>YAM0639060604-104-WS</ItemNumber>
      <ItemDescription>AM04_100.78_106HY-6-4/139HY-6-4</ItemDescription>
      <CustomerItemNumber>104IN_HoseAssembly</CustomerItemNumber>
      <CustomerItemDescription>(None)</CustomerItemDescription>
      <CustomerBinLocation>(None)</CustomerBinLocation>
      <OAL>104.00000000</OAL>
      <Diameter>0.2500</Diameter>
      <BundleNumber>(None)</BundleNumber>
      <Image />
      </Page>
    - <Page>
      <WorkOrderNumber />
      <PurchaseOrderNumber />
      <WarehouseName />
      <ManufacturerDate>7/27/2009</ManufacturerDate>
      <KitNumber>testkit10</KitNumber>
      <ItemNumber>YAM0639060606-30</ItemNumber>
      <ItemDescription>AM06_26.78_106HY-6-6/139HY-6-6</ItemDescription>
      <CustomerItemNumber>30IN_HoseAssembly</CustomerItemNumber>
      <CustomerItemDescription>30IN_HoseAssembly</CustomerItemDescription>
      <CustomerBinLocation>NoBin</CustomerBinLocation>
      <OAL>30.00000000</OAL>
      <Diameter>0.3750</Diameter>
      <BundleNumber>NoBin</BundleNumber>
      <Image />
      </Page>
    - <Page>
      <WorkOrderNumber />
      <PurchaseOrderNumber />
      <WarehouseName />
      <ManufacturerDate>7/27/2009</ManufacturerDate>
      <KitNumber>testkit10</KitNumber>
      <ItemNumber>YAM0639060606-100</ItemNumber>
      <ItemDescription>AM06_96.78_106HY-6-6/139HY-6-6</ItemDescription>
      <CustomerItemNumber>100IN_HoseAssembly</CustomerItemNumber>
      <CustomerItemDescription>100IN_HoseAssembly</CustomerItemDescription>
      <CustomerBinLocation>NoBin</CustomerBinLocation>
      <OAL>100.00000000</OAL>
      <Diameter>0.3750</Diameter>
      <BundleNumber>NoBin</BundleNumber>
      <Image />
      </Page>
    - <Page>
      <WorkOrderNumber />
      <PurchaseOrderNumber />
      <WarehouseName />
      <ManufacturerDate>7/27/2009</ManufacturerDate>
      <KitNumber>testkit10</KitNumber>
      <ItemNumber>YAM0639060606-100</ItemNumber>
      <ItemDescription>AM06_96.78_106HY-6-6/139HY-6-6</ItemDescription>
      <CustomerItemNumber>100IN_HoseAssembly</CustomerItemNumber>
      <CustomerItemDescription>100IN_HoseAssembly</CustomerItemDescription>
      <CustomerBinLocation>NoBin</CustomerBinLocation>
      <OAL>100.00000000</OAL>
      <Diameter>0.3750</Diameter>
      <BundleNumber>NoBin</BundleNumber>
      <Image />
      </Page>
      </Job>
      </Root>
      </XmlData>
      </Query>
    Wednesday, July 29, 2009 9:20 PM
  • That really depends on what "report" is and how it works. It it can accept XML (not XMLDocument which is just in memory representation of XML) then just save your data to an XML file and feed it to the "report".


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Wednesday, July 29, 2009 10:42 PM
  • I ended up saving the xmlDocument to the database and getting the data with a stored proc. I didn't want to do this but I couldn't figure out a way to send the data directly to Reporting Services.
    Friday, August 7, 2009 9:59 PM