how to set the item values in page header oracle apex - oracle

I have 2 Item from date and to date and one submit button in a page..
:p1_enter_start_date and :p1_enter_end_date and one Submit button
In that user have to enter the from and to dates to get the output report region as intractive report.
Now i want to show the from and two dates in that page header which user have selected, that will be captured in items
please suggest how to set the item values to page header in oracle apex page

You can display the value of an item as html using the &ITEM. notation. So in your case that would be &P1_ENTER_START_DATE. and &P1_ENTER_END_DATE. (Don't forget the trailing .). You can check the documentation here: https://docs.oracle.com/en/database/oracle/application-express/19.1/htmdb/understanding-page-level-items.html

Related

How can I have the grouped variables in an SSRS report show up on each page, either on the footer or header of the page?

I have a main report with several subreports, all within a tablix. The report is grouped by an Investor Id value and the details for the Investor Id span multiple pages when its printed. My issue is that I'm not able to display the investor id on each page, either on the footer or the header. I just need it to show up for each page, I don't care if its on the bottom or the top. Can this be done?
I've tested this and it seems to work fine, and it's simple.
First, click your ID row group in the row group panel below the main designer and then hit F4 to get to the properties. In the properties window, expand the "Group" section and set the PageName property to whatever you want to show in your header (e.g. ="Investor ID = " & Fields!ID.Value).
Next, set the PageBreak to Between
Now, in your header add a textbox and set the expression to be =Globals!PageName.
That's it, the pagename property will change for each value in the dataset in your main report and be applied to the header on each page.

I cannot pass a value on button click in oracle apex 19.2

I have a wizard and i am trying to pass a value from one page to the next onclick a next button on the wizard in oracle apex but when i click next the value is not going through to the other side.
enter image description here
Image above shows the next button and the how i am trying to pass the value
thanks
What you did is this:
there's page 33
there are (at least) two items on that page
P33_ID
P33_NEW
you are passing P33_NEW item's value into P33_ID item
in other words, you're doing it on the same page, while it seems - according to what you said ("I am trying to pass a value from one page to the next") - that you're expecting something to happen on some other page
If that's so, transfer P33_NEW item value to "some other page", not page 33.
If you still want to do it on the same page, consider using a Set value dynamic action.

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?

How to change oracle apex 5 item after dynamic action button clicked?

This is for Oracle Apex 5.
I have a static content item on my login page, it has registration fields with a dynamic action button. Upon the click of the button their details are inserted into a table. I'd like the fields to disappear and 'registered. email verification sent' text to appear in that static content?
If that's not possible, is there a way for me to write that text underneath the registration fields and at the same time, clear all the fields - after button click?
If I understood correctly you have a Static Content Region (not item) with some text as source and you want that text to change if so i suggest you add a Display Only Item inside the Static Content Region and in that Dynamic Action simply change the value of the item using pl/sql, javascript or Set Value Dynamic Action.
Edit: You can use this plugin to have a timer that will run a Dynamic Action to change the text.

Creating a Form in APEX to set Variables in a Query for an Interactive Report

I am a relative APEX noob.
I'm running APEX 4.0 against a 10gR2 database.
I've written a query that takes a few inputs (two date fields, for start and end, and a text field for further filtering) and created a dynamic report out of it that works when I pull the input variables (:START_DATE, :END_DATE, :OFFICE) out of it or replace them with static values.
I want to create a form on a page that submits those values to the dynamic report page for use in the query to filter the results the user sees when he or she hits the report.
I'm not having much luck finding a good step-by-step example of this. I created a blank page with two Date Pickers and a LOV select dropdown, but am unsure how to best translate those values into the dynamic report.
Can somebody point me at the right documentation for this?
The following was developed using Apex 4.1 but apart from some cosmetic changes the principles should be the same.
The data comes from the standard scott.emp schema.
Overview
This is page 1, the user can enter an empno and\or a hiredate.
When submit is pressed the following report on a different page is displayed:
How it works
On page 1 I have created the three items shown. The text items are called them P1_EMPNO, and P1_HIREDATE. The action for the button is "Submit Page"
Still on page 1, create a branch with the following values:
This branch navigates to page 2 (which is yet to be developed) and sets the values of items on page 2 with the values from page 1.
Create a new page, in this example this will be referred to page 2.
On page 2 create a new interactive report using the following query:
select e.*
from emp e
Next create two text items in the same region as the report and call these :P2_EMPNO and :P2_HIREDATE. I have found it useful to show these items during development so you can see that the correct values are being passed through to the page. You can always set them as hidden once you happy with the report.
Finally amend the query used by the interactive report to use the values supplied by page 1
Run the application.
You want to reference your page items in your query, which means you'll have to submit your page before your query will pick up the session state of them. What I do when I provide a small parameter form, is to put a button up there as well (i.e. labeled 'Query'), which does a submit.
In your report you can then reference your items. If for example you have 2 items P1_DATE_START and P1_DATE_END, your query could look like:
SELECT firstname, lastname, job
FROM employees
WHERE employment_start BETWEEN to_date(:P1_DATE_START) AND to_date(:P1_DATE_END);

Resources