Rendering in XML ?

  • Hi,

     

    I haven't used the Export to XML function and wondering if anyone has used it, and can share how to setup my data in the report so it renders correctly

    Here is a sample any info/links etc would be helpful

    Thanks

    Joe

    <?xml version="1.0" encoding="utf-8"?>
    <!-- Created with Liquid Technologies Online Tools 1.0 (https://www.liquid-technologies.com) -->
    <clients xmlns="http://casetivity.com/datamodel.xsd"
    xsi:schemaLocation="http://casetivity.com/datamodel.xsd schema.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Client>
    <firstName>First</firstName>
    <middleName>Middle</middleName>
    <lastName>Last</lastName>
    <birthDate>2019-01-01</birthDate>
    <nickname>Nickname</nickname>
    <multipleBirth>0</multipleBirth>
    <consentToShare>0</consentToShare>
    <spokenLanguageOther></spokenLanguageOther>
    <writtenLanguageOther></writtenLanguageOther>
    <nameWithheld>true</nameWithheld>
    <currentAddress>
    <line1>123 Main St</line1>
    <line2></line2>
    <zip>02222</zip>
    <communityCode>NEEDHAM</communityCode>
    <stateCode>MA</stateCode>
    </currentAddress>

     

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • I am looking at what you posted and wondering what your actual question is.  There really isn't much to work with in your post.

     

  • The export to XML doesn't export anything related to the layout or pagination. It just exports the data in XML form, that's it. You'd use it for an XML message, saving data as XML to a database or for use by some other application.

    Sue

  • Sorry for being SO vague, just wasn't sure what to ask....

    So the XML, I posted was part  of a layout I received for data to send on a monthly basis .

    Part of what I need to send some client info.

    So if I were to write a query in the sample , lets say I have dbo.Client and dbo.Address tables , how would I layout the data in XML so it's similar to my sample.

    Thanks

     

     

     

     

  • jbalbo wrote:

    Sorry for being SO vague, just wasn't sure what to ask....

    So the XML, I posted was part  of a layout I received for data to send on a monthly basis .

    Part of what I need to send some client info.

    So if I were to write a query in the sample , lets say I have dbo.Client and dbo.Address tables , how would I layout the data in XML so it's similar to my sample.

    Thanks

    First of all, the XML you posted is incomplete and not properly formed.

    Second, to help you with the SQL you would need to post the DDL for the two tables as well as sample data to populate those tables.

    The SQL code would then use the FOR XML clause, which one specifically depends.

     

  • Thanks Lynn,

    let  me work on this and I'll send a better sample

     

  • Hi

    So here is some sample code for the first 15 fields

    and attached  is a sample of the entire XML

    Thanks

    SELECT People.[First Name],
    People.[Middle Initial],
    People.[Last Name],
    People.Birthdate,
    People.Nickname,
    '0' AS MutipleBirth,
    '0' as consentToShare,
    PersonAddress.Address,
    PersonAddress.[Address 2],
    PersonAddress.[Zip/Postal Code],
    PersonAddress.[City/Town] AS Community,
    PersonAddress.[State/Locality] AS stateCode,
    Languages.Name AS SpokenLang,
    Languages.Name AS WritteLang,
    (select top 1 Enum from Enrollments where OBJECTID = people.objectID ) as enrollmentNumber
    FROM People
    INNER JOIN PersonAddress ON People.ObjectID = PersonAddress.Person
    INNER JOIN Languages ON People.ObjectID = Languages.ID;


    Attachments:
    You must be logged in to view attached files.
  • jbalbo wrote:

    Hi

    So here is some sample code for the first 15 fields

    and attached  is a sample of the entire XML

    Thanks

    SELECT People.[First Name],
    People.[Middle Initial],
    People.[Last Name],
    People.Birthdate,
    People.Nickname,
    '0' AS MutipleBirth,
    '0' as consentToShare,
    PersonAddress.Address,
    PersonAddress.[Address 2],
    PersonAddress.[Zip/Postal Code],
    PersonAddress.[City/Town] AS Community,
    PersonAddress.[State/Locality] AS stateCode,
    Languages.Name AS SpokenLang,
    Languages.Name AS WritteLang,
    (select top 1 Enum from Enrollments where OBJECTID = people.objectID ) as enrollmentNumber
    FROM People
    INNER JOIN PersonAddress ON People.ObjectID = PersonAddress.Person
    INNER JOIN Languages ON People.ObjectID = Languages.ID;


    And the DDL and sample data for the tables?

     

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply