Oracle Apex - image in report is not updated on region refresh - oracle-apex

I have an interactive/classic report with a column that shows images.
The row in the report can be edited as usual with a modal dialog.
But when I replace existing image it is not updated in the report even though all other fields do. I can also see that the numerical representation of the image is getting updated. Only the visualization of the image stays the same.
Also, when saving and refreshing the whole page, the correct image is showing up.
The query that creates the report:
select
ID,
APEX_ITEM.CHECKBOX2(15,p_value => ID) as "Select",
DESCRIPTION,
dbms_lob.getlength(BLOB_CONTENT) as "Image"
from UPLOADED_IMAGES
The image column Type is "Display image"
Why the images don't get updated on region refresh?
Thanks for the help

So I changed the query that creates the Image column to:
nvl2(BLOB_CONTENT,
apex_util.get_blob_file_src('P3040_BLOB_CONTENT',ID,null,'inline'),
null) as BLOB_CONTENT
As written in several guides
(Also need:
HTML Expression --> <img src="#Image#" height="75px">
Escape special characters --> 'No')
and now the refresh works. Still don't explain why the other way doesn't, but it's good enough.

Related

How to set two filtering values in one column of links in an interactive report? (Oracle Apex 21.1)

I need help creating a link in Oracle APEX.
I have two Interactive Report pages created in Oracle APEX.
The first page is an Interactive Report for a list of cats. When clicking on that link, filter the second page's Interactive Report by the "fur color" column. Furthermore, I want to always be "white" in addition to the color of the selected row.
I try 2 types of methods to create a link in Link Builder.
Name = IR_FUR_COLOR, Value = &P18_FUR_COLOR. and more one line Value = White
Name = IR_FUR_COLOR, Value = &P18_FUR_COLOR.,White
But they did not work.
How should I do it? Does anyone help me?
Thank you for watching this question!
Link Builder should contain only
Name: IR_FUR_COLOR, Value: &P18_FUR_COLOR
Modify the second Interactive Report's query so that its where clause looks like this:
where fur_color in ('white', :IR_FUR_COLOR)
which means that it'll always filter white color, along with any color you pass from the previous page.
There are variations to that approach; for example, you could create another (hidden) item on the 2nd page and pass white to it and then
where fur_color in (:HIDDEN_FUR_COLOR, :IR_FUR_COLOR)

Oracle Apex - Problem with InteractiveGrid field in Dynamic Action refresh

I have a problem using a dynamic action refresh in an interactive grid.
I have a field of type popup lov, when I choose one of the items in the list, I am performing a query to fill a collection, and then I do a refresh with a dynamic action, so that the data is reflected in the grid.
But at the moment of doing it, this happens with the field:
enter image description here
and in the console it shows me the following:
enter image description here
I hope to have your help, thank you very much.

Power BI parameter for image

I wanted to know if there's a way to have a parameter that holds an image.
The problem: I have 10 PBIX, each one containing over 20 screens. every report has the clients logo. it is an image let's say the client changed his logo, that means I'll need to change the logo 200 times!! (10 PBIX X 20 screens).
Wanted solution: is there a way to hold a parameter that will contain the logo, therefore changing the logo only 10 times (for each PBIX) that will be a HUGE improvement for my time and productivity. sorry for not including pictures this is to keep my client anonymous
Thank you!
Here is how you can achieve your requirement as stated below-
Step-1 create a custom function in Power Query as stated below. The function is taken from Here and you can check this blog for more details if you are interested.
let
BinaryToImage = (BinaryContent as binary) as text =>
let
Base64 = "data:image/jpeg;base64, " & Binary.ToText(BinaryContent, BinaryEncoding.Base64)
in
Base64
in
BinaryToImage
Here below is the image for the custom function-
Step-2 create report wise folder in your local directory and keep your image there. I am considering one folder here, but you can do your own once you get the workaround.
Step-3 Create a data connection for Folder as shown below and point to the folder you kept your logo/image-
And now you will have a table as below with one row as there are one image only. I named the table as PBI_Images.
Here basically Content column holding the Binary data for the image and we have to convert it to Base64 using the Function we created earlier.
Step-4 Now lets Invoke the function in our table. Select the table and do what shown in the below image-
Now you have a new column with data like below-
Step-5 Get back to report by clicking "Close & Apply" button.
Step-6 Download the following App from AppStore-
Step-7 Just add the new downloaded visual to your report and put the newly created column to the "Image URL" field as below-
Step-8 Now add the Image visual to all your report pages and tag the Image URL as stated in step-7.
You are all done now. Just Change the Image in your source file keeping the same name and after that refresh your table (PBI_Images my case) and you will see Image changes everywhere in the report.
Finally, if everything works expected, you can first try will all logos from one single folder. If do not work, go for folder per customer as mentioned earlier.

File browse Item uploading to BLOB column

One of the tables in my DB has a BLOB column that stores images. So now I am setting up the page for this table. I have a bunch of IGs and such to process most of the data, but I set up a modal page to process the image.
The modal page gets the ID (which is the PK) into an item, and then it reads the image currently in the table into a 'Display Image' item. And I have a 'File browse...' item to upload new images.
Except I cannot get it to save.
I initially started with the display image item just having Setting Based on : BLOB column returned by SQL statement, as I couldn't get the source to work with the SQL query(Error Expected CHAR, source is BLOB), I managed to resolve this by putting automatic row processing on the page and then having the source be a column.
So now it displays well, with no errors.
But the save does nothing. I have tried saving by having the File browse reference the column and using automatic row processing, and there is just nothing. No errors pop up, but it just does nothing.
I have tried saving to APEX_APPLICATION_TEMP_FILES and then having a PLSQL DA or a PLSQL process to
SELECT blob_content
FROM APEX_APPLICATION_TEMP_FILES
WHERE name = :FILE_BROWSER_ITEM
And insert this into the table, but it just pops up a 'No data found' error.
I have gone through every bit of intel my google-fu has found, but I have failed to find a solution.
So I would appreciate any insight any of you might have.
Since noone answered, I stepped away from it for a bit and tried again at a later date. And now I made it work finaly.
I set up automatic row fetch and automatic row processing but disabled both of them, for some reason automatic row processing must be there so that you can have the source for the display image and file browse be the column.
Then I set the browse file to load into apex_application_temp_files.
and set up a process to be executed at page submit(but after the automatic row processing even though its disabled and shouldnt matter). The process executing the following code:
BEGIN
UPDATE MY_TABLE
SET MY_IMAGE = (SELECT blob_content
FROM apex_application_temp_files
WHERE name = :FILE_BROWSER_ITEM)
WHERE id = :ID;
END;
And I execute the page submit through a button with the action page submit and Database action being SQL UPDATE action.
I am guessing a fair bit of the things I did and have set up dont even matter, but I dont dare remove them for fear of breaking shit. What I have described here finaly works for me, and if you stumble upon this then you can try and I hope it works for you too, and you can try removing some of the disabled stuff and see if it still works.

Dynamic text in SAS VA (Visual Analytics)

I am making a nice dashboard. I have Geo-map with projects. When a user clicks on a particular project it will take the user to a detailed page about the project. I want to give this page (sheet) a dynamic title.
For example: The user clicks on the GEO map on the project in Aalst, he will be redirected to the detail page with a tittle "Costs and revenues for Project in Aalst".
Pictures of my dashboard:
enter image description here
enter image description here
I was working with VA 7.1 and there wasn't any way to parameterized text fields in VA reports. I've heard SAS wants to add this function in future release and at this moment you have to find a different way to put dynamic label on the report.
For example you can put a flat table with combination of every posible title you need. Then change style parameters for this table. You can turn off borders and column headers, change table background color, text font size and color, so you can make it looks like as a title field. Then you define filter connection between GEO map and this table, so when you click on the GEO map it will filter single record with correct title.