3 Replies Latest reply on Sep 19, 2012 6:32 PM by AlexAnd

    lexical parameter in bi report

      Hi All,
      I have a requirement as below :

      I have a select query in my XML file which is returning two rows for a order

      ex: select email,fax,order_number from

      My requirement is i need to pass 3 parameters such as order_number, email, fax to the report in that case it should take only the parameters what i am passing, and it should not take the hz_contact_points table from the query

      so i need to achieve this through lexical parameter, any one please help me on this.

        • 1. Re: lexical parameter in bi report
          you can try yo use lexical parameters like
          select &columns
           from  &tables
          where &where_clause
          and create beforeReportTrigger in plsql package

          as example look at https://blogs.oracle.com/xmlpublisher/entry/lexical_reference_problems
          1 person found this helpful
          • 2. Re: lexical parameter in bi report
            Hi AlexAnd,
            thanks for the reply,
            actually my requirement is to i need to execute another select statement when i am passing any parameter to that report in EBS,
            so when i am not passing any parameter to the report than it should execute the select statement whatever is ther in xml template and when i am passing any paramter in that case it should execute another select statement, so please help me on this.

            • 3. Re: lexical parameter in bi report
              i think you didn't read that i'm mentioned

              in datatemplate
              <parameter name="P_YOUR_PARAM" dataType = "number" defaultValue="0"></parameter>
              <sqlStatement name="Q_DATA">
              select &your_columns
               from  &your_tables
              where &your_where_clause
              <dataTrigger name="beforeReportTrigger" source="XX_YOUR_PKG.BeforeReport"/>
              in package
              FUNCTION BeforeReport RETURN BOOLEAN IS
              IF P_YOUR_PARAM = 'some_value' THEN
                your_columns := 'column1, column2';
                your_tables := 'table1, table2';
                your_where_clause := 'table1.id = table2.id';
                your_columns := 'column3, column4';
                your_tables := 'table2, table3';
                your_where_clause := 'table2.id = table3.id';
              END IF;
              you can use another way - create your xml output by package like
              fnd_file.put_line(fnd_file.output, '<ROWSET>');
              fnd_file.put_line(fnd_file.output, '<ROW>');
              fnd_file.put_line(fnd_file.output, '<DAT>' || some_value || '</DAT>');
              fnd_file.put_line(fnd_file.output, '</ROW>');
              fnd_file.put_line(fnd_file.output, '</ROWSET>');
              in package you can use all that you want