Report Region based on POP-LOV in Oracle APEX - oracle

Hi to all respected gurus.
I have a POP-UP LOV in Oracle APEX Form. I want to have a report region to retrieve data from another table, against selected value in POP-UP LOV.
Please guide me, how to do it?
Information Related to Form
"JO Number" is the POP-UP LOV based on table CPS_JO contains information Job Order Description and Vendor Name. I want to retrieve Job Order Description and Vendor Name against selected JO Number.
Thanks in Advance.
Regards
Muhammad Uzair Awan

Item names cannot contain spaces, so I will assume your pop up LOV is called JO_NUMBER.
You can refer to the selected value in JO_NUMBER by using :JO_NUMBER in your SQL. So the region source for the report would look something like this:
SELECT * FROM ANOTHER_TABLE WHERE COLUMN_NAME = :JO_NUMBER
I advise going through the 2 day developer guide as Tom suggested above.

Related

Unable to retrieve report data using Dynamic Action in Oracle APEX

I have two tables: Application (PK: Application_ID) and App_support_domain (column: team_name, FK: Application_ID referencing Application table)
I am trying to display the data present in the Application table based on the selection of team names.
I have created a LOV popup (P2_NEW) to select the team name.
After selecting the team name I want to show the application data in the form of a report, so I have created a dynamic action that will show the body region which has the application data.
But the SQL query that I have written does not return any data. I think it is not taking the P3_NEW LOV value and displaying the application data.
Please let me know if you need more info/clarification.
Could you please take a look and help me out?
A "show" dynamic action will not resubmit the report. Add 2 actions to the dynamic action. One to refresh and an 2nd one to show. That will force the report to to refresh. Make sure you put P2_NEW in the "Page Items to submit" for the report.

Setting a filter on a data item but the filter is using another data item. COGNOS report Studio

One data Item is QoH (quantity on hand) There is also another data item stock location. The entire report has a prompt for stock location but for one field in my report I want the QoH just for a specific stock location. (no matter the prompt selection)
I was wondering how I can go about creating this custom filter.
Thanks in advance and I hope I provided enough info. (Cognos Report Studio)
Based on your stated requirement, this isn't a filter, it's a data item.
Create a custom data item with an expression like this:
case
when [Stock Location] = 'My specific stock location'
then [QoH]
else 0
end
I can improve my answer if you can provide a clearer description of your requirement and sample data.
Couple of ways
1) Master detail. Drop a list inside the list. Go to properties and select master detail
Link by the key such as company, item, etc (without location).
Then for that detail query, filter for the specific location you want
2) Create a separate query just for just that stock location
Join this to the main report query by the key (without location)

multiple filters in an APEX 3.2 report

I want to have multiple filters in an APEX report but it seems it's not possible? I'm new to apex so it's quite possible too I just don't know how to do it.
I've searched around the net and looked at the various settings in the APEX page but I can't find what I'm looking for.
Like in this screenshot: http://i.imgur.com/3j3wOIG.png
I can only have 1 filter available. I want to filter on other fields too including fields which are not in the report columns.
Is this possible? If yes, can you please teach me? thanks
Columns that aren't displayed in your report are not rendered on your page, therefore you can not filter on them. If you want do so anyway, you need to create a filter based on page items, which you can append to your report query in the where clause.
e.g. create a page item P1_FILTER1 and reference it in your query as: "...where my_column = nvl(:P1_FILTER1,my_column)".
To ensure data consistency you can best create your page item as a select list.

How to select records from multi-companies in Morphex reports?

I want to know if I can select data from multi-company in Morphex reports, for example: user wants to get report's data from CEU & CEE companies. I don't mean get the whole data from all companies, I mean to get data from specific multi-companies.
I can achieve this in SSRS reports by passing a multi-value parameter to DATAAREAID table's field.
It's seems I can achieve this by set Report's Cross-Company property and QueryRun to yes.
this.query.allowCrossCompany(true);
this.query.addCompanyRang("CEU");
this.query.addCompanyRang("CEE");
Here are some links for more details:
Cross-Company Reports in the AOT
Cross-Company X++ Code Basics

FileMaker Pro -- Filtering Relationship Not Working

I'm trying to build a FileMaker Pro 11 layout that excludes records containing a certain value. The relevant data is in table Invoice. I want to filter so that Invoice records whose "Invoice Check Grouping" field is blank are not displayed on the layout.
I've added a global field to the invoice table called "Blank Invoice Check Grouping" to use as my filter criteria. I've created a self-join relationship to the Invoice table, joining "Invoice ID" to "Invoice ID" and joining "Invoice Check Grouping" to "Blank Invoice Check Grouping". The resulting table is named "Invoice Check Groupings".
The layout which I build based on table "Invoice Check Groupings" shows all records in Invoice--it does not filter out those with blank values. What am I doing incorrectly?
Thanks,
Ben
Layouts show records in a table (or more accurately, a table occurrence) and don't directly deal with related data. As mentioned by #pft221, you can use relationships for filtering, but only when viewing data through a portal.
If you always want a particular layout to show data based on a particular find, you can do so with a script and a script trigger. First set up a script to do the following:
Enter Find Mode[]
Set Field["Invoice Check Grouping"; "*" // Find all records with any data in this field
Perform Find[]
Note that you can also embed the find request within the Perform Find script step, but I tend to script finds in the above manner as it's easier to see what the find request is in the script and variables can be used in the find request.
Now you need to set your layout to execute this script whenever it's loaded. Go to the layout and enter Layout Mode. Select Layouts>Layout Setup from the menu bar. Click the Script Triggers tab and check the box for OnLayoutEnter and select the script you wrote above. Now whenever the layout is entered, that script will run and exclude the records that have that particular field being empty.
There are many ways to filter records, depending on what you are trying to do and what you are trying to display for your users.
The most common and simple way you can filter records is through a simple Find in a list view. I'm unclear from your question, but my best guess is that you're already using a list view and misunderstanding how FileMaker's relationships and Table Occurrences (TO's) work.
To Filter with the "Find Records" method:
Create a new List View layout of any Table Occurrence of your Invoice Table -- most likely you will want to use the default Table Occurrence that FileMaker created for you when you created the table.
Place the fields that you would like to display on that layout, including the "Invoice Check Grouping" field.
Switch into Find Mode
Put a '*' character into the "Invoice Check Grouping" field
Perform the Find
You should now see a list of all Invoices where the "Invoice Check Grouping" field is not blank. (You can find additional interesting search criteria in the "Insert: Operators" drop down of the title bar.)
Now you may actually be looking to filter related records through a portal but, given that you've set up a self-join on the Invoice index on the Invoice table my guess is that, at best, this would show either 0 or 1 record for each Invoice record you display in your main layout.
To Filter Records with the "Portal Filter" method:
Let's assume, though, that you have a Client table where you'd like to see only the records with a non-blank "Invoice Check Grouping" value. The table set-up would be as follows:
Client
Client ID
[... other client info ...]
Invoice
Invoice ID
Client ID
Invoice Check Grouping
[... other invoice info ...]
With a relationship in the relationships graph:
Client::Client ID ------< Invoice::Client ID
From there you would set up a Form layout on the Client TO and create a portal showing records from the Invoice TO. From the options for the portal you would select "Filter Portal Records" and use a formula similar to:
not IsEmpty(Invoice::Invoice Check Grouping)
Finally, it's worth noting that a portal filter isn't appropriate for all display situations or calculations. You can set up a similar filter completely through your relationships graph (as I believe you have already tried to do.) This will work, once again, for viewing records through a portal but not for the records displayed by a layout itself.
The answers above don't actually help Ben with his question. They are workarounds.
I have the same problem as Ben, and I don't think there is a solution, even now in Filemaker 12. There is I think no way to define a relationship that will omit the related records where the match fields are empty.
Two options come to mind:
On a specific layout, you have more fine-grained control in the portal definition itself, and can use this to exclude the records
You can now use SQL queries to achieve this result within Filemkaer.

Resources