How can you properly automatically set which interactive report you navigate to in oracle apex? - oracle

I am using oracle apex 4.2 and was wondering if there is a special way to link to a certain default report that I created. So for example below I have made Region Name Pie report along with the default. I changed the aliases to 1 and 2 respectively. I tried using the link example but the synatx is malformed, so I tried another option below.
Here, I tried to set the Report ID Item to a variable that I set as I move to this page. And I looked at the session and this value is being set to 1 as needed(I assumed it was the Report alias I needed to set the value to).
Are these methods viable in Oracle or am I doing anything that is noticeably wrong? Thanks.
Edit: Error for Syntax:

Related

Apex - Not able to exclude column in exported file

I have an interactive report and the goal is to let the user export the data but without 1 column.
What I tried for the column in question:
1) Server-side condition - Request is NOT contained in value; Value - CSV, HTML
2) NVL(:REQUEST,'EMPTY') not in ('CSV','HTMLD')
The column I am trying to not export is a link with an icon. I tried changing it to 'Plain text' but to no avail.
Oracle Apex version 21.2.0
I managed to accomplish it using this:
instr(nvl(:REQUEST,'~'),'HTML') = 0 and instr(nvl(:REQUEST,'~'),'CSV') = 0
The approach described earlier worked for me with APEX 21.x.
However in APEX 22.1 the CSV download seems to be different; is this correct? For me the values are no longer evaluated again during download and thus I can not control this (we have a server side condition for that that accesses a page Item which we fill with a logic evaluating :REQUEST).

cross-conditional color formatting based on user input in Oracle Apex

I am currently trying to add a feature to an existing Oracle Apex application (Apex). I have already looked around on here and found a few guides but none are helping me specifically with this subject and as I am a complete newbie to Oracle Apex, I am asking this question and thankful for any help:
how can I cross-conditionally color format the text of a text-field returned to the user (see link below) based on another item on the page? More or less like a succes/failure-message.
highlighted succes/failure-message-text
The content from the success/failure-message is returned from a stored procedure, which is run after the user scans a barcode for input (:P1_CANN, text field, label: 'Scanneingabe'). After running, the stored procedure returns two values: the content of the success/failure-message (:P1_CANNBACK, display only page item) and a value 1/0 for scan/failure of the scan (:P1_CSS,hidden page item). Based on the value returned from :P1_CSS I would like to color the text of the success/failure-message correspondingly, for instance to green if the returned value is 1 and red if it is 0.
I am using Oracle 12c as the database. The stored procedure runs a short PL/SQL-Code:
*#OWNER#.DOMENICO_SCANN_ENT(PSCANN => :P1_CANN, pr => :P1_CANNBACK, pr1 => :P1_CSS);*.
This can be achieved using css. There are different ways you can implement this. One way is this:
Create a page item to contain the class name, eg P1_CANNBACK_CLASS
Create a computation to set the value of P1_CANNBACK_CLASS after you have called your stored procedure. PL/SQL code would be something like
CASE :P1_CANN WHEN 1 THEN 'u-success-text' WHEN 0 THEN 'u-danger-text' END
On Page Item P1_CANNBACK, set the css class to &P1_CANNBACK_CLASS.
Note that I used the apex provided css classes (documented here: https://apex.oracle.com/pls/apex/apex_pm/r/ut/color-and-status-modifiers). You can use your style, but then you'll have to define the css classes in the page properties or in a static file. I tested this on a 20.2 instance.

Oracle Apex performance issue due to session state values

I have a long-running page in Oracle Apex, this is an interactive report page, which fetches the report based on the Username, From_Date and To_Date parameters users provide.
The query used for this report page is executing without any issues(0.07 Sec) in SQL developer. When I checked the Debug log to debug the long run, I found the statement "... do not save: same value / password / no session" in the log which is the reason for the long run. The page never loads and end up in a gateway time out. The expected number of rows for the given parameters in mere 161 rows. Please find the screenshot of the debug log below. Please help me with this.
At the beginning I found a different issue in the Debug Log, which was due to 'IR binding: "APXWS_MAX_ROW_CNT" value="1000000"'. Later I removed the Maxrowcount value and made it null. So this was taken care.
A few ideas; see whether any of those helps.
How do you run the report? Did you set "Page action on selection" for those parameters to "Submit"?
If not, how about creating a SUBMIT button which would submit the page (and, thus, put items' values into session state)?
If you use a source for those items, try to set them to be used "always, replacing any existing value in session state".

Oracle Form 12c field showing hash instesad of number

I am working on Oracle forms 12c and facing an issue with few fields showing as hash(####) values instead of number field on data block when saving changes by clicking on SAVE (commit) button.
Also showing below error
(FRM-40735 KEY COMMIT Trigger raised unhandled exception ORA-01483)
it seems that it is due to change of field item from number to HASH (string)
For further information:-
-Fields are database items
-Trying to insert value in database fields by entering value on field.
-Size of fields are more than entered number value.
-on re-querying data block using (f7 & f8) data is showing correctly as number.
-Not able to recreate this issue on different database(working fine on other database)
is it something related to environment issue or minor bug while coding?
If the Returning_Dml_value property on datablock is set to Yes,it sometimes causes junk values to be populated and asks a requery on block. Try setting it to No instead.I faced a similar issue once and it got resolved by setting Returning_Dml_value property to No.
The following blog explains more about this property of Oracle forms:
http://cave-geek.blogspot.co.uk/

How to get the grid view for query results using oracle sql developer in mac?

When I issue a query like select * from city; using oracle sql developer in mac I get the output that is not aligned and it is very hard to read. How do I get the grid view and set it as default?
Sounds like you're getting the script output. You can have that formatted nicely by using SET SQLFORMAT ansiconsole, we'll make the columns line up as nice as possible based on the size of the display.
But if you want the data back in a grid, use Ctrl+Enter or F9 or the first execute button in the toolbar to execute.
This will get you the output in a grid, like this:
I talk about both executing as a script or statement here.
If your issue is with formatting, you may want to look at this link
If your issue is with records not getting inserted, please note these.
Records inserted in one session will not be visible in another session unless they are committed.
If you are checking the count in the same session where you inserted the records, then check for errors in insert. Add a show errors command at the end of your script, "path_to_file.sql" to check if any errors occurred while inserting the records.
Hope this helps.

Resources