Thread: Is it possible for a single button to either link to a page or link to URL?

This question is answered. Helpful answers available: 5. Correct answers available: 1.


Permlink Replies: 6 - Pages: 1 - Last Post: Sep 2, 2009 5:45 AM Last Post By: Dishoom
Dishoom

Posts: 428
Registered: 03/15/00
Is it possible for a single button to either link to a page or link to URL?
Posted: Sep 1, 2009 10:28 AM
 
Click to report abuse...   Click to reply to this thread Reply
Oracle 10gXE
APEX 3.2

If I have a LOV on a page, which the user can either select PDF, HTML, or CSV reports, is it possible that the button used to run the report will either link to a URL (for Oracle Reports) if either PDF or HTML is selected, or go to a page within the app, passing the item values if CSV is selected?

The reason being is that we have a need to provide the end user with different output formats of the same report. The Oracle Report looks fine for PDF and HTML output, but the CSV output is not so great, requiring us to almost create a separate version for the CSV report. APEX seems to do a much better job for CSV output, although it would mean copying the SQL out of each Oracle Report and creating an APEX report page for each one. I already have a "parameter page" working for the Oracle Reports, where the user can provide all the input needed for the report to run, but want to avoid having to create separate APEX report pages that each contain the same parameter selection.

Any ideas?
Denes Kubicek

Posts: 4,839
Registered: 06/22/00
Re: Is it possible for a single button to either link to a page or link to URL?
Posted: Sep 1, 2009 11:15 AM   in response to: Dishoom in response to: Dishoom
 
Click to report abuse...   Click to reply to this thread Reply
Is your problem to create a csv link? If yes, you can build the link by getting the region_id information out of apex dictionary views and include those in the select list. Basically, all you need is in the dictionary views and you can have one single csv link for all your reports at one place.

Denes Kubicek

http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1

Sam06

Posts: 273
Registered: 09/21/08
Re: Is it possible for a single button to either link to a page or link to URL?
Posted: Sep 1, 2009 12:01 PM   in response to: Dishoom in response to: Dishoom
 
Click to report abuse...   Click to reply to this thread Reply
Why dont you try to reference that page (Apex report) with its URL instead of page # ? this way , your button will have three different Links to branch to based on the selected report type.
Dishoom

Posts: 428
Registered: 03/15/00
Re: Is it possible for a single button to either link to a page or link to URL?
Posted: Sep 1, 2009 12:26 PM   in response to: Sam06 in response to: Sam06
 
Click to report abuse...   Click to reply to this thread Reply
oh yes, i don't know why i overlooked that...referencing by URL instead of page. i think that will work, but now just need to come up with the logic and pass parameters with the link to the page url
Dishoom

Posts: 428
Registered: 03/15/00
Re: Is it possible for a single button to either link to a page or link to URL?
Posted: Sep 1, 2009 12:29 PM   in response to: Denes Kubicek in response to: Denes Kubicek
 
Click to report abuse...   Click to reply to this thread Reply
Denes,

Are you suggesting maybe having a single report page based on the all the Report Regions that are used for CSV reporting? Which APEX dictionary view contains this information?
Denes Kubicek

Posts: 4,839
Registered: 06/22/00
Re: Is it possible for a single button to either link to a page or link to URL?
Posted: Sep 2, 2009 1:09 AM   in response to: Dishoom in response to: Dishoom
 
Click to report abuse...   Click to reply to this thread Reply
If you go over a csv link, you will see that it consists out of several parameters:

http://htmldb.oracle.com/pls/otn/f?p=31517:1:5674706509886102:FLOW_EXCEL_OUTPUT_R9232861808910878522_en

&APP_ID.
&APP_PAGE_ID.
&SESSION.

REQUEST => 'FLOW_EXCEL_OUTPUT' || '_R' || REGION_ID || '_en'

You may use this example to see how I did it:

http://apex.oracle.com/pls/otn/f?p=31517:244

Denes Kubicek


http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1

Dishoom

Posts: 428
Registered: 03/15/00
Re: Is it possible for a single button to either link to a page or link to URL?
Posted: Sep 2, 2009 5:45 AM   in response to: Denes Kubicek in response to: Denes Kubicek
 
Click to report abuse...   Click to reply to this thread Reply
Denes,

Thanks for the information. You've got quite an informative site there!
Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums