Can I make use of any global variable at the time of previewing / printing a report.
suppost a table namely contract has many columns including a column namely [executive_code]. A datawindow [rdw_contract ] has been made out of sql: "select * from contract_mst". The global variable gs_executive_code holds value '05'. Is it possible that when rdw_contract is being previewed / printed the report should be filtered to [executive_code=gs_executive code] meaning executive_code='05'.
The whole thing is that I have been asked that an executive (my system holds that executive in the global variable gs_executive_code) should be able to see his data only. This is one thing as I am afraid that there may arise situations that executive_code '05' is absent and executive code '04' has been given the rights to take contract reports of '04' himself and '05'.Then when rdw_contract is being previewed / printed the report should be filtered to [executive_code='04' or executive_code='05'.]
How to manage the whole thing dynamically.