Problem with multiple XML data sources

Hi there,
I have a template (i'm using XML publisher). I need to use 2 different XML data files in the same template, but i couldn't find any way of doing so. Can somebody help me with this issue please? You obviously cannot load 2 XML Data sources in the same template.
Thanks and Regards,
Luke

Is your xml stored some where,
then
Create datatemplate and use the xml as datasource.
You can create it using the following sysntax
<dataTemplate name="Employee" description="L" version="1.0">
<dataQuery>
<xml name="xml_emp" expressionPath=".//ROW">
<url method="GET" realm="" username="" password="">
file:///C:/dept_employee.xml</url>
</xml>
<xml name="xml_dept" expressionPath=".//ROW">
<url method="GET" realm="" username="" password="">
file:///C:/dept.xml</url>
</xml>
</dataQuery>
<dataStructure>
<group name="EMP" source="empxml">
<element name="NAME" value="ENAME"/>
your element here
</group>     
<group name="DEPT" source="xm_DEPTl">
<element name="DNAME" value="DPTNAME"/>
your element from 2nd xml here
</group>     
</dataStructure>
</dataTemplate>
Now your two xml source will become single source for the report.

Similar Messages

  • Problem with extracting Xml data source fields

    Post Author: new_crystal
    CA Forum: Crystal Reports
    Hi,
    I am creating a report which has a xml data source.
    I have a field named fieldvalue in the xml, I need to present this fieldvalue in a column format based on the name of the column heading which is another field in the database called fielddata
    here is what i want
    fielddata1     fielddata2    fielddata3 .......
    fieldvalue1    fieldvalue2   fieldvalue3......
    i have dragged the fieldvalue 3 times in the report and applied different formula for each one of them
    here is the eg. of the formula
    if ( = "A" ) then
    but it is not giving me the correct values pulled from the data source. for the first column it is pulling correctly but for the rest of the columns it is giving values as 0's.
    Can anyone help me out in this? It is pretty urgent!
    Thanks

    Post Author: tel
    CA Forum: Crystal Reports
    I have no idea how to format it in Crystal Reports (i'm new to it too), but if worse comes to worse, you can create an XSLT stylesheet to convert the XML into a format that is easier for Crystal to use. 
    In case you don't know XSLT is a programming language that is designed to convert one XML format into another.

  • Problem with load XML data

    Hi.
    I have a problem this load XML data. For example: file name:
    01-05-2008.xml => in this file all data have date=01.05.2008.
    Once i load period 01.05.2008 to 10.05.2008 my app load 10 files.
    Sometimes some row this greater date stay earlier then row this
    smaller date. I don't know why this happend. Bellow part of code.
    Please help.
    P.S. sorry for my very bad english.

    Hi Lekser,
    ntsii is totally right.
    Calling httpservice send is a async operation, which means
    you don´t know when the result event of such operation will
    return.
    You can also sort your grid after a xml data file was loaded.
    At least it would guarantee that the entries appear in the
    right order.
    best regards,
    kcell

  • Problem with the SQL Data Source (Essbase server in Unix Env)

    I too have the same problem.
    I have setup the Datasource for an Oracle db in the Essbase Server (which is on a Unix Box) using the Oracle Wire Protocol.I tested the ODBC connection in the Server and it connect with the credentials.
    But if i choose the same DSN in the EAS and try to connect i get the below error
    Error: 1021001 Failed to Establish Connection With SQL Database Server.
    I even downloaded a document from the Oracle site.. on the SQL interface in Essbase but i could not find the inst-sql.sh file to enable Essbase SQL Interface on the server. Is this required??
    I tried with both the User & System DSN on the server but no luck.
    Any help on this will be highly appreciated. Thanks in advance.
    Posting in a new thread since the old one is answered and no points available to score.

    It can depend on the version, it is different for version 11, further information :- How to define a relational data source in (odbc.ini) V11 Essbase?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Problem with a XML Data Server

    Hello,
    I am facing a problem in defining the data server for an XML File.
    This Xml File is well build and I can open it with IE.
    In this file I have a namespace define.
    I define the url driver as following : jdbc:snps:xml?f=C:/Temp/dossiers_suisse.xml&s=XML_DOS_HAB_S
    but I always have the following error message :
    java.sql.SQLException: The model generated by the model mapper was not accepted by a validator: Modèle non accepté: Namespace not found:
    When I remove the namespace of the xml file the test works well.
    I was searching for the driver documentation but I just find few informations on the webhelp.
    Maybe there is a parameter to pass to the Driver URL to define the namespace but there is not in the web help.
    So if someone know how to do with this sort of file ?
    Or if someone know where I can find the real documentation for this driver ?
    Thanks in advance...
    BM

    I am able now to test my connexion succesfully after having restart my ODI.
    I can reverse my XML file too.
    But my datastores are empty except the first datastore genrated which correspond to the first Tag (the one after the root).
    Please Help...

  • Problem with R/3 Data Source based on Function module in SAP BI

    Hi,
    We have a data source based on functional module. When we load data from R/3 to BI we face the following error.
    " No end-confirmation arrived in the Warehouse from the source system."
    We are getting data but due to no end confirmation from the source system, the load become timed-out and status becomes "RED". When we change the status to be "GREEN" and proceed tha load further, load is fine.
    Please suggest us a suitable solution.
    Thanks in Advance,
    Geetha

    Hi Geetha Devi Ramalingam.
    I faced the same problem since yesterday. I just resolve the issue.
    So here is my solution :
    try this code :
        FETCH NEXT CURSOR s_cursor
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE e_t_data
                   PACKAGE SIZE s_s_if-maxsize.
        IF sy-subrc <> 0.
          CLOSE CURSOR s_cursor.
          RAISE no_more_data.
        ENDIF.
    if you add your
    bold
    IF sy-subrc <> 0.
          CLOSE CURSOR s_cursor.
          RAISE no_more_data.
        ENDIF.
    bold
    than the sy-subrc may be equal and than your CLOSE CURSOR s_cursor. will have no effect
    it work for me hope it will for u
    Hard luck!
    Salah
    Edited by: idrissi salaheddine on Jan 19, 2012 12:24 PM

  • Problem with the ECC6 Data sources after migration

    Dear All.
    I transfer all the data source which is required for sales overview cube 0SD_C03.
    lets take two senairos.
    for example take 2LIS_11_VAHDR to BI 7 and then i migrate this data source with Export option after that i activate the data source and then i initialize the delta request with data.
    the request successfully generated in BI to R/3 but in monitor it shows in yellow for long period of time and no data arrive i wait for 30 min but nothing happen.
    in second one i initialize the delta process for data source 2LIS_12_VCHDR this data source i did't migrate but face the same situation.
    can you please explain what will be the cause of this and how i can manage to fetch the data from ECC6 client through Business content data source.
    i did not migrate the update rules into transformations.
    any help will be highly appreciated.
    kind regards,
    Zeeshan

    yes that is what exactly happen i did not do any thing as in the previous update rules there are written complex abap routine.
    please let me know how to generate the update rules as was there previously or if i have to revert the datasource back to the previous position what i have to do.
    i have figure out that why the data is not coming from SAP just need steps that how to revert the data source or make the new transformations with generated update rules or transformation.
    any help will be highly appreciated.
    Kind Regards,
    Zeeshan
    Edited by: Zeeshan haider on Jun 2, 2009 6:02 PM

  • Facing problem with standard master data source *0bp_def_address_attr *

    Hi All,
    I am using BW 3.5 version
    I am loading master data form 0bp_def_address_attr(stabdard data source)  as part of my daily activities.
    this loading is failing frequently throwing following error message
    30 duplicate record found. 1243 recordings used in table /BI0/PBPARTNER
    ID : RSDMD
    message number 199
    Is there any way I can avoid this failure?How can I handle duplicate records?
    Please help me!!
    Warm regards
    Nanduri Aditya

    Thanks for your answers and sorry for my late reply
    Hi Srinivas,
    I am using  3.5  there is no ' handle duplicate records' option in info pacakge.
    Hi Francisco,
    Thanks for your answers,
    2 OSS notes are relevant to my problem. Currently I am checking in Dev whether it will fix my problem or not.
    Thanks a lot it was avery helpful answer.
    Warm Regrads,
    Nanduri Aditya

  • Problem with inserting XML data server in ODI

    Hi,
    I was trying to insert an XML data server in ODI. I want to use it for my target database.i.e i want my target to be an xml file. So while specifying the url in the data server, what should i mention as the file name,dtd file , root etc? what i have done is dat i hav created the dtd file as per my requirement.i have created an empty xml file. while testing the connection an error comes : java.sql.SQLException: A parsing exception occurred saying Whitespace required..
    Next i tried putting jz d root tags in the xml file without any content. this returned the same error. next i tried inserting all d tags as per my dtd file. same error came...
    Please help.
    Regards,
    Divya
    Message was edited by:
    Divya Padmanabhan

    For empty xml try to use:
    <?xml version="1.0" encoding="UTF-8"?>
    <ROOT_SOME></ROOT_SOME>
    as jdbc connect string:
    jdbc:snps:xml?f=../demo/xml/1/file.xml&ro=false&ldoc=true&case_sens=true&s=LEO_FIZ&dod=true
    and try again...

  • XMLdatasets: How to combine multiple xml data sources??

    What I'm trying to do (without any results so far...) is to combine data from two different xml sources.
    I have one source with a list of cultural events (agenda.xml) and another with a list of contacts (contacts.xml). Each source has a column with a contact name <co_name>.
    I use a MasterDetail layout. When you choose an event in the MasterContainer (agenda.xml), the DetailContainer should display not only details from agenda.xml but when the name <co_name> in agenda.xml MATCH exactly a name <co_name> in contacts.xml, the DetailContainer also display the telephone number <co_phone> from contact.xml.
    I will put my code down here, I hope somebody can help me find out what I'm doing wrong. (I tried something with "getdata" but obviously, it doesn't works...)
    Thank you very much in advance!!!!!!
    Véro
    FIRST DATATSET: agenda.xml
    <events>
    <event>
        <ev_title>Title event 1</ev_title>
        <co_name>vero</co_name>
    </event>
    <event>
        <ev_title>Title event 2</ev_title>
        <co_name>marc</co_name>
    </event>
    <event>
        <ev_title>Title event 3</ev_title>
        <co_name>vero</co_name>
    </event>
    <event>
        <ev_title>Title event 4</ev_title>
        <co_name>marc</co_name>
    </event>   
    </events>
    SECOND DATASET: contacts.xml
    <contacts>
    <contact>
        <co_name>marc</co_name>
        <co_phone>123 phone of marc</co_phone>
    </contact>
    <contact>
        <co_name>vero</co_name>
        <co_phone>456 phone of vero</co_phone>
    </contact>
    </contacts>
    HTML DOCUMENT
    <html>
    <head>
    <link href="SpryAssets/SpryMasterDetail.css" rel="stylesheet" type="text/css" />
    <script src="SpryAssets/xpath.js" type="text/javascript"></script>
    <script src="SpryAssets/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    var dsAgenda = new Spry.Data.XMLDataSet("agenda.xml", "events/event");
    </script>
    <script type="text/javascript">
    var dsContacts = new Spry.Data.XMLDataSet("contacts.xml", "contacts/contact");
    function matchTheName() {
    var rows = dsContacts.getData();
    for (var i = 0; i < rows.length; i++)
      if (rows[i]["co_name"] == "{dsAgenda::co_name}")
        return rows[i]["dsContacts::co_name"];
    </script>
    </head>
    <body>
        <div class="MasterDetail">
            <div spry:region="dsAgenda" class="MasterContainer">
                <div class="MasterColumn" spry:repeat="dsAgenda" spry:setrow="dsAgenda" spry:hover="MasterColumnHover" spry:select="MasterColumnSelected">
                    <div>{ev_title}</div>
                    <div>{co_name}</div>
                </div>
            </div>
            <div spry:detailregion="dsAgenda dsContacts" class="DetailContainer">
                <div class="DetailColumnTitle">{dsAgenda::ev_title}</div>
                <div class="DetailColumn">{dsAgenda::co_name}</div>
                <div spry:if="'{dsAgenda::co_name}' == '{dsContacts::co_name}'" class="DetailColumn">{dsContacts::co_phone}</div>
            </div>
        </div> 
    </body>
    </html>

    create a new empty SpryDataSet.
    var dsAll = new Spry.Data.DataSet(); // new base dataset
    on your existing datasets, add onPostLoad observers, this are events that will be notified once the datasets has been loaded.
    var default_obs = {
         onPostLoad: function(){
              // when both datasets are loaded, call out init fn
             if( ds1.getData() && ds2.getData() ){
                   init();
    Than we add it both datasets:
    ds1.addObserver( default_obs ); // add the observer object to the datasets
    ds2.addObserver( default_obs );
    Now they will both call the init function when both the datasets has been loaded. The init function will create the actual new dataset. The data in the SpryDataSet is basically just an array with objects. And Spry has a method that loads an array in to the datasets.setDataFromArray
    We are going to use that function to construct a new dataset:
    function init(){
         if( dsAll.getData() ){
              return; // we already have data in our dsAll dataset, so no use to do it all over again
         var source = ds1.getData();
         var length = source.length;
         var result = [];
         for( var i = 0; i < length; i++ ){
              var matched_row = ds2.findRowsWithColumnValues({id: source[i]['@id']}); // checks if ds2. has a column with id: value
              if( matched_row ){
                   var row = result[ result.length ];
                   row = source[i];
                   Spry.Utils.setOptions( row, matched_row ); // includes the matched_row object inside the new row object
         dsAll.setDataFromArray( result ); // set the new array as data
    Something like should be needed to create it..

  • JRC and XML Data Source

    Hi!
    Does the JRC execute a report with an XML data source (URL XML Http and URL XSD Http) ?
    If yes, does the JRC change programmatically the XML data source (URL XML Http and URL XSD Http) prior to execute the report?
    There is an example to do this?
    Best regards,
    A.

    Hi,
    I've follow the example [ftp://ftp.businessobjects.com/pub/incoming/XML_XSD_sample_reports_XI.zip]
    and i've use the "JRC_Display_Connection_Info"on a xml to display all of the properties.
    After i've make a program for change the datasource in the case of "xml http" database.
    Changes the DataSource for a specific Table from XML
    @param clientDoc              The reportClientDocument representing the report being used
    @param reportName     "" for main report, name of subreport for subreport, null for all reports
    @param tableName     name of table to change.  null for all tables.
    @param username       The DB logon user name
    @param password       The DB logon password
    @param xmlURL          The Http(s) XML URL
    @param xsdURL          The Http(s) Schema URL
    @throws ReportSDKException
         public void changeDataSourceXML(ReportClientDocument clientDoc,
                        String reportName, String tableName,
                        String username, String password,String xmlURL,String xsdURL) throws ReportSDKException {
                    PropertyBag propertyBag = null;
              IConnectionInfo connectionInfo = null;
              ITable origTable = null;
              ITable newTable = null;
              // Declare variables to hold ConnectionInfo values.
              String SERVER_TYPE = "XML e servizi Web";
              String CONVERT_MULTIVALUE_TO_TABLE="false";
              String DATABASE_DLL = "crdb_xml.dll";
              String HTTPS_SCHEMA_URL= xsdURL;
              String HTTPS_XML_URL= xmlURL;
              // Declare variables to hold database User Name and Password values
              // I've see by "JRC_Display_Connection_Info" that USERID_HTTPS_SCHEMA
              // and USERID_HTTPS_XML's value is equal to username value
              String DB_PASSWORD = "";
              String DB_USER_NAME = username;
              String USERID_HTTPS_SCHEMA=username;
              String USERID_HTTPS_XML=username;
              // Obtain collection of tables from this database controller
              if (reportName == null || reportName.equals("")) {
                   Tables tables = clientDoc.getDatabaseController().getDatabase().getTables();
                   for(int i = 0;i < tables.size();i++){
                        origTable = tables.getTable(i);
                        if (tableName == null || origTable.getName().equals(tableName)) {
                             newTable = (ITable)origTable.clone(true);
                             newTable.setQualifiedName(origTable.getAlias());
                             // Change connection information properties
                             connectionInfo = newTable.getConnectionInfo();
                             // Set new table connection property attributes
                             propertyBag = new PropertyBag();
                             // Overwrite any existing properties with updated values
                             propertyBag.put("Http(s) Schema URL", HTTPS_SCHEMA_URL);
                             propertyBag.put("Http(s) XML URL", HTTPS_XML_URL);
                             propertyBag.put("Server Type", SERVER_TYPE);
                             propertyBag.put("UserID Http(s) XML", USERID_HTTPS_XML);
                             propertyBag.put("Database DLL",DATABASE_DLL );
                             propertyBag.put("Convert Multivalue to Table", CONVERT_MULTIVALUE_TO_TABLE);
                             propertyBag.put("UserID Http(s) Schema", USERID_HTTPS_SCHEMA);
                             connectionInfo.setAttributes(propertyBag);
                             // Set database username and password
                             connectionInfo.setUserName(DB_USER_NAME);
                             connectionInfo.setPassword(DB_PASSWORD);
                             // Update the table information
                             clientDoc.getDatabaseController().setTableLocation(origTable, newTable);
    But i don't know why if i call:
    System.out.println(reportClientDoc.getDatabaseController().getDatabase().getTables().getTable(0).getConnectionInfo().getAttributes().toString());
    on my
    ReportClientDocument reportClientDoc = new ReportClientDocument();               
    reportClientDoc.open(ReportName, 0);
    after changeDataSourceXML i've one more attribute than those defined by me called PreQEServerType that take the Server_Type value.
    I think that is the cause of the output error of my program on the export method
    ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF);
    - com.crystaldecisions.reports.dataengine.be: Unexpected error of the database connector
    - Failed to export report
    com.crystaldecisions.reports.exportinterface.exceptions.ExportException: Unexpected error of the database connector
         at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
         at report.MKReport.main(MKReport.java:655)
    Caused by: com.crystaldecisions.reports.formatter.formatter.c: Unexpected error of the database connector
         at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.<init>(Unknown Source)
         at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.formatter.e.l.<init>(Unknown Source)
         at com.crystaldecisions.reports.formatter.formatter.e.p.<init>(Unknown Source)
         at com.crystaldecisions.reports.formatter.formatter.e.p.a(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
         ... 13 more
         Caused by: com.crystaldecisions.reports.dataengine.be: Unexpected error of the database connector
         at com.crystaldecisions.reports.dataengine.m.a(Unknown Source)
         at com.crystaldecisions.reports.dataengine.m.a(Unknown Source)
         at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
         ... 19 more
    Caused by: com.crystaldecisions.reports.reportdefinition.datainterface.n: Unexpected error of the database connector
         at com.crystaldecisions.reports.reportdefinition.datainterface.g.a(Unknown Source)
         ... 22 more
    Caused by: com.crystaldecisions.reports.queryengine.am: Unexpected error of the database connector
         at com.crystaldecisions.reports.queryengine.driverImpl.a.if(Unknown Source)
         at com.crystaldecisions.reports.queryengine.ax.if(Unknown Source)
         ... 23 more
    - JRCAgent1 detected an exception:      An error occurred while exporting the report
         at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
         at report.MKReport.main(MKReport.java:657)
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: An error occurred while exporting the report.---- Error code:-2147467259 Error code name:failed
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
         at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
    Thanks in advance for your help.
    Andrea
    Edited by: Andrea Bonf on Sep 24, 2008 5:56 PM

  • Problem with Multiple Data Source Retrieval

    Hi,
    We are working on a Project that is concerned with JSF and XML parsing. We have successfully parsed the XML and made an object model- Lists out of it to display it using JSF. Additionaly we also want to display some data from the database compare it with the XML data and then display it on the GUI.
    So e.g we have an attribute code in the XML structure which is a number. Before displaying it on the GUI we first have to query the database what this number or code actually means i.e its description text . get it and display alongside the other data from the XML. So the question is
    1) How to get data from different data sources
    2) Compare the data
    3) and merge and display into GUI .
    And we have to display it with JSF and as far as i know JSF has no comparison mechanism ..??!!
    Thanks for any help,

    You can compare stuff in the EL, but I don't think this is what you need.
    You can just use Java code in the backing bean class for all the business logic. You can use DAO classes for database access logic. Finally for displaying you can use the JSF tags such as h:outputText.

  • Problem using JRC 2.0 on Unix with xml data source

    Hello,
    I am experimenting difficulties using the JRC 2.0 (which I hadn't with the previous version) on a RedHat 4 machine. It takes 7 minutes (only 20 seconds on Windows) to create a pdf (1 page) from a simple report using an xml file as data source.
    It takes approximately 2 minutes when opening the report
          > reportClientDoc.open(REPORT_NAME, 0);
    then 4 minutes are required to connect the report to the xml data source
          > reportClientDoc.getDatabaseController().setDataSource(xml_ds, "", "");
    Have you got any clue on possible reasons for this issue ?
    Edited by: florian epiard on Jan 30, 2009 4:33 PM

    Hello,
    I am experimenting difficulties using the JRC 2.0 (which I hadn't with the previous version) on a RedHat 4 machine. It takes 7 minutes (only 20 seconds on Windows) to create a pdf (1 page) from a simple report using an xml file as data source.
    It takes approximately 2 minutes when opening the report
          > reportClientDoc.open(REPORT_NAME, 0);
    then 4 minutes are required to connect the report to the xml data source
          > reportClientDoc.getDatabaseController().setDataSource(xml_ds, "", "");
    Have you got any clue on possible reasons for this issue ?
    Edited by: florian epiard on Jan 30, 2009 4:33 PM

  • Problem in filling jasper report with XML Data source

    Hello!
    I am trying to build a report uxing xml data source..Please verify following code:
    String outFileName = "c:/Report1.pdf";
    File xmlFileName = new File("C:/Program Files/JasperSoft/iReport-1.2.5/report.jrxml");
    String recordPath = "/SiteDetails/Site";
    JasperDesign jasperDesign = JRXmlLoader.load(xmlFileName);
    JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
    JRXmlDataSource jrxmlds = new JRXmlDataSource(new File("c:/NewSite.xml"),recordPath);
    HashMap hm = new HashMap();
    try
    JasperPrint print = JasperFillManager.fillReport(jasperReport,hm,jrxmlds);
    JRExporter exporter = new net.sf.jasperreports.engine.export.JRPdfExporter();
    exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME,outFileName);
    exporter.setParameter(JRExporterParameter.JASPER_PRINT,print);
    exporter.exportReport();
    catch (JRException jre)
    jre.printStackTrace();
    catch (Exception e)
    e.printStackTrace();
    My Xml file is:
    <?xml version="1.0" encoding="UTF-8"?>
    <SiteDetails>
    <Site>
    <Name>Site1</Name>
    <Addr>Bangalore</Addr>
    <supersiteid>null</supersiteid>
    </Site>
    <Site>
    <Name> Site2</Name>
    <Addr> Madras</Addr>
    <supersiteid>Site1</supersiteid>
    </Site>
    </SiteDetails>
    I want to display details of Siteand Address..My program works fine but displays only 1 (first) record...What should i do to display the full file..do i need to navigate thru the file and give that as an input to fillReport ()method...

    Hi,
    Have a look at below URL.
    http://ireport.sourceforge.net/cap7.html#7.4
    Regards
    VInK

  • Create Report with CR4E and XML Data Source

    Hi all,
    I have a problem when create a report with CR4E that should use a XML data source. It is not possible to choose fields from the field explorer, because ther are no fields from the XML-file. Is there a general problem when using an ODA data source in CR4E?  At the moment I can only create reports with a database as data source.
    Please help me with a tip.
    Thanks
    Arnold

    Hi,
    After Installing CR4E Version 2  the code snippet for creating a XML-report not works as JSP. Has anywhere a hint to resolve the problem or a complete JSP-file?
    reportClientDocument = new ReportClientDocument();
    java.lang.NoClassDefFoundError: com/crystaldecisions/reports/common/data/CrystalResultSet
         com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.<init>(Unknown Source)
         org.apache.jsp.XMLDataSource_jsp._jspService(XMLDataSource_jsp.java:64)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    Thanks
    Arnold Meier

Maybe you are looking for