Click here to Skip to main content
15,902,893 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to allow the policy to use Oracle Views (Applications) before report (RDLC) in Report Viewer.

Something like this:
SQL
SELECT AMOUNT_APPLICABLE_TO_DISCOUNT From
AP_INVOICES_V

I need to call this PL/SQL Before Using this select statement:

SQL
Begin
mo_global.set_policy_context('S', 90);
End;


so I did this on page load before setting the SQL Data source to the report:
C#
if (!IsPostBack)
{

    db.connectODB();
    OracleCommand ora_cmd = new OracleCommand("mo_global.set_policy_context", db.con);
    ora_cmd.BindByName = true;
    ora_cmd.CommandType = CommandType.StoredProcedure;

    ora_cmd.Parameters.Add("P_ACCESS_MODE", 'S');

    ora_cmd.Parameters.Add("P_ORG_ID", 90);

    ora_cmd.ExecuteNonQuery();
}

But still no data retrieved.
Posted
Updated 13-Apr-14 22:06pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900