mo_global.set_policy_context Calling in C# .Net
How to allow the policy to use Oracle Views (Applications) before report (RDLC) in Report Viewer.
Something like this:
Collapse | Copy Code
SELECT AMOUNT_APPLICABLE_TO_DISCOUNT From AP_INVOICES_V I need to call this PL/SQL Before Using this select statement:
Collapse | Copy Code
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:
Collapse | Copy Code
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(