What determines default Interactive Report column display in Oracle APEX 5? - oracle

I have an Interactive Report page in Oracle APEX 5 that includes a SQL Query with ~15 columns or so.
When I first load the report, the columns are in a certain order, and columns are set to Do Not Display (as seen under Actions-> Select Columns).
All the columns have the property Type as Plain Text and none has a condition defined in the Page Designer, under {Page Name} -> Regions -> Content Body -> {Interactive Report} -> Columns.
My Interactive Report has a dynamic query under a APEX_COLLECTION and the end user doesn't have developer privilegies.
My question is, what determines which columns are set to Do Not Display and those set to Display in Report?

When you first create an Interactive Report, all the columns will be present in the Designer under the Columns list and in the order in which they appear in the SELECT statement. When you run the page, the IR will display all the columns.
If you edit the SQL behind that IR to add columns, any new columns will appear at the end of the Columns list. You will have to run the page, select Actions > Select Columns, and add them to the displayed list of columns to have them display. You'll probably want to then select Actions > Save Report as the primary default report to have them displayed by default for your users.

Related

SSRS Dynamically Show Data

I am wondering if you can have other tables show based on the value selected in the main table. I am not opposed to drill-down either.
My main table is the summary and was hoping to show additional data when the user clicks on a Type. When clicked another table would be visible. For example, in the screenshot, the Pool table would be visible when the Pool type is clicked in the main report. As mentioned if this is easier as a drill-down then I will do that, but not sure how. The report currently has a dataset for each table. Do I need to combine the datasets to do a drill-down?
Main and child tables
The best way to accomplish what you described is with a drill down and you would need to combine the datasets into one.
Combine your datasets
Add a table to your report and reference the single dataset
Add your detail row group to the table - from your child table (Area, Average)
Add a parent group to your details row, group your detail row group by Type, it should add a Type column to your table. Delete this column and it will ask you to delete the associated group as well. Select the option to delete only the column.
Recreate your table by adding rows, be sure to match the grouping indicators (brackets) on the left side
Right-Click on the bottom row in the box where the bracket is to highlight the entire row, click Row Visibility. For the option "when the report is initially run:", select Hide. Check "Display can be toggled by this report item" and select the name of the textbox that contains [Type]. If you don't know what this is, exit out of the dialogue box and right-click on the cell [Type] and click Textbox properties, the Name will be in there
Repeat step 6 for the label row for your details row (second row from the bottom)

Oracle Apex 5.1 Interactive Grid change column type by row

In APEX 5.1 interactive grid I want to change the type of column (Text field or Select list) based on the content of the current row.
Actually it's a key-value editor on a two column wide table. Values on some keys are free to edit, others are restricted to specific set of values.
Is it possible to do with interactive grid?

Oracle Apex - Download CSV produces an empty report

I am currently using Oracle Apex version 18.2.0.00.12 on Internet Explorer on a computer running Windows 10.
I am having a problem with downloading an Interactive Grid as a CSV file.
On my Apex page I have an interactive grid and three page items. Two of the page items, P200_DATE_FROM and P200_DATE_TO, are Date Picker items. The other item is a button named "Submit" and its action is "Submit Page".
This is the query for my interactive grid:
select * from kat_test
where repairdate between :P200_DATE_FROM and :P200_DATE_TO;
There are four columns in the Interactive Grid:
Issue - Varchar2
Month - Number
Week - Number
Repairdate - Date
The only settings I changed in the Interactive Grid are the title and the SQL query.
I changed the Source of P200_DATE_FROM to PL/SQL Expression that returns the first day of the current month. It is set to be used "Only when the current value in session state is null". The expression is:
trunc(last_day(sysdate)-1, 'mm')
I changed the Source of P200_DATE_TO PL/SQL Expression that returns the current date. It is also set to be used "Only when the current value in session state is null". The expression is:
sysdate
When I run the page, it loads exactly as expected in the sense that the P200_DATE_FROM page item is populated with the first date of the current month, the P200_DATE_TO item is populated with the current date, and the interactive grid displays the correct data.
The problem: When I select Actions -> Download -> CSV, the CSV file downloads and opens as an Excel file, BUT only the header names are displayed. The cells underneath the headers are all empty. However, if I change one of the dates (or both) in the P200_DATE_FROM page item and/or the P200_DATE_TO page item and then press the submit button, the page is submitted and then when I click Actions -> Download -> CSV, the Excel file opens and all of the data is displayed perfectly (both the column headers and the data underneath the headers).
I don't understand why when I initially load the page, the CSV file for the Interactive Grid does not download correctly, but after I click the submit button the CSV file does download correctly.
Does anyone have any ideas?
Thank you in advance.
I think you just need to put the name of these items in the field "Items to submit" next to your SQL. When it downloads, I think it reprocesses SQL using the values ​​of the items that are in the session. If you do not put those items there, the values ​​do not go to the session. Enter the item names separated by a comma. After that, I think any changes is necessary in your SQL
Report's query, probably, contains a WHERE clause which looks like this:
where some_date between :P200_DATE_FROM and :P200_DATE_TO
Modify it so that includes NVL function whose second parameter reflects items' default values, i.e.
where some_date between nvl(:P200_DATE_FROM, trunc(last_day(sysdate)-1, 'mm'))
and nvl(:P200_DATE_TO, sysdate)
Run the page, download CSV; any improvement?

Oracle Apex 5.1: Report column based on LOV(List of values) showing returned value not display value

I have created an interactive report with a form. In the form I have two select lists. The first select list is a list of values defined in the shared component. And the second select list is another list of values which is also defined in the shared component but this select list populates its LOV based on the selected item in the first select list.
Let the names of the select lists are:
Region.
Country(which is dependent on the selected item in Region field).
Now when I press save/create button in the form, a row is created in the report. The Region column and Country column in the report are both "Plain Text(based on List of Values)". But what I see is the Region column is showing the correct display value of the LOV but the Country column is showing the returned value of the LOV.
I want both of these columns show the display values rather than the returned value. Could anyone help me find the solution?
Are you using the same LOVs in form and interactive report? If so and in the conditional LOV (countries) you refer your form item (ex. PX_REGION) it will not work correctly in IR. Probably IR is showing the returned value because the option "show extra values" is checked.
If this is the case my suggestion is to change your IR and instead of a "Plain Text(based on List of Values)" you make it plain text and change the query to an inline query in IR query to obtain the value you want to show.
If you don't want/like to put your LOV queries in different places I suggest you to use this approach shared by Nick Buytaert
Hope this helps you solve your problem.

Display Column and Return Column LOV

I am working in Oracle APEX(Application Express). When I want to create a List of Values (LOV) it gives me only one option for displaying and returning value. Is there any method in APEX so that it can Display me more than one column.
No, there is no way to display more than 1 column by default.
You could alter your lov query to concatenate multiple column values into a display columns
select empno return_value, empno||': '||ename||' - '||job display_value
from emp
You can steer markup through the Popup LOV template too, if you'd want to use a fixed width font.
Use a plugin such as the SkillBuilders SuperLov. However, this plugin does not work in tabular forms.
Roll your own by using for example modal pages (again, SkillBuilders have an excellent plugin for modal pages), or through the use of javascript (ex creating new windows and handling returns)

Resources