Return XML from Sql Server Stored Proc : I want to generate XML from SQL Query in the below format..

      <Reports>
      <Header>
      <PrintedBy>XYZ </PrintedBy>
      <PrintedDate>22/01/2015</PrintedDate>
      <Image>C:/Img/a.png</Image>
      <Title>Title</Title>
      </Header>
      <Report>
      <Name>123</Name>
      <UserName></UserName>
      <Remarks></Remarks>
      <IPAddress>0.0.0.0</IPAddress>
      <DateCreated>2016-02-24T18:32:11.803</DateCreated>
      <AppID>BOS</AppID>
      <AppVersion>0.0.3.0</AppVersion>
      <LastLoggedin>2016-06-23T16:04:07.167</LastLoggedin>
      </Report>
      <Report>
      <Name>123</Name>
      <UserName></UserName>
      <Remarks></Remarks>
      <IPAddress>0.0.0.0</IPAddress>
      <DateCreated>2016-02-25T10:22:34.623</DateCreated>
      <AppID>BOS</AppID>
      <AppVersion>0.0.3.0</AppVersion>
      <LastLoggedin>2016-06-23T16:04:07.167</LastLoggedin>
      </Report>
      </Reports>
Header row should be printed only once, should not repeat with each report row.

        

     