Home » Developer & Programmer » Application Express & MOD_PLSQL » passing parameters to apex url (Application Express 3.2.1.00.10)
passing parameters to apex url [message #571119] Wed, 21 November 2012 04:52 Go to next message
annu-agi
Messages: 195
Registered: July 2005
Location: Karachi
Senior Member

dear experts

I made one APex page with interactive report and its working fine. But now i want to run apex page with giving parameters in URL. Existing Url doesnot contain any parameters so its look like
http://10.10.15.16:8080/apex/f?p=108:3:1548274790301025:::::

while p=108 is my application and 3 is my page.
here is my query which i use in this report, Right now my query is working without applying any parameters, so the result would be run on nvl() condition, and it gives all the data.
select ptm.bank_branch_code, to_char(ptm.acc_number) account_code, sum(nvl(ptdv.earning,0)-nvl(ptdv.deduction,0)) bank_amount,'C' CR_DR
from PR.pr_trans_mst ptm, cms.vhrms_empl ve, PR.pr_trans_dtl_v ptdv
where ptm.employee_no = ve.EM_CODE
and ptm.employee_no = ptdv.employee_no
and nvl(ptdv.omit,'x')<>'Y'
and ptm.bank_branch_code>6000 and ptm.bank_branch_code<7000 
and nvl(ptdv.del_yn,'x')<>'D'
and nvl(ptm.stop_payment,'x')<>'Y'
and ptdv.fiscal_year=NVL(:P3_FISCAL_YEAR, ptdv.fiscal_year)
and ptdv.trans_month=nvl(:P3_TRANS_MONTH, ptdv.trans_month)
and ptdv.location_code=NVL(:P3_LOC_CODE, ptdv.location_code)
and ve.em_relg=nvl(:P3_RELG, ve.em_relg)
and ptdv.trans_type_row in ('R','A')
group by ptm.bank_branch_code, ptm.acc_number,ve.EM_RELG order by acc_number;


:p3_fiscal_year, :p3_trans_month, :p3_loc_code, :p3_relg are my parameters and it is already working fine in query. but i cant able to filter data by utilizing these parameters right now.
Now can anybody tell me how can i these parameters in above given URL?
also tell me i dont want to make any button over this report to proceed or submit, so is it works without giving button.

i just want to give URL with these parameters or nulls to this page and get my desired result.


Please give any idea or suggestion.


regards,

Anwer


Re: passing parameters to apex url [message #571124 is a reply to message #571119] Wed, 21 November 2012 06:06 Go to previous messageGo to next message
Littlefoot
Messages: 19476
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
f?p syntax:
f?p=App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly
                                              --------- ----------

I marked "itemNames" and "itemValues" which you should use.

Here's an example of passing 2 parameters: P3_POGON (which gets value of 123400) and P3_MMYYYY (which gets value of (formatted to 6 characters with leading zero) concatenated M.MONTH column and P3_YEAR page item).
f?p=&APP_ID.:3:'||&APP_SESSION.||'::NO::P3_POGON,P3_MMYYYY:123400,' || lpad(to_char(m.month||:P3_YEAR), 6, '0')

Re: passing parameters to apex url [message #571692 is a reply to message #571124] Thu, 29 November 2012 03:48 Go to previous messageGo to next message
annu-agi
Messages: 195
Registered: July 2005
Location: Karachi
Senior Member

hello experts,


still not solved, check my URL
http://10.10.15.16:8080/apex/f?p=103:1:4488099600766829::NO::P_LOC_CODE,P_FISCAL_YEAR,P_TRANS_MONTH:001,2012-2013,5


and i am getting error

Unexpected error, unable to find item name at application or page level.
Error ERR-1002 Unable to find item ID for item "P_TRANS_MONTH" in application "103".  
OK 


well, as i already mension in query that its a passing parameter to run my report, at that level should i make items by these names and place as hidden items on my page?.
But to submit i have to press submit button to process this report and to avoid this submittion i just want to make report and place my parameteres specified in query.

So i assume when i call report URL it just show report without asking parameters. Am I right?

so what is now i have to do ?


regards


Anwer
Re: passing parameters to apex url [message #571699 is a reply to message #571692] Thu, 29 November 2012 04:41 Go to previous messageGo to next message
Littlefoot
Messages: 19476
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Apex complains that it can not find items you specified. Do they exist in your application? Did you correctly spell their names?

As of "well ..." part of your message, I didn't understand what you are trying to say. Someone else might have.
Re: passing parameters to apex url [message #573468 is a reply to message #571692] Sat, 29 December 2012 01:20 Go to previous message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Notice that the item name in your page is P3_TRANS_MONTH, not P_TRANS_MONTH. Same for all other items. Correct them in your URL.

regards,
Delna
Previous Topic: Apex 4.1.1 and 4.2.1
Next Topic: Moving APEX screens from one schema to other schema
Goto Forum:
  


Current Time: Fri Aug 22 20:43:06 CDT 2014

Total time taken to generate the page: 0.11757 seconds