6 Replies Latest reply: Nov 21, 2012 3:56 AM by 951027 RSS

    Report Parameters

    951027
      Hello all,

      I have made a simple report using report wizard in 6i,
      I also made parameter form in report , I need to know
      How can I filter second parameter value based on first
      For example I say

      Emp_dept : Mechanic

      Emp_name : (it should give me list of employees only in mechanic dept )

      Please clarify

      Thanks
        • 1. Re: Report Parameters
          only.ashish99
          write in query
          select emp_name,emp_dept fro table_name
          where emp_dept= :dept (Parameter)
          when u'll enter value of dept as 'Mechanic' u will get emp_name based on that dept.
          • 2. Re: Report Parameters
            951027
            Hi i tried this in parameter select statement of second one

            i.e. in Emp_name parameter I gave select statemnt


            select emp_name,emp_dept from emp where emp_dept =: dept

            it says

            Rep 0781 Bind varaiables not allowed in select statement
            • 3. Re: Report Parameters
              only.ashish99
              no Bro, u write this query in Data model/query box of that report not in parameter field.

              then pass only one parameter dept and you will get the desired result.
              • 4. Re: Report Parameters
                951027
                no Bro, u write this query in Data model/query box of that report not in parameter field.

                then pass only one parameter dept and you will get the desired result.


                SELECT PH_comp_code , ph_txn_code,PH_NO, SubStr(ph_dt,1,10) PO_date, PH_SUPP_CODE Supp,supp_name Supp_Name,
                PH_locn_code LOCN,locn_name Project,
                PI_ITEM_CODE ITEM_CODE,PI_ITEM_DESC ITEM_DESC, SubStr(pi_uom_code,1,4) unit, PI_RATE, PI_QTY,PI_RATE*PI_QTY TOTAL
                FROM ot_po_head, OT_PO_ITEM ,OM_SUPPLIER ,OM_LOCATION
                WHERE ph_sys_id=pi_ph_sys_id AND supp_code=ph_supp_code AND locn_code=pi_locn_cODE
                AND PH_LOCN_CODE=: LOCATION_CODE
                AND ph_COMP_CODE=:COMP_CODE

                PARAMETER 1 : -> SELECT COMP_CODE FROM FM_COMPANY

                PARAMETER 2 : -> SELECT LOCN_CODE, LOCN_NAME FROM OM_LOCATION

                I want the second parameter to consider comp_code and filter the result
                Please advice

                Edited by: 948024 on Nov 20, 2012 2:14 AM
                • 5. Re: Report Parameters
                  only.ashish99
                  Hi,

                  These are ORION ERP tables. Am i right?. I was checking one thing here that why are you not using sys_id as parameter. it is not a good practice if you r not using sys_id. no need to use other parameters here that will filter every record.

                  Edited by: only.ashish99 on Nov 21, 2012 10:36 AM
                  • 6. Re: Report Parameters
                    951027
                    Sir what cn i do in this scenario plz suggest,