Saturday, 25 April 2020

How to pass all values in parameters and show same in Parameter section

pass where condition as below 



select trx_number,trx_datefrom   ra_customer_trx_allwhere (org_id in (:p_org_id ) or least(:p_org_id) is null )


now select can select all and then select null value passed as below .


and to show same in parameter use below listagg function 



SELECT
    CASE
        WHEN least(:p_business) IS NULL THEN
            'ALL'
        ELSE
            (
                SELECT
                    '['
                    ||
                        LISTAGG(business_val.description, ';') WITHIN GROUP(
                            ORDER BY
                                business_val.description
                        )
                    || ']'
                FROM
                    fnd_tree_version_vl   ftv,
                    fnd_tree_node         business_node,
                    fnd_flex_values_vl    business_val
                WHERE
                    1 = 1
                    AND ftv.tree_code = 'VP_COA_PROJECT_TREE'
                    AND ftv.status = 'ACTIVE'
                    AND ftv.tree_structure_code = 'GL_ACCT_FLEX'
                    AND business_node.tree_version_id (+) = ftv.tree_version_id
                    AND business_node.parent_tree_node_id IS NULL
                    AND business_val.flex_value = business_node.pk1_start_value
                    AND business_node.pk1_start_value IN (
                        :p_business
                    )
            )
    END v_business
from dual

How to Show Images from Database in RTF Template Report

Please find an RTF tag for inserting the Image IN RTF template.

<fo:instream-foreign-object content-type="image/jpg"><?IMAGE?></fo:instream-foreign-object>


Note:-  <?IMAGE?>  :- actual tag In Xml file  Find XML and RTF for better understanding



Click Here
Find Sample XML and RTF