cancel
Showing results for 
Search instead for 
Did you mean: 

Hierarchical XML DataSource

Former Member
0 Kudos

<p>I am evaluating CR XI for use with web services.</p><p>Is there a simple tutorial anywhere explaining how to design a report based on hierarchical data ?</p><p>I need to display some stickers based on XML laid out that way:</p> <pre><report><br /> <sticker name="abc" destination="somewhere"> <br /> <feature name="feat. 1"/><br /> <feature name="feat. 2"/><br /> <feature name="feat. 3"/><br /> </sticker><br /> <sticker name="def" destination="anywhere"> <br /> <feature name="feat. 1"/><br /> <feature name="feat. 4"/><br /> </sticker><br /> ... <br /></report> <br /></pre><p>My report would be composed of N pages representing each <sticker> block with all its features displayed.</p><p>I am trying to create a sub-report for the features display, but this subreport fetches all the features of all the stickers...</p><p>Thank you for your help...</p>

Accepted Solutions (1)

Accepted Solutions (1)

todd_hanna
Employee
Employee
0 Kudos

<p>Sounds like you have the web services component of this particular piece working already - correct?</p><p>CRW can and will handle hierarchical data - not sure if you&#39;ve seen the steps in the Help file - but they should be a good jumping off point for you (I&#39;ve pasted them below so you don&#39;t have to go hunting for them).</p><p>I haven&#39;t tried this specifically against a web service and would be interested in the results. Post up if you have more challenges, or if it works for you. <br /></p><p>TRH </p><p>CRW help file instructions<br /> </p><p>************ </p><p>1. Create or open a report that contains the data you want to group and sort hierarchically. <br />2. On the Insert menu, click Group. <br />3. In the Insert Group dialog box, select the field that you want to use as the basis of your hierarchy (the child field). <br />For example, if you want to see the hierarchical structure of a company&#39;s employees, select the employee field.<br /><br />4. Select in ascending order. <br />By default, the group header of the report displays the value of the field you are grouping on.<br /><br />5. If you want to show a different value in the group header, click the Options tab and select the Customize Group Name Field check box. <br />For example, if you grouped by the employee field, at each change of a group you will see the corresponding employee name. If you want to display a different value (employee ID instead of employee name), customize the group name field by choosing an alternate data field, or by creating a formula.<br /><br />6. Click OK. <br />The group you created is added to the report.<br /><br />7. On the Report menu, click Hierarchical Grouping Options. <br />8. In the Available Groups list of the Hierarchical Options dialog box, select the group you want to organize hierarchically. <br />9. Select the Sort Data Hierarchically check box. <br />10. In the Parent ID Field list, select the field by which you want the Instance ID Field organized. <br />For example, for an employee hierarchical report, you might select the data field listing the supervisor to whom the employee reports.<br /><br />Note: The Instance ID Field and Parent ID Field must be of the same data type. For example, if the Instance ID Field holds string data, then the Parent ID Field must also hold string data.<br /><br />11. In the Group Indent field, enter the amount you want to indent for each subgroup. <br />Note: The value that you enter in the Group Indent field affects all other objects that are in the same area as your hierarchical group. For example, if your report contains a salary field on the same line as the name of the employee, the salary field is also indented when you use the employee field to create a hierarchical group. To indent only the hierarchy records and not the other objects, leave this value as 0 (zero) and use the conditional-X-position feature. See To indent a hierarchy without affecting other fields for more information.<br /><br />12. Click OK. <br />The report data is now grouped hierarchically.<br /></p>

Former Member
0 Kudos

<p>Thanks a lot for your answer.</p><p>I am not sure that the hierarchical features of CR work with XML Data.</p><p>The XML DataSource generates a table for each level of my XML hierarchy. Each table has its own Internal ID generated by CR. But I can&#39;t see any link from the lowest level to its parent.</p><p>In the example I used in my first post, CR generates the tables:</p><p>1. REPORT</p><p>2. REPORT/STICKER</p><p>3. REPORT/STICKER/FEATURE</p><p>There are Internal ID given by CR for each table, but can&#39;t see any Parent ID allowing to group REPORT/STICKER/FEATURE records according to their REPORT/STICKER parent instance.</p><p>There is no point adding such a link to the original XML data as it is completely expressed by it&#39;s hierarchical structure. (and I am not the owner of this service.</p><p>When I go to the database wizard, I can see links between tables, but with no keys. CR knows there is a hierarchy (I even see a subtable in the Fields explorer), but doesn&#39;t seem to exploit this for auto filtering/grouping (or please tell me how <img src="/modules/tinymce/tinymce/jscripts/tiny_mce/plugins/emotions/images/smiley-embarassed.gif" alt="Embarassed" title="Embarassed" />)</p><p> Thanks again for your help !<br /></p>

Answers (0)