Oracle APEX - report download Internal Server Error - oracle-apex

I have an interactive grid that displays over 250k records and has more than 30 columns. When I attempt to download the report in csv format, I get an Internal Server Error. How can I get around that? Is there a way to limit the number of records (I know that when there are fewer records it works fine)? Is there a way to automatically split report in two parts and download two separate files?

You can always add filters to your SQL Query, that way the end user downloads the data they really need.
For example:
1. Create some items like Select List.
Enter the proper filter in your SQL Query, as follows:
Include the items in Page Items to Submit.
Create a Dynamic Action to refresh your IG when the end user selects a different value for the items

Related

Append Query Error during Service Refresh

Hello I am working on a dashboard that needs to combine 2 tables: sales table, sales order table. Two two tables come from different sources: sales table from SAP BW and sales order table through a dataflow. Both tables have a number of applied steps that delete, reformat and rename the columns. I then want to append the Sales Order Table to the Sales table. In the desktop version everything works even if I hit "refresh all" in the Power Query Editor. When I publish the report to the service and refresh, I am getting an error saying: The key didn't match any rows in the table
Full Error Message:
After troubleshooting for the last couple of days I'm pretty sure that the issue has to do with my column names being renamed. However its strange that the append would work in desktop but not in service.
My main questions are:
Can you append tables after multiple applied transformation steps?
Can the tables both refresh daily or does one or the other have to be static?
Does the order of the table queries in query editor effect the order in which tables are loaded or does everything load all at once? Can this order affect my append query?
Any suggestions or help would be greatly appreciated. I am 99% of the way to launching this new report but this refresh issue is driving me crazy.
You can append tables after multiple applied transformation steps
Both tables can refresh daily
The order of the table queries in query editor doesn't matter. Power BI will determine the order in which they are loaded. E.g. if you want to append a table to another table, that other table is loaded first.
Thanks for answering those questions Peter. I concluded that the issue had something to do with appending a dataflow. I switched to a new data source from SAP BW and its working now. What's interesting is that the dataflow is still being imported and refreshed daily so the issue had to do with just the append.

Importing data from Smartsheet into Power BI using web and not connector

The PowerBI connector doesn't work, since it defaults to the IE browser, and our IE browser is locked down by our IT department (can't connect to smartsheet site). So, I need to use the "web" API option to get my smartsheet data. I have the data coming in, but I'm brand new at this and I'm having trouble organizing it. I have 8 columns that are repeating as rows, and the cell data contains a bunch of metadata values that I don't want. How do I get this so the columns become columns again, with the cell data as rows (with just the face values) and not repeating?
screenshot of data in PowerBI
I think you need to read a good part of the documentation in order to get used to the responses you get from Smarsheet, in brief you get a Json data structure.
First read, https://smartsheet-platform.github.io/api-docs/#how-to-read-a-sheet-response
Then you need to make the json connection to PowerBI like this example, https://www.mssqltips.com/sqlservertip/4621/using-power-bi-with-json-data-sources-and-files/

How to create a filter in powerbi that will dynamically query the db using a SP with a parameter

I am trying to run a direct query on my DB and apply a filter input by the user. The user input would be used as a parameter for my Stored Procedure that retrieves the data I want to display to the user. The reason for running a direct query and not just refreshing the data and then the user filtering from all of that data, is that the database is really large and it would make the report file approx. 650mb in size. My idea is that with a direct query, I can pull only the data required through an indexed column that the Stored Procedure uses to filter.
Currently I was able to create a parameter in the Query editor and use it in a query function but this creates an "Invoked Function" table. If I use these results in my report essentially the user can only filter through the result I filtered in my query editor. I want the user to be the one to input that value and the report to dynamically load it.
As far as the filter field, I am using a slicer and added the search capability to it so they can type out the search value and select the result in the list. Ideally I would like a textbox that they can type the value they want and search for it.
Is this possible in PowerBI? and if so how could I accomplish this?
You have to download a separate application called Power BI Report Builder to accomplish this and create a paginated report. See Url below:
Paginated Reports

Insert static data along with data loading wizard utility in Oracle APEX

I am new with Oracle APEX and trying to explore all options in APEX (5.1). My query is related to Data loading wizard in Oracle APEX. I created one table which has three columns, and I set up that table as Data Load Definitions.
This is the process that I expect through the data loading wizard:
In the first page of Data load Source, I created one radio page item and by selecting that, it should be assigned to the first column in the table.
I will upload a CSV file with two columns which will be assigned to the second and third columns.
So, whatever records are there in the CSV file, by selecting page item that static strings need to be inserted along with file data.
I Googled the same thing but I didn't find any proper solution for this requirement. If you can help me then it would be appreciated.
My preferred approach for this sort of thing is to use a staging table as the target of the Data Load wizard; then add a process at the end that copies the rows from the staging table to the final table, setting the static column(s) at the same time; then delete the rows from the staging table.
Note: add a column SESSION_ID to the table with a trigger that sets it to v('SESSION') so that the process will only pick up rows for the current user session.

How to get a list of all page-level APEX_ITEMS in the current page?

I have an Apex application that is quite large. The need has come up to store detailed usage logs of this application. The information on APEX_WORKSPACE_ACTIVITY_LOG is not enough, because I need to know what queries each user runs on each page.
My first thought was to get the actual Oracle query logs (V$SQL and such), but they provide no information on the user (as far as the database is concerned, all queries are made by APEX_PUBLIC_USER). I have some information about the user on V$ACTIVE_SESSION_HISTORY, but that's incomplete because it stores samples of active sessions and their SQL queries at 1-second intervals, so I miss too many queries.
So now I'm off to implementing application level logging. The "right" way to fo this would be to go through all the pages in my application and create a logging process to store the relevant information for each one (username and some page items). But I wonder if there might be something simpler that does the trick.
If I understand correcly, "application processes" are run by every page in the application. So if I can get an application process to iterate over the list of page items, I can store them all in the database and be done with it. Something like
for item in page_items {
log(username, item_name, item, date)
}
Can this be done? Or maybe the information I need is on the database already and I don't see it?
You can query the metadata tables to get all items for a specific page and then use that to get their value.
select item_name, v(item_name) item_value
from apex_application_page_items
where application_id = :APP_ID
and page_id = :APP_PAGE_ID;
That will capture all items on the page. Don't forget that if you use items on Page 0 (Global Page) you may want to query that page too.
Additionally, you may want to capture application level items too.
select item_name, v(item_name) item_value
from apex_application_items
where application_id = :APP_ID;