Distribution.xml problem in 10g reports...

Hi freinds,
Iam generalizing the distrubution.xml file for emailing from the report. It looks like this.
<destinations>
<mail id= "mail_id" to= "&amp;&lt;P_recipient_email&gt;" cc= "&amp;&lt;P_cc_email&gt;" bcc= "&amp;&lt;P_bcc_email&gt;"
from= "&amp;&lt;P_sender_email&gt;" subject= "&amp;&lt;P_mail_subject&gt;">
     <body srcType="text">
"&amp;&lt;P_mail_body&gt;"
     </body>
     <attach format= "&amp;&lt;P_format&gt;" name= "&amp;&lt;P_attachment_name&gt;" srcType="report">
     <include src="report"/>
     </attach>
</mail>
</destinations>
I have 3 problems.
1) When I pass dynamic value for "format" attribute it is giving following error :
REP-34304: 7
NMToken must contain atleast one NMChar.
REP-34304: Distribution failed to complete, please review the distribution lists
How Can I pass a dynamic value for "format" attribute in the < attachment > tag ?
2) When I pass dynamic value for "attachment name" attribute it is giving following error :
REP-34308: Invalid reference parameter 'P_attachment_name' in distribution list
How Can I pass a dynamic value for "name" attribute in the < attachment > tag ?
3) I want to pass the body text dynamically from the report. So Iam passing P_mail_body parameter from the report
and referencing in the distribution.xml file like this, "&amp;&lt;P_mail_body&gt;".
But it is not printing the p_mail_body variable value.
It is printing "&<P_mail_body>" in the body of the email.
How to pass dynamic body text from the report into distrubution.xml file ?
Plese help me.
Thanks alot.

Hi all,
first of all I would recommend not to use &, < and > inside the xml-definition. Use instead of
&<ename>
the following coding
&amp;&lt;ename&gt;
This is because Reports and XML have a overlapped using of these signs.
1: no anser, sorry for that
2: I've testet with
name="Department &amp;&lt;deptno&gt;.pdf"
which works fine
3: You can build your dynamic body for example in the header of the report and reference them in the distribution file. Then your XML-File looks like
<body srcType="report" format="html">
<include src="headerSection"/>
</body>
For the Header you had to use the same "Repeat On" Property Value than for your Report Body, if you use advanced bursting.
Hope that helps
Rainer

Similar Messages

  • Reports Requirements using R12 and Oracle 10g Reports

    Hi All,
    Looking forward to some valuable inputs to propose a technical solution in R12 using 10g Reports Developer.
    Requirements are :
    1. Report output should be in Excel Format. ( Is this possible without XML Publisher using 10g Reports only )
    2. Report Parameters to have multi selection criteria. ( Is this possible in 10g Reports and Oracle Apps, Report Manager responsibility ?)
    Regards,
    Anand

    >
    1. Report output should be in Excel Format. ( Is this possible without XML Publisher using 10g Reports only )
    >
    Yes, Reports can create output in Excel - but XML Publisher offers better and easier options.
    >
    2. Report Parameters to have multi selection criteria. ...
    >
    Pl explain what you mean by multi selection criteria.
    HTH
    Srini

  • Pass the file id or a parameter from a report (10g) to the distribution.xml

    Is there any way to pass the file id or a parameter from a report (10g) to the distribution.xml file?

    Hi,
    Please review article ID 273960.1 on metalink.
    The article actually describes an issue one may run into while enabling a reports distribution xml file to accept dynamic values, but you can extract the answer you're looking for by studying the above mentioned note.
    Best Regards and Good Luck,
    Mircea.

  • 10g Reports issue with XML Data Source

    Hi,
    Has anybody ever encountered an issue with Oracle 10g report using an XML as the data source? What happens is, some of the values in the XML are printed to the wrong column.
    One of the elements in our XML file is a complex type with 10 elements under it. The first 5 are picked up properly, but the last 6 are not. Elements #6 to #9 has a minimum occurence of 0. What happens is when element #6 is present, but #7 is, the value for element #7 is passed on to element #6.
    The XSD and XSL files are both valid since the reports were working when we were still using 9i. There is no hidden logic in the report which might cause this issue to come up, i.e., the report just picks up the values from the XML and prints it to the appropriate columns.
    Any help will be greatly appreciated.

    XSD used
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
            <!-- trade instructions detail & trailer -->
            <xs:element name="TradeDetail">
                    <xs:complexType>
                            <xs:sequence>
                                    <xs:element ref="TradeType"/>
                                    <xs:element ref="TradeID"/>
                                    <xs:element ref="TradeDate"/>
                                    <xs:element ref="FundID"/>
                                    <xs:element ref="FundName"/>
                                    <xs:element ref="DollarValue" minOccurs="0"/>
                                    <xs:element ref="UnitValue" minOccurs="0"/>
                                    <xs:element ref="PercentageValue" minOccurs="0"/>
                                    <xs:element ref="OriginalTradeID" minOccurs="0"/>
                                    <xs:element ref="CancellationFlag"/>
                            </xs:sequence>
                    </xs:complexType>
            </xs:element>
            <xs:element name="Instruction">
                    <xs:complexType>
                            <xs:sequence minOccurs="0">
                                    <xs:element ref="TradeDetail" maxOccurs="unbounded"/>
                            </xs:sequence>
                    </xs:complexType>
            </xs:element>
            <!-- overall trade instruction message -->
            <xs:element name="InterchangeHeader">
                    <xs:complexType>
                            <xs:sequence>
                                    <xs:element ref="Instruction"/>
                            </xs:sequence>
                    </xs:complexType>
            </xs:element>
            <!-- definition of simple elements -->
            <xs:element name="FundID" type="xs:string"/>
            <xs:element name="TradeType" type="xs:string"/>
            <xs:element name="TradeID" type="xs:string"/>
            <xs:element name="TradeDate" type="xs:string"/>
            <xs:element name="FundName" type="xs:string"/>
            <xs:element name="DollarValue" type="xs:decimal"/>
            <xs:element name="UnitValue" type="xs:decimal"/>
            <xs:element name="PercentageValue" type="xs:decimal"/>
            <xs:element name="OriginalTradeID" type="xs:string"/>
            <xs:element name="CancellationFlag" type="xs:string"/>
    </xs:schema>
    XML used
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <InterchangeHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="TradeInstruction.xsd">
       <Instruction>
          <TradeDetail>
             <TradeType>Purchase</TradeType>
             <TradeID>M000038290</TradeID>
             <TradeDate>20061201</TradeDate>
             <FundID>ARO0011AU</FundID>
             <FundName>ABN Fund</FundName>
             <DollarValue>2111.53</DollarValue>
             <CancellationFlag>N</CancellationFlag>
          </TradeDetail>
          <TradeDetail>
             <TradeType>Redemption</TradeType>
             <TradeID>M000038292</TradeID>
             <TradeDate>20061201</TradeDate>
             <FundID>ARO0011AU</FundID>
             <FundName>AMRO Equity Fund</FundName>
             <UnitValue>104881.270200</UnitValue>
             <CancellationFlag>N</CancellationFlag>
          </TradeDetail>
          <TradeDetail>
             <TradeType>ISPurchase</TradeType>
             <TradeID>M000038312</TradeID>
             <TradeDate>20061201</TradeDate>
             <FundID>MLC0011AU</FundID>
             <FundName>Cash Fund</FundName>
             <OriginalTradeID>M000038311</OriginalTradeID>
             <CancellationFlag>N</CancellationFlag>
          </TradeDetail>
       </Instruction>
    </InterchangeHeader>
    XSLT used
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
            <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
            <xsl:template match="/">
                    <InterchangeHeader>
                            <xsl:for-each select="InterchangeHeader/Instruction/TradeDetail">
                            <xsl:sort select="FundName"/>
                            <xsl:sort select="TradeDate"/>
                                    <TradeDetail>
                                            <TradeType><xsl:value-of select="TradeType"/></TradeType>
                                            <TradeID><xsl:value-of select="TradeID"/></TradeID>
                                            <TradeDate><xsl:value-of select="TradeDate"/></TradeDate>
                                            <FundID><xsl:value-of select="FundID"/></FundID>
                                            <FundName><xsl:value-of select="FundName"/></FundName>
                                            <DollarValue><xsl:value-of select="DollarValue"/></DollarValue>
                                            <UnitValue><xsl:value-of select="UnitValue"/></UnitValue>
                                            <PercentageValue><xsl:value-of select="PercentageValue"/></PercentageValue>
                                            <OriginalTradeID><xsl:value-of select="OriginalTradeID"/></OriginalTradeID>
                                            <CancellationFlag><xsl:value-of select="CancellationFlag"/></CancellationFlag>
                                    </TradeDetail>
                            </xsl:for-each>
                    </InterchangeHeader>
            </xsl:template>
    </xsl:stylesheet>

  • VAT declaration in XML - Problem with report RFASLDPC

    Hello all,
    I have a problem with the report RFASLDPC. We use it to download an XML file that we generated which contains the VAT declaration.
    In the report RFASDLPC, there is a FORM named QUELLFILE_PRUEFEN which stop the report and display a message : "Data file FILE_NAME is not correct".
    The reason is that QUELLFILE_PRUEFEN checks (for Belgium) that the beginning of my document starts with '000000' (six times zero). But this is impossible for an XML file to begin with '000000'. An XML file must begin with "<?xml version="1.0" ?>" or a least "<".
    Here is the code :
    FORM QUELLFILE_PRUEFEN.
      OPEN DATASET PAR_PATH FOR INPUT IN BINARY MODE.
      IF SY-SUBRC NE 0.
        MESSAGE E306 WITH PAR_PATH.        ''Quellfile nicht vorhanden
      ENDIF.
      READ DATASET PAR_PATH INTO HLP_RECORD.
      CASE PAR_FTYP.
        WHEN 'AT'.                         ''ASL Österreich
          IF HLP_RECORD(1) NE 'I' OR HLP_RECORD+46(2) NE 'ZM'.
            MESSAGE A185(FR) WITH PAR_PATH.
          ENDIF.
        WHEN 'BE'.                         ''ASL Belgien
          IF HLP_RECORD(6) NE '000000'.
            MESSAGE A185(FR) WITH PAR_PATH.
          ENDIF.
        WHEN 'ES'.                         ''ASL Spanien
    *     IF HLP_RECORD(1) NE '1' OR HLP_RECORD+104(3) NE '349'.
          IF HLP_RECORD(1) NE '1' OR HLP_RECORD+1(3) NE '349'.
            MESSAGE A185(FR) WITH PAR_PATH.
          ENDIF.
        when 'FI'.
          if hlp_record(3) ne '000'.
            MESSAGE A185(FR) WITH PAR_PATH.
          ENDIF.
      ENDCASE.
      CLOSE DATASET PAR_PATH.
    The line :
    READ DATASET PAR_PATH INTO HLP_RECORD.
    Put the 128 first character of the XML file in HLP_RECORD because HLP_RECORD is defined as :
    HLP_RECORD(128) TYPE C
    So as I work in Belgium, it is the condition :
    WHEN 'BE'.                         ''ASL Belgien
          IF HLP_RECORD(6) NE '000000'.
            MESSAGE A185(FR) WITH PAR_PATH.
          ENDIF.
    which is checked. But this condition cleary check if the beginning of the XML is '000000' and if it is not, it stop the program.
    I searched for all the SAP notes about RFASLDPC but I found none about this problem.
    Did someone else have also this problem ? Did you find a way to solve this ?
    Thank you in advance for your help.
    Best Regards.
    Gregory Pierre.

    anyone has an idea ? ...

  • Date format Problem in forms&reports Services 10g

    Hi Dears,
    I Faced a problem during running reports ( i am using forms& Reports Services 10g), when i pass the parameters via parameter form to the report (built in forms10g Rel 2.0) its appearing in arabic like (25-يناير-2010) as my Date Formate is (DD-YYYY-MON) and NLS_LANG parameter is defined as Arabic_Saudi arabia.AR8MSWIN1256 so as a result report is not running due to unknown Date formate, how can i change the Same Date format (DD-YYYY-MON) to appear in english like (25-2010-JAN)
    Thanks

    You could specify the parameter as type VARCHAR2, explicitly cast it (maybe to DD.MM.YYYY) when you pass it from forms and cast it back in your query, like TO_DATE(:P_PARAM, 'DD.MM.YYYY')

  • Oracle 10g Reports Server - problem authenticating against DB

    I have a problem with Oracle 10g Reports server authenticating against an Oracle RDBMS.
    When I try to run reports, an authentication form screen is presented, with the password field empty (the URL in explorer that loads this page contains the username and DB instance, but is missing the password) and the following error message:
    REP-51018: Need database user authentication
    When the password is entered into the empty field in the form and submitted, another 2 authentication errors are given.
    REP-51018: Need database user authentication
    REP-12545: java.sql.SQLException: ORA-12545: Connect failed because target host or object does not exist
    When the URL in the browser location field is manually altered to include the DB password, the reports are authenticated fine.
    Any ideas which config file I should be looking in?
    Any pointers would, of course, be much appreciated.
    thanks,
    Brian

    Hello, i finally have discovered what was happening, it has to be with the way FreeBSD passes the password field. By default FreeBSD passes the password field with a '*' while Oracle Linux (and Red Hat clones) expect an 'x' to look into shadow maps (Linux uses the '*' character in the password file to not allow login to that user).
    To solve it the password field served by the NIS server must be substituted, which is accomplished with nsswitch.conf and adding a line to the /etc/password file on the NIS Client, so the final files will look this way:
    # nsswitch.conf (compat directive allows us to use the '+' sintaxis in /etc/passwd file)
    passwd files compat
    # /etc/passwd (just add at the end of file)
    +:x:::::

  • 9i reports to 10g reports problems

    When we changed over to the 10g reports server all of our reports in 9i no longer work. This is the most common error we receive.
    REP-52006: Failed to decode the specified URL %1
    Any help on this subject would be greatly appreciated.
    Thanks

    We do not use the keymap option. We pass all parameters to the report via the url. Will this cause a problem with passing %? Also, we do not use a DEFAULTCHARSET in the rwservlet.properties file. Could this be the problem?
    Here is one error we get:
    REP-50003: Bad command line: ps_tirnoadf= destype=cache ps_respoffc=TORAPER ps_eiacodxa=xxxx report=xxxxx.rdf userid=xxxxxx/[email protected] desformat=pdf ps_tirorgby=
    Or we get this error:
    REP-52006: Failed to decode the specified URL %1
    These reports work when called from a 9i server and do not work when called from a 10g server.
    Thanks for the help.

  • How to create own attributes in the graph.xml of 10g Reports

    Hi,
    Iam using 10g reports. Iam recreating the graphs in 10g which were created in Graphics builder earlier. While doing that I found lot of features are missing in 10g reports charts wizard. It has only limited number of Graph types when compared to the Graphics builder. Like there is no Curve graph in 10g. The available are Line, Bar and Area. So how can I draw a curve instead of line? 10g Legend looks very ugly. There is lot of space between the values. Is there anyway that I can add my own attributes in the graph.xml and register in the reports?
    Please advise.
    Thanks.
    Ram Dontineni.

    Hi Ram,
    how can I draw a curve instead of line?I have posted a Q in BI Beans Forum for you, we should get an answer there:
    Curved Line Graph?
    10g reports charts wizard. It has only limited number of Graph types when compared to the Graphics builderThat may not be exactly true.
    10g Graph Wizard supports 11 major graph types, and 47 sub-types
    While 6i Graphics Builder supported 5 major graph types and 35 graph sub-types
    There are differences between 6i Graphics and 10g Graph Wizard, so certain things you might have been able to do in 6i may not be entirely possible in 10g. However, the main advantages of the 10g Graph option are - it internally uses BI Beans, which is used in ALL Oracle poducts like JDeveloper, Discoverer, Oracle Apps etc. So the customer gets a consistent look-and-feel. And that it is possible to define your Graph in XML format (and through Java API in JDeveloper).
    We have published a list of FAQ's on OTN where you should get answers to at least some of your Q's:
    http://otn.oracle.com/products/reports/index.html (click on Graphing FAQ)
    Is there anyway that I can add my own attributes in the graph.xml and register in the reports?This will not be possible, however, you should take a look at the complete list of elements and their attributes that is exposed in Graph.dtd - you can then choose the attributes you want, and add them to your Report's Graph.xml:
    http://otn.oracle.com/products/reports/htdocs/getstart/whitepapers/graphdtd/graph_dtd_technote_2.html
    Navneet.

  • Web.xml problem in Enterprise Manager 10g

    I got an error while deploying to Enterprise Manager 10g
    My platform: Windows XP
    OC4J 9.0.4
    Enterprise Manager 10g
    And I even have the web.xml in the correct directory. i.e
    cpd.ear
    ./META-INF/application.xml
    ./cpd-ejb.jar/WEB-INF/web.xml
    ./cpd-webapp.war/WEB-INF/web.xml
    ./cpd-webapp.war/WEB-INF/classes
    The error I get while deploying on a Enterprise Manager 10g is:
    Invalid J2EE application file specified - Jar file: :\WINNT\TEMP\jar47575.tmp is missing its standard xml descriptor located at WEB-INF/web.xml
    Incidently the *.ear file built by my fellow's machine is deploying perfectly. I've compared the directories n useful files of both the *.ears down to the very last bit n they are the same.
    I can imagine that guys with only high IQ can solve this mystery

    The above message is a duplicate of another message by Sim.
    web.xml problem in Enterprise Manager 10g

  • Report distribution.xml Issue for Mailing!!!

    In my distribution.xml file for mailing.
    1. I want a to create hyperlink in email body for which few parameters need to come from report like formname,org_id & reqno which are already in .rdf.
    I tried this in body but its NOT working like it works in subject cc bcc etc. to display
    <body srcType="text" >
    http://dw123:8889/forms90/f90servlet?config=myApp&firstparam=po_requisition_approval&secondparam=&amp;&lt;org_id&gt;&thirdparam=&amp;&lt;reqno&gt;
    </body>
    2.how can i use anchor tag of html in this above xml body .
    For the same link i want to create a anchor tag and i wil give some desc.
    for eg. "click here to approve"
    by clicking on text the above link need to executed.
    Quick response will be appreciated.
    Thanks in Advance.

    Hi dmars,
    What u said i right?
    But still i did'nt got what i need.
    i.e i want to replace the variable to actual data from report under email body
    like i do in to,cc,bcc while mailing.
    for eg here is my dist.xml file
    <destinations>
    <!-- Send a mail for each warehouse with the corresponding file attaceed-->
    <foreach>
    <mail id="ex2"
    to="&amp;&lt;email&gt;"
    from="[email protected]"
    subject="Auto Mail - Request for Purchase ">
    <body srcType="text">
    Dear &amp;&lt;name&gt;
    Please find the attached RFP (Request for Purchase) with the Mail.
    Thank you,
    </body>
    </mail>
    </foreach>
    variable "to" is coming from report.
    In the same way i want under body after Dear, the varible need
    to be place which is too from report.
    But this Dear &amp;&lt;name&gt; does'nt work WHY???
    </destinations>

  • 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;}%>

  • 10g Report to file causes unix permission problems

    I'm in the process of testing out one of the new options of 10g reports to have a report run from the command line and have the results file sent to a Unix directory for further use.
    Here is a sample of my run:
    http://myserver:port/reports/rwservlet?server=myreport_server+report=myreport.rep+userid=userid/pswd/@db+desformat=pdf+destype=file+desname=/tmp/my_report.pdf
    The results I see in the Unix directory are:
    rw-r--- 1 oracle dba my_report.pdf
    With the Unix permission set to 640, how does a user outside of the owner or group read this file. Is there a setting in a 10g environment variable somewhere to set the permissions to 644 so others can read the file?
    Thanks,
    Tom Vereecke

    Unfortunately i couldn't open your example as i only have LV 6.0, but i looked at the 'Save report to File.vi' in LV 6.0 and it basically only contains a 'Write characters to file.vi' for file handling. In LV 6.0 this vi does contain a 'Close file+.vi' which has an input called 'close when? (now:T)'. Make sure this is wired as True (default) and the file will close, and you should be able to delete the file (as long as the delete event occurs afterwards (make sure it is wired in sequence). In the LV help, it says the reason for the 'Write characters to file.vi' only closing if you tell it to (set as default) or if there is an error is so you can continually use it in a loop, writing characters to file, without closing, and then send a command to close
    it only on the last loop, or if there is an error. Therefore i dont think it is a bug, but i think there should be a wire for it on the 'Write characters to file.vi'.
    I hope this helps you..
    Kim

  • How to send email distribution to all users from report ?

    Hi all,
    I got the following report output :-
    Item_______Qty_On_hand_________Min_qty____Email
    [email protected]
    [email protected]
    [email protected]
    Once the reporis being generated, it will distirbute to all the email id list. Will this possible ? or any other better way to handle this ?
    Thanks.
    Rgds
    Lim

    hello,
    you need to use 9i or 10g for that. there you would set the "repeat on" property of you report to the group your report is based on. this will create one instance of your report for each person.
    then you need to use advanced distribution, create a distribution XML file that defines your desired email distribution with dynamic TO value.
    for further info about advanced distribution, consult the publisching reports manual.
    thanks,
    ph.

  • Dynamic file attachment in distribution.xml

    Hi
    I'm trying to attach a PDF file to a report using a distribution.xml file. If I hard code
    the filename it works fine but I need to attach a different file to every report so want
    to use a variable. Unfortunately this gives the error:
    Terminated with error: <br>REP-34304: Cannot locate the external file '&p_attachment' specified in destination 'm1'
    REP-34304: Distribution failed to complete; review the distribution lists My distribution.xml file is as follows:
    <destinations>
    <foreach>
    <mail id="m1" to="&p_email_to" from="&email_from" subject="&email_subject">
    <body format="html" srcType="report" instance="this">
    <include src="mainSection"/>
    </body>
    <attach name="ReturnNotice.pdf" srcType="file">
    <include src="&p_attachment"/>
    </attach>
    </mail>
    </foreach>
    </destinations>Any ideas?
    Thanks
    Martyn

    To answer my own question, changing
    <attach name="ReturnNotice.pdf" srcType="file">to
    <attach name="ReturnNotice.pdf" srcType="file" instance="this">fixes the problem...

Maybe you are looking for

  • Can't get adobe downloads in foxfire 5.0.1

    I am on 3.6.19 Foxfire. I CAN get downloads of financial statements.When I switched to 5, then 6 beta, I could no longer get downloads from them. I went back to 3.6.19 and I can can them. I keep getting notices to go to 5. so I tried it and adobe wou

  • Strange behaviour of StringBuilder. Does not append the last char buffer.

    Below is the source code I am using to read a .gz file and convert it into plain text. I am using StringBuilder to store the whole plain text as a string and also writing the plain text to a file on disk. The writing on disk works perfectly fine, but

  • Receive error when starting iTunes

    Receive error when starting iTunes "The registry settings used by the iTunes drivers for importing and burning CDs and DVDs are missing. This can happen as a result of installing other CD burning software. Please reinstall iTunes" I have with no succ

  • HT4972 How do i update when it doesnt show in settings?

    I just bought a used iPod 4 and it is not showing an update in settings, where else can I update?

  • How to setup to support more user support

    We plan to migrate our database from SQL Server to Oracle 10g to improve application system cocurrency.Our application system is C/S architecture.But,after my migration,I tested and found connection number is not as much as before.So,I want to know h