Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » Download to CSV - Include Search Parameters (Oracle 11g - APEX 4.2.5)
Download to CSV - Include Search Parameters [message #679521] Fri, 06 March 2020 10:54 Go to next message
AdrianWard
Messages: 21
Registered: September 2019
Junior Member
Hi

I have an interactive report with search conditions (Team Leader and Clerk) which all works fine, the data displayed in the grid represents the search parameters I use.

However, when I click Action --> Download --> CSV (or HTML or PDF etc), the data shown is the FULL data set, ignoring any search criteria I have used.

What do I need to do to ensure the Download facility includes the search criteria used on the grid?

Thanks in Advance
Re: Download to CSV - Include Search Parameters [message #679526 is a reply to message #679521] Fri, 06 March 2020 11:48 Go to previous messageGo to next message
AdrianWard
Messages: 21
Registered: September 2019
Junior Member
To Add to this:

I have created Global (session) variables for each of the report parameters and on refresh of the report grid, I write the new parameters to the session variables. I have checked on Debug and these values are written back correctly.

However the Download still only reports based on the original (default) parameters when the screen is first loaded.
Re: Download to CSV - Include Search Parameters [message #679559 is a reply to message #679526] Mon, 09 March 2020 02:01 Go to previous messageGo to next message
Littlefoot
Messages: 21623
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't have Apex 4.x any more so I can't try it.

However, on 18.2, I can't reproduce it. I tried to filter results by the "search" field or by my own filter items and - in both cases, downloaded data represent what I see on the screen. In other words, everything works OK.
Re: Download to CSV - Include Search Parameters [message #679560 is a reply to message #679559] Mon, 09 March 2020 03:50 Go to previous messageGo to next message
AdrianWard
Messages: 21
Registered: September 2019
Junior Member
Thanks for the reply, I shall just have to keep playing and see if I can figure it out Smile
Re: Download to CSV - Include Search Parameters [message #679573 is a reply to message #679560] Mon, 09 March 2020 17:20 Go to previous messageGo to next message
Littlefoot
Messages: 21623
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
You're welcome.

Just for testing purposes, if possible, go to apex.oracle.com, sign up for a free workspace and set up such a report. See what happens in that Apex version (which is always the latest; 19.2 at the moment).

By the way, did you consider upgrading from 4.x to a more recent version?
Re: Download to CSV - Include Search Parameters [message #679596 is a reply to message #679573] Tue, 10 March 2020 10:21 Go to previous messageGo to next message
AdrianWard
Messages: 21
Registered: September 2019
Junior Member
Hi,

You make a good suggestion, as it happens I have 19.2 loaded on a separate server that I can use to test.

We cannot upgrade our 4.5.2 on our production server as we are still running Oracle 11g and APEX 19.2 isn't compatible (hence loading 19.2 on a different server).

Thanks again

Adrian
Re: Download to CSV - Include Search Parameters [message #679851 is a reply to message #679596] Tue, 07 April 2020 08:08 Go to previous messageGo to next message
AdrianWard
Messages: 21
Registered: September 2019
Junior Member
A quick update to this as I have found the solution.

Originally, I was advised that I needed to save all my screen variables to global session variables, however I couldn't see how this would work given I use screen variables in my SQL query, not session variables.

Anyhow, I was playing about trying a few things and the solution is to set the Source value for each screen item used as SQL Parameter: -

Source Used: Always replace any existing value in session state
Source Type: Item (application or page item)
Source Value or Expression: :P1_xxxx (page item name)

Anyway, hope this helps someone out there Smile
Re: Download to CSV - Include Search Parameters [message #679898 is a reply to message #679851] Fri, 10 April 2020 06:12 Go to previous message
Littlefoot
Messages: 21623
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Thank you for letting us know. I'm glad you solved the problem.
Previous Topic: Downloading Checkboxes to CSV
Next Topic: Disable Mouse Roll Over on IR
Goto Forum:
  


Current Time: Sun Nov 29 02:02:53 CST 2020