2 Replies Latest reply on Sep 14, 2018 12:51 PM by partlycloudy

    IG - Column on download only

    partlycloudy

      APEX 18.1

       

      In order to suppress an interactive grid column from displaying on the page but include it on the CSV download, the traditional technique of setting the column's server-side condition to apex_application.g_excel_format = true (classic report) or :REQUEST = 'CSV' (Interactive Report)  do not work.

       

      When the page is rendered, the column is indeed suppressed (good news) but the download doesn't include it either (bad news). Looks like the IG widget does a XHR request to download data from the client-side model instead of fetching it again from the server like the other report engines do. And the server side condition prevents it from being included in the model in the first place.

       

      John Snyders-Oracle Any ideas? Are there any options we can set in the IG config object in the column's Advanced Javascript code attribute to do this?

       

      Thanks

        • 1. Re: IG - Column on download only
          Patrick Wolf-Oracle

          Hi,

           

          instead of using a server side condition, have you tried to set the column "Type" attribute to "Hidden" and the "Include in Export / Print" to Yes? I think that should produce what you are looking for. The only downside is that the export doesn't include a heading for that column.

           

          Regards

          Patrick

          • 2. Re: IG - Column on download only
            partlycloudy

            Patrick - Ah yes that does produce what I am looking for but in addition to no heading, another downside is that I cannot control the column position since I can't see the column in the Actions > Columns menu!

             

            So if there are multiple columns like this, the CSV will contain the columns a) at random locations and b) with no heading. I'm sure you will agree this is not a viable solution.

             

            For a displayed column, I set the column Javascript Initialization Code property to

             

            function (options) {
               options.heading.heading = "New Heading";
               return options;
            }
            

             

            and it worked but unfortunately hidden columns don't even have the heading attribute.

             

            Any other ideas?