Home » Developer & Programmer » Reports & Discoverer » Passing parameters with cgicmd.dat (OAS 10GR2)
Passing parameters with cgicmd.dat [message #577392] Thu, 14 February 2013 12:47 Go to next message
heiava_teata
Messages: 2
Registered: February 2013
Location: French polynesia
Junior Member
Hello,
i try this url:
http:/server_name:7777/reports/rwservlet?url_config&my_parameter

with this key in my cgicmd.dat :

url_config: server=ed_url2 report=%1 userid=user/passxd@base destype=file desformat=pdf

and i have this error:

Unable to open file 'my_parameter='.


The rwservlet converts the value of my parameter to 'my_parameter='.
It adds a '=' systematically at the end of my parameter.

Please need help
Re: Passing parameters with cgicmd.dat [message #577398 is a reply to message #577392] Thu, 14 February 2013 13:32 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Here's how I do that (an Application Express example, but never mind).

CGICMD.DAT entry looks like this:
odr_objekt_po_nedost: server=rep_ias report=odr_objekt_po_nedost.rdf  userid=my_user/my_passwd@ora10 destype=cache desformat=PDF %1
As you can see, I put my parameters to the end.

URL is created as follows:
  :P36_URL := 
     pkg.f_report_server ||
    'odr_objekt_po_nedost'       ||
    '&par_obj='                  || :P36_OBJ;

- pkg.f_report_server is a function that returns server name (http://rep-ias/reportss/rwservlet?)
- odr_objekt_po_nedost is a CGICMD.DAT entry name
- par_obj is a report parameter. I put value of the P36_OBJ page item into it.

Finally, it evaluates to
http://rep-ias/reports/rwservlet?odr_objekt_po_nedost&par_obj=TS



You used %1 parameter as a report name; I don't know whether you can do that or not. What happens if you hard code its name?
Re: Passing parameters with cgicmd.dat [message #577404 is a reply to message #577398] Thu, 14 February 2013 14:12 Go to previous message
heiava_teata
Messages: 2
Registered: February 2013
Location: French polynesia
Junior Member
Thank you for your reply,
however, the problem arises for any type of parameters (report_name, file_name etc ...).
each time it inserts a '=' at the end of the value of my parameter.
My application runs over a hundred report.
I would use a url syntax applicable to all these editions. This is the reason why I want to avoid hard-coding the name of my reports.
Hence my desire to go through the file cgicmd.dat.

PS: sorry for my english, but i speak french and i use google translator
Previous Topic: rep 1800 formatter error
Next Topic: How to compare the current page number with total page number
Goto Forum:
  


Current Time: Fri Mar 29 04:23:31 CDT 2024