Problem pushing XML as DataSource to report

Post Author: biiz
CA Forum: JAVA
Hello!
I have a report which uses xml and xsd as datasource. I have now the requirement to dynamically set the xml-data into the report.
I do this via reportClientDocument.getDatabaseController().setDataSource(xml_ds, "ObjectSpace", "") but I receive following exception although data in xml_ds is not null:
Error occured: com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: The data source object cannot be null.---- Error code:-2147024809 Error code name:failed
The ReportClientDocument is retrieved from Crystal Report Server XI R2 .
In crystalras log I have found following error-msg: ErrorLog 2008  5 29 10:56:40.784 1992 828 (\servers\ras\dtsagent\cdtsagent.cpp:3177): CDTSagent::doOneRequest reqId=272: CSResultException thrown.   ErrorSrc:"Analysis Server" FileName:"\servers\ras\dtsagent\reporthandler.cpp" LineNum:16948 ErrorCode:-2147024809 ErrorMsg:"The data source object cannot be null." DetailedErrorMsg:""
Can you please help me?
Regards,
Gerald Spitzer
Here is my code:
  CrystalEnterprise objCE = new CrystalEnterprise();  ISessionMgr objCESessionMgr = objCE.getSessionMgr();  objCESession = objCESessionMgr.logon("Administrator", "", this.getServletContext().getInitParameter("RAS"), "secEnterprise");  objTokenMgr = objCESession.getLogonTokenMgr();    cstrLogonToken = objTokenMgr.createLogonToken("", 60, 500);
   IInfoStore objInfoStore = (IInfoStore) objCESession.getService("InfoStore");
  java.lang.String cstrStatement;
  cstrStatement = "";  cstrStatement = cstrStatement + "SELECT SI_ID, SI_NAME";  cstrStatement = cstrStatement + "  FROM CI_INFOOBJECTS";  cstrStatement = cstrStatement + " WHERE SI_NAME = '" + reportName + "'";  cstrStatement = cstrStatement + "   AND SI_INSTANCE = 0";
  IInfoObjects objInfoObjects = objInfoStore.query(cstrStatement);
  if (objInfoObjects.getResultSize() > 0) {
   IInfoObject objInfoObject = (IInfoObject) objInfoObjects.get(0);
   IReportAppFactory objRASFactory = (IReportAppFactory) objCESession.getService("", "RASReportFactory");   ReportClientDocument objReport = (ReportClientDocument) objRASFactory.openDocument(objInfoObject,0,java.util.Locale.ENGLISH);
   FileInputStream fin = new FileInputStream("C:
fragebogen_dokument_ohneADesc.xsd");   ByteArrayOutputStream baos = new ByteArrayOutputStream();   byte&#91;&#93; bytes = new byte&#91;1024&#93;;   for(;;) {    int count = fin.read(bytes);    if(count < 0)     break;    baos.write(bytes, 0, count);   }   final byte&#91;&#93; xsdBytes = baos.toByteArray();   fin.close();    fin = new FileInputStream("C:
fragebogen_dokument_ohneADesc.xml");   baos = new ByteArrayOutputStream();   bytes = new byte&#91;1024&#93;;   for(;;) {    int count = fin.read(bytes);    if(count < 0)     break;    baos.write(bytes, 0, count);   }   final byte&#91;&#93; xmlBytes = baos.toByteArray();   fin.close();
   IXMLDataSet xml_ds = new IXMLDataSet() {    private IByteArray xmlData = null;    public void setXMLData(IByteArray xmlData) {     this.xmlData = xmlData;    }    public IByteArray getXMLData() {     return this.xmlData;    }    private IByteArray xmlSchema = null;    public void setXMLSchema(IByteArray xmlSchema){     this.xmlSchema = xmlSchema;    }    public IByteArray getXMLSchema() {     return this.xmlSchema;    }    };
   xml_ds.setXMLData(new IByteArray() {    public void fromString(String arrayValue){}    public String toString() { return ""; }    public byte&#91;&#93; getBytes() { return xmlBytes; }   });
   xml_ds.setXMLSchema(new IByteArray() {    public void fromString(String arrayValue){}    public String toString() { return ""; }    public byte&#91;&#93; getBytes() { return xsdBytes; }   });
   System.out.println("####bytes.length" + xml_ds.getXMLData().getBytes().length);
   objReport.getDatabaseController().setDataSource(xml_ds, "ObjectSpace", "");

Post Author: Ted Ueda
CA Forum: JAVA
Below is sample RAS SDK XML datasource injection code.Sincerely,Ted Ueda<%@ page import = "com.crystaldecisions.sdk.exception.SDKException,                   com.crystaldecisions.sdk.framework.,                   com.crystaldecisions.sdk.occa.infostore.,                   com.crystaldecisions.sdk.occa.managedreports.,                   com.crystaldecisions.sdk.occa.report.application.,                   com.crystaldecisions.sdk.occa.report.data.,                   com.crystaldecisions.sdk.occa.report.definition.,                   com.crystaldecisions.sdk.occa.report.document.,                   com.crystaldecisions.sdk.occa.report.lib.,                   com.crystaldecisions.sdk.occa.report.exportoptions.,                   com.crystaldecisions.sdk.occa.report.reportsource.IReportSource,                   com.crystaldecisions.sdk.plugin.desktop.common.,                   java.io.,                   java.util."%><%/* * Environment variables - modify to suit your deployment  */String username = "";String password = "";String cmsname  = "<cms name here>";String authType = "secEnterprise";String reportName = "Test XML";   // Report name as published on EnterpriseString xmlFilePath = "C:
XMLData
new_test_data.xml";  // Path to XML datasource String xsdFilePath = "C:
XMLData
new_test_data.xsd";  // Path to XSD for XML datasource IEnterpriseSession boSession = null;try {    IInfoStore infoStore;    IInfoObjects infoObjs;    IInfoObject report;    IReportAppFactory raFactory;    ReportClientDocument doc;    byte&#91;&#93; xmlBytes;    byte&#91;&#93; xsdBytes;    IXMLDataSet xml_ds;    ByteArrayInputStream exportByteArrayStream;    byte&#91;&#93; exportByteArray;    boSession = CrystalEnterprise.getSessionMgr().logon(username, password, cmsname, authType);    infoStore = (IInfoStore)boSession.getService("", "InfoStore");    infoObjs = (IInfoObjects) infoStore.query("SELECT TOP 1 * FROM CI_INFOOBJECTS "                                               + "WHERE SI_KIND = 'CrystalReport' "                                              + " AND SI_INSTANCE=0 "                                              + " AND SI_NAME='" + reportName + "'" );    report = (IInfoObject) infoObjs.get(0);    raFactory  = (IReportAppFactory) boSession.getService("", "RASReportService");    doc = raFactory.openDocument(report, 0, Locale.ENGLISH);    xmlBytes = bytesFromFile(xmlFilePath);    xsdBytes = bytesFromFile(xsdFilePath);    xml_ds = new XMLDataSet(new ByteArray(xmlBytes), new ByteArray(xsdBytes));    doc.getDatabaseController().setDataSource(xml_ds, "schema1/People", "schema1/People");    exportByteArrayStream = (ByteArrayInputStream)doc.getPrintOutputController().export(ReportExportFormat.PDF);    exportByteArray = new byte&#91;exportByteArrayStream.available()&#93;;    response.reset();    response.setHeader("Content-disposition", "inline;filename=crreport.pdf");    response.setContentType("application/pdf");    int bytesRead = 0;    while((bytesRead = exportByteArrayStream.read(exportByteArray)) != -1) {        response.getOutputStream().write(exportByteArray, 0, bytesRead);        }            response.getOutputStream().flush();    response.getOutputStream().close();} finally {  if(boSession != null)       boSession.logoff();}%><%!byte&#91;&#93; bytesFromFile(String path) throws IOException {    FileInputStream fin;    ByteArrayOutputStream byteOStream = new ByteArrayOutputStream();    byte&#91;&#93; bytes;    fin = new FileInputStream(path);    bytes = new byte&#91;1024&#93;;    for(;;) {        int count = fin.read(bytes);        if(count < 0)            break;        byteOStream.write(bytes, 0, count);    }    bytes = byteOStream.toByteArray();    fin.close();    return bytes;}%>

Similar Messages

  • Pushing xml data as a report source at runtime

    Hi,
    I am trying to change the datasource of a report originaly pointing on a local xml file by putting another xml data directly in the java code calling the report.
    In order to do that, I use the setDataSource(IXMLDataSet arg0, String arg1, String arg2) method which seems to be the right thing to do, but i get an error : "com.crystaldecisions.sdk.occa.report.lib.ReportSDKLogonException: Echec de la connexion.---- Error code:-2147217393 Error code name:dbLogonFailed"
    Here is the relevant part of the code :
    IXMLDataSet DS = new XMLDataSet();
    IByteArray xmlArray = new ByteArray();
    IByteArray xmlSchemaArray = new ByteArray();
    xmlArray.fromString(XMLData);
    xmlSchemaArray.fromString(XMLDataSchema);
    DS.setXMLData(xmlArray);
    DS.setXMLSchema(xmlSchemaArray);
    String tableAlias = reportClientDoc.getDatabaseController().getDatabase().getTables().getTable(0).getAlias();
    reportClientDoc.getDatabaseController().setDataSource(DS, tableAlias, "");
    The error happens on the setDataSource line.
    I have searched on the net for that kind of error with xml datasource, but I didn't find anything. Actually i don't get why the report need logon information to read an xml stream.
    Another possibility is maybe the fact that the IByteArray strips XML caracters from the original string.
    The last possible thing is maybe that in the 11.8 javadoc, the SetDataSource() method taking IXMLDataSet don't exist, and has been replaced by a method taking collections.
    If anybody has ideas on this problem, please tell me.
    Thank you,
    Guillaume

    <p>Snippet from working code.</p><p>Sincerely,</p><p>Ted Ueda </p><p> </p><p>ReportClientDocument rcd = new ReportClientDocument();<br /><br />FileInputStream fin = new FileInputStream("reports/new_test_data.xsd");<br />ByteArrayOutputStream baos = new ByteArrayOutputStream();<br />byte[] bytes = new byte[1024];<br />for(;;) {<br />    int count = fin.read(bytes);<br />    if(count < 0)<br />        break;<br />    baos.write(bytes, 0, count);<br />}<br />final byte[] xsdBytes = baos.toByteArray();<br />fin.close();<br /><br />fin = new FileInputStream("reports/new_test_data.xml");<br />baos = new ByteArrayOutputStream();<br />bytes = new byte[1024];<br />for(;;) {<br />    int count = fin.read(bytes);<br />    if(count < 0)<br />        break;<br />    baos.write(bytes, 0, count);<br />}<br />final byte[] xmlBytes = baos.toByteArray();<br />fin.close();<br /><br />IXMLDataSet xml_ds = new IXMLDataSet() {<br />    private IByteArray xmlData = null;<br />    public void setXMLData(IByteArray xmlData) {<br />        this.xmlData = xmlData;<br />    }<br />    public IByteArray getXMLData() {<br />        return this.xmlData;<br />    }<br />    private IByteArray xmlSchema = null;<br />    public void setXMLSchema(IByteArray xmlSchema){<br />        this.xmlSchema = xmlSchema;<br />    }<br />    public IByteArray getXMLSchema() {<br />        return this.xmlSchema;<br />    }<br /><br />};<br /><br />xml_ds.setXMLData(new IByteArray() {<br />    public void fromString(String arrayValue){}<br />    public String toString() { return ""; }<br />    public byte[] getBytes() { return xmlBytes; }<br />});<br /><br />xml_ds.setXMLSchema(new IByteArray() {<br />    public void fromString(String arrayValue){}<br />    public String toString() { return ""; }<br />    public byte[] getBytes() { return xsdBytes; }<br />});<br /><br />rcd.getDatabaseController().setDataSource(xml_ds, "schema1/People", "schema1/People");<br /></p>

  • Error in setting datasource - Crystal reports

    Good day,
    I am currently experiencing a problem with setting my datasource to a report in Crystal Reports.
    Strangely, the report works in VS 2010, but when running as an executable, the program fails when assigning the datasource.
    My code:
        Public Sub PurchasesByVendor()
            Try
                Dim sql As String = "SELECT tblVendors.VendorID, tblVendors.VendorName, tblPO.POID, tblPO.EnterDate, tblCustomers.Company, tblOrders.RefNum, Sum(tblPOItems.ExtPrice) AS SumOfExtPrice " & _
                                    "FROM (((tblPO INNER JOIN tblPOItems ON tblPO.POID = tblPOItems.POID) INNER JOIN tblVendors ON tblPO.VendorID = tblVendors.VendorID) LEFT JOIN tblOrders ON tblPO.OrderID = tblOrders.OrderID) LEFT JOIN tblCustomers ON tblOrders.CustomerID = tblCustomers.CustomerID " & _
                                    "WHERE (((tblPO.EnterDate) Between #" & dpStart.Text & "# And #" & dpFinish.Text & "#)) " & _
                                    "GROUP BY tblVendors.VendorID, tblVendors.VendorName, tblPO.POID, tblPO.EnterDate, tblCustomers.Company, tblOrders.RefNum; "
                Dim con As New OleDb.OleDbConnection
                Dim da As OleDb.OleDbDataAdapter
                Dim ds As New DataSet
                con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Program Files\Mail-Shop\MSApp2k.mdb"
                con.Open()
                da = New OleDb.OleDbDataAdapter(sql, con)
                da.Fill(ds, "PO")
                Dim povList As List(Of POV) = New List(Of POV)
                If ds.Tables("PO").Rows.Count > 0 Then
                    For i = 0 To ds.Tables("PO").Rows.Count - 1
                        Dim pov As POV = New POV()
                        pov.VendorName = ds.Tables("PO").Rows(i).Item(1)
                        pov.PONumber = ds.Tables("PO").Rows(i).Item(2)
                        pov.PODate = ds.Tables("PO").Rows(i).Item(3)
                        If IsDBNull(ds.Tables("PO").Rows(i).Item(4)) = False Then
                            pov.Company = ds.Tables("PO").Rows(i).Item(4)
                        End If
                        If IsDBNull(ds.Tables("PO").Rows(i).Item(5)) = False Then
                            pov.Order = ds.Tables("PO").Rows(i).Item(5)
                        End If
                        pov.Total = ds.Tables("PO").Rows(i).Item(6)
                        povList.Add(pov)
                    Next
                End If
                'MsgBox(povList.Count)
                Dim datas As POVD = New POVD()
                Dim dt As New DataTable("povd")
                'Dim dt As DataTable = datas.Tables.Add("hc")
                dt.Columns.Add("Vendor", GetType(String))
                dt.Columns.Add("PONumber", GetType(Integer))
                dt.Columns.Add("PODate", GetType(Date))
                dt.Columns.Add("Company", GetType(String))
                dt.Columns.Add("OrderNbr", GetType(Integer))
                dt.Columns.Add("Total", GetType(Double))
                dt.Columns.Add("Charged", GetType(Double))
                datas.Tables.Add(dt)
                For Each dr In povList
                    Dim vendor = dr.VendorName
                    Dim ponbr = dr.PONumber
                    Dim poDate As Date = DateValue(DateTime.Parse(dr.PODate))
                    Dim company = dr.Company
                    Dim order = dr.Order
                    Dim total = dr.Total
                    Dim charged = dr.getCharged(dr.PONumber)
                    Dim nw As DataRow = datas.Tables(0).NewRow()
                    nw(0) = vendor
                    nw(1) = ponbr
                    nw(2) = poDate
                    nw(3) = company
                    nw(4) = order
                    nw(5) = total
                    nw(6) = charged
                    datas.Tables(0).Rows.Add(nw)
                Next
                '' bind the datasource+
                Dim objRpt As New PurchaseByVendor
                objRpt.SetDataSource(datas.Tables(0))
                Dim wfp As New WindowFormReport()
                wfp.CrystalReportsViewer1.ViewerCore.ReportSource = objRpt
                Me.NavigationService.Navigate(wfp)
                con.Close()
                con.Dispose()
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Sub
    Thanks!

    What version fo CR you are using, what service pack?
    What CR components are installed on the client machine for deployment?
    When using datasets to pass the data to Crystal reports, the issue occurs due to datasets in 50% of cases.
    What exact error do you get?
    Could you try below steps which would tell you if its an issue with Crystal or with getting data into datasets.
    - Once the data is populated in the dataset and before doing a "objRpt.SetDataSource(datas.Tables(0))", write the data to a datagrid.
    - While deploying the EXE, you could observe the datagrid to check fi the datasets do return some data.
    This may not be a Crystal issue.
    if you get the data in the datagrid and not in the report then do a 'ds.writeXml("XMLfilepath.xml")'. this will generate the XML file with the data from the dataset. the open the report indeaigner and try to assign the XMl to the report and see if the report works in thed esigner.
    - Bhushan
    Senior Engineer
    SAP Active Global Support
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place
    Getting started and moving ahead with Crystal Reports .NET applications.

  • Problem with XML in APEX ORA-06502

    i, I have a problem with XML generation, I developed an application in APEX, and in a html page I have this process:
    declare
    l_XML varchar2(32767);
    begin
    select xmlElement
    "iva",
    xmlElement("numeroRuc",J.RUC),
    xmlElement("razonSocial", J.RAZON_SOCIAL),
    xmlElement("idRepre", J.ID_REPRE),
    xmlElement("rucContador", J.RUC_CONTADOR),
    xmlElement("anio", J.ANIO),
    xmlElement("mes", J.MES),
    xmlElement
    "compras",
    select xmlAgg
    xmlElement
    "detalleCompra",
    --xmlAttributes(K.ID_COMPRA as "COMPRA"),
    xmlForest
    K.COD_SUSTENTO as "codSustento",
    K.TPLD_PROV as "tpldProv",
    K.ID_PROV as "idProv",
    K.TIPO_COMPROBANTE as "tipoComprobante",
    to_char(K.FECHA_REGISTRO, 'DD/MM/YYYY') as "fechaRegistro",
    K.ESTABLECIMIENTO as "establecimiento",
    K.PUNTO_EMISION as "puntoEmision",
    K.SECUENCIAL as "secuencial",
    to_char(K.FECHA_EMISION, 'DD/MM/YYYY') as "fechaEmision",
    K.AUTORIZACION as "autorizacion",
    to_char(K.BASE_NO_GRA_IVA, 9999999999.99) as "baseNoGraIva",
    to_char(K.BASE_IMPONIBLE, 9999999999.99) as "baseImponible",
    to_char(K.BASE_IMP_GRAV, 9999999999.99) as "baseImpGrav",
    to_char(K.MONTO_ICE, 9999999999.99) as "montoIce",
    to_char(K.MONTO_IVA, 9999999999.99) as "montoIva",
    to_char(K.VALOR_RET_BIENES, 9999999999.99) as "valorRetBienes",
    to_char(K.VALOR_RET_SERVICIOS, 9999999999.99) as "valorRetServicios",
    to_char(K.VALOR_RET_SERV_100, 9999999999.99) as "valorRetServ100"
    xmlElement
    "air",
    select xmlAgg
    xmlElement
    "detalleAir",
    xmlForest
    P.COD_RET_AIR as "codRetAir",
    to_char(P.BASE_IMP_AIR, 9999999999.99) as "baseImpAir",
    to_char(P.PORCENTAJE_AIR, 999.99) as "porcentajeAir",
    to_char(P.VAL_RET_AIR, 9999999999.99) as "valRetAir"
    from ANEXO_COMPRAS P
    where P.ID_COMPRA = K.ID_COMPRA
    AND P.ID_INFORMANTE_XML = K.ID_INFORMANTE_XML
    xmlElement("estabRetencion1", K.ESTAB_RETENCION_1),
    xmlElement("ptoEmiRetencion1", K.PTO_EMI_RETENCION_1),
    xmlElement("secRetencion1", K.SEC_RETENCION_1),
    xmlElement("autRetencion1", K.AUT_RETENCION_1),
    xmlElement("fechaEmiRet1", to_char(K.FECHA_EMI_RET_1,'DD/MM/YYYY')),
    xmlElement("docModificado", K.DOC_MODIFICADO),
    xmlElement("estabModificado", K.ESTAB_MODIFICADO),
    xmlElement("ptoEmiModificado", K.PTO_EMI_MODIFICADO),
    xmlElement("secModificado", K.SEC_MODIFICADO),
    xmlElement("autModificado", K.AUT_MODIFICADO)
    from SRI_COMPRAS K
    WHERE K.ID IS NOT NULL
    AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
    AND K.ID BETWEEN 1 AND 25
    ).getClobVal()
    into l_XML
    from ANEXO_INFORMANTE J
    where J.ID_INFORMANTE =:P3_MES
    and J.RUC =:P3_ID_RUC
    and J.ANIO =:P3_ANIO
    and J.MES =:P3_MES;
    --HTML
    sys.owa_util.mime_header('text/xml',FALSE);
    sys.htp.p('Content-Length: ' || length(l_XML));
    sys.owa_util.http_header_close;
    sys.htp.print(l_XML);
    end;
    Now my table has more than 900 rows and only when I specifically selected 25 rows of the table "ANEXO_COMPRAS" in the where ( AND K.ID BETWEEN 1 AND 25) the XML is generated.+
    I think that the problem may be the data type declared "varchar2", but I was trying with the data type "CLOB" and the error is the same.+
    declare
    l_XML CLOB;
    begin
    --Oculta XML
    sys.htp.init;
    wwv_flow.g_page_text_generated := true;
    wwv_flow.g_unrecoverable_error := true;
    --select XML
    select xmlElement
    from SRI_COMPRAS K
    WHERE K.ID IS NOT NULL
    AND K.ID_INFORMANTE_XML = J.ID_INFORMANTE
    ).getClobVal()
    into l_XML
    from ANEXO_INFORMANTE J
    where J.ID_INFORMANTE =:P3_MES
    and J.RUC =:P3_ID_RUC
    and J.ANIO =:P3_ANIO
    and J.MES =:P3_MES;
    --HTML
    sys.owa_util.mime_header('text/xml',FALSE);
    sys.htp.p('Content-Length: ' || length(l_XML));
    sys.owa_util.http_header_close;
    sys.htp.print(l_XML);
    end;
    The error generated is ORA-06502: PL/SQL: numeric or value error+_
    Please I need your help. I don`t know how to resolve this problem, how to use the data type "CLOB" for the XML can be generate+

    JohannaCevallos07 wrote:
    Now my table has more than 900 rows and only when I specifically selected 25 rows of the table "ANEXO_COMPRAS" in the where ( AND K.ID BETWEEN 1 AND 25) the XML is generated.+
    I think that the problem may be the data type declared "varchar2", but I was trying with the data type "CLOB" and the error is the same.+
    The error generated is ORA-06502: PL/SQL: numeric or value error+_
    Please I need your help. I don`t know how to resolve this problem, how to use the data type "CLOB" for the XML can be generate+The likeliest explanation for this is that length of the XML exceeds 32K, which is the maximum size that <tt>htp.p</tt> can output. A CLOB can store much more than this, so it's necessary to buffer the output as shown in +{message:id=4497571}+
    Help us to help you. When you have a problem include as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    And always post code wrapped in <tt>\...\</tt> tags, as described in the FAQ.
    Thanks

  • Issue while opening SSRS Report with Oracle as Datasource in Report Manager

    I deployed SSRS report in Report Manager but I am unable to generate that report. Am getting following error.
    Is it problem with datasource in report manager? I am not able to change the Data source type to Oracle. It is showing Microsoft SQL Server. How can I change it, no other options are coming except Microsoft SQL Server. Please help.
    An
    error has occurred during report processing. (rsProcessingAborted)
    Cannot
    create a connection to data source 'TEST_DS'. (rsErrorOpeningConnection)
    For
    more information about this error navigate to the report server on the local
    server machine, or enable remote errors

     When I deploy them in localhost, and try to run report in report manager, it is not showing any data source type in drop down list except MS SQL Server. I do not know why it is showing in BIDS and not in report manager!!!
    Hello,
    Based on my test, I can specify the data source type as Oracle after deploy the report to Report Manager and open the report Data source propertity page. If the report use the shared data source, you should check the specify data source at the Data Source
    folder. Please refer to the following screen shot:
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Incorrect XML output data in Report 6i, other formats are ok

    Hi,
    A very strange problem when running 6i report (database is 10g). Everything is fine when running the report, when I tried to use Generate to file from the File menu to different file formats, pdf, html and rtf formats are all good, but xml format gave some extra data, it seems it lost some conditions in where clause.
    Any idea?
    Thanks in advance.
    Andrew

    I still doubt it..
    What ever character you have it in database, is going to be fetched in xml..
    be in Report builder, or sql, pl/sql.
    the way the data is being converted is the first we need to see.. if the character is getting messed here..
    once you got it as xml, and open xml in browser, then the parser finds the encoding in the top of xml, and renders the character . if it cannot understand the encoding character, then it will skip or do some abnormal things..
    oracle apps , is generating xml ?? what is that means ??
    data-template ? pl/sql or sql ??

  • Failed to push XML template when setup SMD Managed system

    Hi,
    when I setup a managed system in SMD, I receive the warning:
    XML Templates pushed : 0 successful, 1 failed
    Failed to push XML template to sv50761/TP4/10 (sv50761.RUV.DE) : com.sap.engine.lib.xml.parser.ParserException: XMLParser: Bad Attribute value(:main:, row:10, col:79)(cause=com.sap.engine.lib.xml.pars
    er.ParserException XMLParser: Bad Attribute value (:main:, row:10, col:79))
    (Data Collect may fail due to missing templates)
    Do you still want to proceed ? (Setup operations may fail due to warnings above)
    when I check the xml-templates, at the mentioned row, there's the database-information: it shows "9.00.3068#" (a binary value, instead of #)
    when I check the database in SMSY there's "9.00.3068#" in version as well, I can't change it there manually, because datasource is TMS/RFC.
    In SLD the Version vor the database is displayed correct: 9.00.3068 (without #).
    Where does the # occur & how to delete it? How can we setup managed systems without the warning?
    kr, achim

    Just came across this issue and this snote fixed it.
    Note 1156714 - Failure to push XML templates during Diagnostics Setup

  • Having a problem importing xml into an indesign template.

    I am having a problem importing xml into an indesign template. The xml data is there and will populate the columns on the document but I am having problems matching styles, removing data that should not be mapped and importing repeated same fields but differnet data.
    Message me if this is something you can do quickly for a fee.

    Also you can check the following link
    [Reporting|http://devlibrary.businessobjects.com/BusinessObjectsXIR2/en/devsuite.htm]
    Regards,
    Tej

  • XML - On The Fly Report Error-

    Hi,
    We are using the XML On The Fly report generation option to show the measurement data to our operators while they are testing the products.
    But we have experienced that this option isn’t updating the report field in the TestStand Editor or OI correctly during execution when a sub seq. is calling a sub seq (not a abnormal situation).
    It looks like that the “ProcessOTFStepResult” in “reportgen_xml.seq” can’t add the “StepResultBody” to the “ResultBody” when the call stack exceed 3 levels.
    Is this an Option (adjustable), Limitation or a bug? Is there a solution to this problem?
    I have attached an example that show the problem. It’s made in TS 3.1 but the problem is also seen in 3.5. Run it with the sequential model. It shows a dialog in each level of sub sequences, so it’s possible to follow the OTF report generation in the report tab. In the end (when the call stack is increased again all the report items is updated correctly.)
    I´m looking forward to hear from you.
    Best Regards,
    Morten Pedersen
    CIM Industrial Systems A/S
    Attachments:
    OTF Log test.zip ‏86 KB

    Lars  -
    As it is designed today, the logger requires that the SQL statement contain an INSERT command. If it is not found, I do not believe that on-the-fly logging will work if the schema defines a foreign key to the UUT record.
    Now, I have not tried this, but if the step result statements in the schema do not define their UUT_RESULT columns as foreign keys, the logger will just assume that they are data that you will provide, and it will not attempt to log a placeholder for the UUT record. So I believe you can then set the expression for the UUT_RESULT in the step results to assign the UUT key and the logger will just log it as a value. The database schema will likely have a constraint, but if you pre-create the record as you were suggesting, the constraint will be satisfied when you log the step result. Lastly when the UUT completes, the logger will just log the values using the UPDATE statement that you supplied.
    Note that we already do have a internal suggestion/problem tracking issue (ID 47056), specifically to add support to log more than just the key for the UUT result and parent sequence call steps, but we have not determined how easy that would be and whether there are any backwards compatibility issues.
    Scott Richardson
    National Instruments

  • Facing Problem with passing Values from One report to another

    Hi,
    I am Hemanth, I have developed 2 reports. Firast Report High Level Summary, Secong is detailed. First report is developed using Union(4 union) , I am having 4 columns. The report is generating the data. I have used Navigation option on Client Column to move on to Second report. In Second report with in Filter i am using Prompted option. Due to some problem, the client value from first report is not passing to the second one. The second report is getting generated for all the clients.
    Normally i have used this Navigate option in other reports and that works fine. I have even tested with Union, it works. This time it is giving some trouble.
    Please, let me know whats going wrong.
    Thanks for the help.

    sorry for the late updation.
    My First Report, Summary level is a Pivot Table.
    I tried the same report with Table option, the value is passing correctly.
    Is there a way to get rid of this situation using Pivot table.
    Thanks for your help.
    below is the original request.
    Hi,
    I am Hemanth, I have developed 2 reports. Firast Report High Level Summary, Secong is detailed. First report is developed using Union(4 union) , I am having 4 columns. The report is generating the data. I have used Navigation option on Client Column to move on to Second report. In Second report with in Filter i am using Prompted option. Due to some problem, the client value from first report is not passing to the second one. The second report is getting generated for all the clients.
    Normally i have used this Navigate option in other reports and that works fine. I have even tested with Union, it works. This time it is giving some trouble.
    Please, let me know whats going wrong.
    Thanks for the help.

  • Problem with XML on Linux

    hi everybody,
    I've a big problem with XML on Linux, in details I see my program stopping on Linux at the instruction
    XMLReader xr = XMLReaderFactory.createXMLReader("org.apache.crimson.parser.XMLReaderImpl");
    and it's strange because on Windows it runs and there aren't problems about permissions on files, does anyone knows what to do?
    thanks in advance!
    Stefano

    What happens on that line? I'm assuming you get some kind of error or exception.
    Make sure the JAR file for Crimson is in your classpath.

  • XML Pub: Purchase Order  Report (Portrait) running too long

    Hi:
    "XML Pub: Purchase Order Report (Portrait)" running too long. It should be 1min. but now over 20min. This is 11.5.10.2 on unix.
    The log file is like the following. It stops there. I checked another one ran before, there are more data...
    +-----------------------------
    | Starting concurrent program execution...
    +-----------------------------
    Arguments
    P_report_type='R'
    P_po_num_from='6640015'
    P_po_num_to='6640015'
    P_test_flag='N'
    P_user_id='14955'
    P_QTY_PRECISION='4'
    P_fax_ind='N'
    P_EMAIL_IND='N'
    P_REQUEST_SOURCE='MANUAL'
    Environment will now switch to UTF-8 code-set.
    Parts of this log file may not display correctly
    as a result. This is an expected behavior.
    XML_REPORTS_XENVIRONMENT is :
    /oracle/product/8.0.6finshdw/guicommon6/tk60/admin/Tk2Motif_UTF8.rgb
    XENVIRONMENT is set to /oracle/product/8.0.6finshdw/guicommon6/tk60/admin/Tk2M
    otif_UTF8.rgb
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    American_America.UTF8
    ===============================================
    From the internal Manager log:
    Process monitor session started : 29-APR-2011 12:35:56
    Internal Concurrent Manager found node APPSNOTE2 to be down. Adding it to the l
    ist of unavailable nodes.
    Process monitor session ended : 29-APR-2011 12:36:00
    Process monitor session started : 29-APR-2011 12:38:00
    Process monitor session ended : 29-APR-2011 12:38:04
    Process monitor session started : 29-APR-2011 12:40:04
    Process monitor session ended : 29-APR-2011 12:40:09
    Process monitor session started : 29-APR-2011 12:42:09
    Internal Concurrent Manager found node APPSNOTE1 to be down. Adding it to the l
    ist of unavailable nodes.
    Process monitor session ended : 29-APR-2011 12:42:15
    ======================
    please advise.

    last lines of FNDCPGSC29793.tx
    )]:BEGIN :[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.sleep()]:Waiting 10 seconds (10000 ms)
    [ 1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.run()]:Running loop from the top.
    -1:-1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.processControlEvent(String)]:BEGIN (noEvent)
    :-1:-1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.processControlEvent(String)]:Did not receive any control events.
    -1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsm.GSMQueueProcessor.process()]:BEGIN
    :-1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsm.GSMQueueProcessor.read()]:BEGIN
    :-1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.run()]:Running loop from the top.
    -1:-1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.processControlEvent(String)]:BEGIN (noEvent)
    :-1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.processControlEvent(String)]:Did not receive any control events.
    :-1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.SvcComponentMonitor.process()]:BEGIN
    -1:-1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.SvcComponentMonitor.startAutomaticComponents()]:BEGIN
    -1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.SvcComponentMonitor.process()]:On-Demand monitoring will not occur this round; the count is 3 out of 5
    [Apr 29, 2011 1:19:5 :-1:-1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.run()]:Resetting Error Count
    [Apr 29, 2011 1:19:51  1:-1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.sleep()]:BEGIN :1304097591452:Thread[ComponentMonitor,5,main]:0:-1:
    -1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.sleep()]:Waiting 60 seconds (60000 ms)
    [Apr 29, 2011 1:20:00 PM EDT] 1:-1:PROCEDURE:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.sleep()]:BEGIN
    [Apr 29, 2011 1:20:00 PM EDT]: 4:-1:-1:STATEMENT:[SVC-GSM-WFALSNRSVC-262965 : oracle.apps.fnd.cp.gsc.Processor.sleep()]:Waiting 10 seconds (10000 ms)
    Edited by: user9231603 on Apr 29, 2011 10:22 AM
    Edited by: user9231603 on Apr 29, 2011 10:25 AM

  • Need to generate a Index xml file for corresponding Report PDF file.

    Need to generate a Index xml file for corresponding Report PDF file.
    Currently in fusion we are generating a pdf file using given Rtf template and dataModal source through Ess BIPJobType.xml .
    This is generating pdf successfully.
    As per requirement from Oracle GSI team, they need index xml file of corresponding generated pdf file for their own business scenario.
    Please see the following attached sample file .
    PDf file : https://kix.oraclecorp.com/KIX/uploads1/Jan-2013/354962/docs/BPA_Print_Trx-_output.pdf
    Index file : https://kix.oraclecorp.com/KIX/uploads1/Jan-2013/354962/docs/o39861053.out.idx.txt
    In R12 ,
         We are doing this through java API call to FOProcessor and build the pdf. Here is sample snapshot :
         xmlStream = PrintInvoiceThread.generateXML(pCpContext, logFile, outFile, dbCon, list, aLog, debugFlag);
         OADocumentProcessor docProc = new OADocumentProcessor(xmlStream, tmpDir);
         docProc.process();
         PrintInvoiceThread :
              out.println("<?xml version=\"1.0\" encoding=\"UTF-8\" ?>");
                   out.print("<xapi:requestset ");
                   out.println("<xapi:filesystem output=\"" + outFile.getFileName() + "\"/>");
                   out.println("<xapi:indexfile output=\"" + outFile.getFileName() + ".idx\">");
                   out.println(" <totalpages>${VAR_TOTAL_PAGES}</totalpages>");
                   out.println(" <totaldocuments>${VAR_TOTAL_DOCS}</totaldocuments>");
                   out.println("</xapi:indexfile>");
                   out.println("<xapi:document output-type=\"pdf\">");
    out.println("<xapi:customcontents>");
    XMLDocument idxDoc = new XMLDocument();
    idxDoc.setEncoding("UTF-8");
    ((XMLElement)(generator.buildIndexItems(idxDoc, am, row)).getDocumentElement()).print(out);
    idxDoc = null;
    out.println("</xapi:customcontents>");
         In r12 we have a privilege to use page number variable through oracle.apps.xdo.batch.ControlFile
              public static final String VAR_BEGIN_PAGE = "${VAR_BEGIN_PAGE}";
              public static final String VAR_END_PAGE = "${VAR_END_PAGE}";
              public static final String VAR_TOTAL_DOCS = "${VAR_TOTAL_DOCS}";
              public static final String VAR_TOTAL_PAGES = "${VAR_TOTAL_PAGES}";
    Is there any similar java library which do the same thing in fusion .
    Note: I checked in the BIP doc http://docs.oracle.com/cd/E21764_01/bi.1111/e18863/javaapis.htm#CIHHDDEH
              Section 7.11.3.2 Invoking Processors with InputStream .
    But this is not helping much to me. Is there any other document/view-let which covers these thing .
    Appreciate any help/suggestions.
    -anjani prasad
    I have attached these java file in kixs : https://kix.oraclecorp.com/KIX/display.php?labelId=3755&articleId=354962
    PrintInvoiceThread
    InvoiceXmlBuilder
    Control.java

    You can find the steps here.
    http://weblogic-wonders.com/weblogic/2009/11/29/plan-xml-usage-for-message-driven-bean/
    http://weblogic-wonders.com/weblogic/2009/12/16/invalidation-interval-secs/

  • Problem sending a standard landscape SSRS report to a printer

    I have successfully used the Printer Delivery Extension sample (_//msdn.microsoft.com/en-us/library/ms252091(v=vs.100).aspx) in a vb.net  winforms application to send a 28” X 17” rdlc report to a specialty printer.
    However, I cannot seem to successfully send an 8.5” X 11” landscape report (rdlc) directly to a printer without preview or printdialog using the same approach.
    I have tried setting the paper size to “custom” in Report Properties in the report design  (this automatically reverts to “Letter” due to the dimensions).  I also tried reversing the width/height dimensions  in the report design and in the “PageWidth”
    and “PageHeight” settings in the <DeviceInfo> configuration info for the output emf file.  I have tried various combinations of PrintDocument settings (including setting DefaultPageSettings.Landscape=true), with no success. I also tried setting
    the DefaultPageSetting pages size to one I created programmatically with the correct dimensions (1100/850). Even though it is defined as a landscape report, I get either a report broken over 2 portrait pages, or a report squeezed into a smaller area on a single
    portrait page.
    I don’t know if there is a device setting that would “tell” the emf file that this is a landscape report, but it’s almost like that information is not being passed, despite of all the settings I have experimented with.
    Does anybody have any suggestions?  I have researched this online and tried every suggestion I have read.  According to other posts, some others had been unable to get this to work also.
    UPDATE: This problem is still unresolved.  The report now prints in landscape mode, but the intended 10"X9" report is being compressed into an area 8.5" wide.  This is an excerpt of the code I am using:
        Friend Sub Run(ByRef report As LocalReport, printerName As String)
            Export(report)
            Print(printerName)
        End Sub
        Private Sub Export(ByVal report As LocalReport)
            Dim deviceInfo As String = "<DeviceInfo>" & _
                "<OutputFormat>EMF</OutputFormat>" & _
                "<PageWidth>11in</PageWidth>" & _
                "<PageHeight>8.5in</PageHeight>" & _
                "<MarginTop>0in</MarginTop>" & _
                "<MarginLeft>0in</MarginLeft>" & _
                "<MarginRight>0in</MarginRight>" & _
                "<MarginBottom>0in</MarginBottom>" & _
                "</DeviceInfo>"
            Dim warnings As Warning()
            m_streams = New List(Of Stream)()
            Try
                report.Render("Image", deviceInfo, AddressOf CreateStream, warnings)
                For Each stream As Stream In m_streams
                    stream.Position = 0
                Next
            Catch ex As Exception
                ErrorRoutine.sendError("SendReportToPrinter.Export", ex)
            End Try
        End Sub
    Private Sub Print(currentPrinter
    As String)
        Try
            If m_streams
    Is Nothing OrElse m_streams.Count
    = 0 Then
            End If
            'set the print control for print document to StandardPrintController to suppress print dialog
            printDoc.PrintController
    = New Printing.StandardPrintController
            printDoc.PrinterSettings.PrinterName
    = currentPrinter
            If Not printDoc.PrinterSettings.IsValid
    Then
                Throw
    New System.Exception("Error: cannot find printer.")
            Else
                m_currentPageIndex
    = 0
                AddHandler printDoc.PrintPage,
    AddressOf PrintListPage
                Dim pkSize
    As New PaperSize("Custom",
    1100, 850)
                printDoc.DefaultPageSettings.PaperSize
    = pkSize
                printDoc.DefaultPageSettings.Landscape
    = True
                printDoc.PrinterSettings.DefaultPageSettings.PaperSize
    = pkSize
                printDoc.Print()
            End If
        Catch e As Exception
            MsgBox("Error:"
    & e.Message, MsgBoxStyle.OkOnly)
        End Try
    End Sub
    Private Sub PrintListPage(ByVal sender
    As Object,
    ByVal ev As PrintPageEventArgs)
        Dim pageImage As
    New Metafile(m_streams(m_currentPageIndex))
        ev.PageSettings.Landscape
    = True
        ' Adjust rectangular area with printer margins.
        Dim adjustedRect As
    New Rectangle(ev.PageBounds.Left
    - CInt(ev.PageSettings.HardMarginX), _
                                          ev.PageBounds.Top
    - CInt(ev.PageSettings.HardMarginY), _
                                          ev.PageBounds.Width,
                                          ev.PageBounds.Height)
        ' Draw a white background for the report
        ev.Graphics.FillRectangle(Brushes.White, adjustedRect)
        ' Draw the report content
        ev.Graphics.DrawImage(pageImage, adjustedRect)
        ' Prepare for the next page. Make sure we haven't hit the end.
        m_currentPageIndex += 1
        ev.HasMorePages =
    (m_currentPageIndex < m_streams.Count)
    End Sub
    When stepping through the code in PrintListPage using debug, ev.PageSettings.Papersize shows a width and height of 1100 and 850, and ev.PageSettings.Landscape is set to True.  However, the rectangle shows a size corresponding to 8.5 X 11.  In    
    Dim adjustedRect As New Rectangle(ev.PageBounds.Left - CInt(ev.PageSettings.HardMarginX), _                                     
    ev.PageBounds.Top - CInt(ev.PageSettings.HardMarginY), _                                     
    ev.PageBounds.Width, ev.PageBounds.Height)
    I have tried swapping ev.PageBounds.Width and ev.PageBounds.Height, and actually hard coding numeric values for width and height, and the rectangle still appears to be dimensioned as portrait.  Does anybody see what I am doing wrong, and how to fix
    this?

    With active debug i got following information:
    The first mail in the debug-log is with the source code as quoted in my first post, the second mail is when i cut out the part which generates and adds the attachement. I had to make the adresses anonymous, but the second mail contains a lot more adresses then the first, although they both use the same query with same parameters, etc.
    Have i done something wrong with the attachements? Overwriting headers, syntax errors, anything? I'm out of ideas...
    edit: Had to cut out the debug-log because it is too big. It just said that everything was working ok, but the first mail contains too few adresses and the second (without attachement) the correct number of adresses. I can mail the log, if you like.

  • How to retrieve data from xml file into obiee reports

    Hi all,
    I've got a situation here. A xml file is stored as blob in oracle database table. Now i need to retrieve data/info from that xml file into obiee reports. How am i supposed to proceed with this ?

    I will go for a table function:
    http://gerardnico.com/wiki/database/oracle/table_function
    In two words, you can create a function that behave as a table. Then you create a function to pick up your xml, you parse it and you send back the rows.
    I know that Oracle has also a library for XML files but I never use it until now.
    Success
    Nico

Maybe you are looking for