Generate reports based on two conditions
Dear all,I generate reports based on satisfactory conditions in two columns in a table.
For example.
I have a table test1 with columns A, B, C, D, E
Now, I want to create reports based on the research of two columns A and b. What is the preferred method to do?
Thanks in advance.
What is the preferred method to do?
Write the appropriate query:
select a,b,c,d,e
from test1
where a =
and b =
In reports, the State may be a user input parameter:
select a,b,c,d,e
from test1
where a = :parameter1
and b = :parameter2
Tags: Oracle Development
Similar Questions
-
Conditional masking based on two elements
Hello gentlemen,
I'm trying to hide elements based on two conditions.
Currently I can only do it based on either:
1 expression = Expression 2 (i.e. EMPNO = JOHN).
Is there a category that would allow me to say e.g. "equation in Expression 1 or equation in the Expression 2 is true"?
See you soon,.
MauricioHi Mauricio,.
You can still use the condition type "PL/SQL Expression" to form more complicated conditions.
for example: P1_ITEM1 = 'X' OR: P2_ITEM2 = 'Y '.
brgds,
Peter
Blog: http://www.oracle-and-apex.com
-
display edit link based on a condition problem
Hello
Someone can such me how I can display the link change in every line of my report based on a condition... is the query on which my report is formed, as shown below
SELECT COMPUTER_ID,
COMPUTERNAME, BATCH, DESCRIPTION, OPERATING_SYS.
PRIMADMIN_PHONE, PRIM_ADMIN, PRIMADMIN_CNID,
SECONDADMIN_PHONE, SECONDARY_ADMIN, SECADMIN_CNID,
RACK_NUM, MAINTENANCE_WINDOW from cts_masterserverview where ACTIVE_STATE = 'Active'.
All these data are from several fields. If city and Andy see, probably they will remember... They helped me to change this option much... my problem is now
I did the columns computer_id, which is the key in all other tables as a button change. And when the user clicks this edit button, data row respective are filled in the form, where the data can be changed...
My requirement is now, at each change of line button should appear only if the user logged on as long as the PrimAdmin of this line... I am recovery PrimAdmin_CNID so that it can be compared against: APP_USER. All others should be able to view the data, but not modify... I am not able to figure out how I can conditionally display as I do for the other buttons.
Can someone give an idea on how to do...
Thank you
Yvette
Published by: user0012 on May 1st, 2009 13:25Hi David,
Use the following query to conditional change the link,.
SELECT CASE WHEN PRIMADMIN_CNID = :APP_USER THEN '' ELSE ' ' END Edit ,COMPUTER_ID ,COMPUTER_NAME ,STATUS_ID ,DESCRIPTION ,OPERATING_SYS ,PRIMADMIN_PHONE , PRIM_ADMIN ,PRIMADMIN_CNID ,SECONDADMIN_PHONE ,SECONDARY_ADMIN ,SECADMIN_CNID ,RACK_NUM ,MAINTENANCE_WINDOW from cts_masterserverview where ACTIVE_STATE = 'Active' Add onclick= before "javascript above and Change the number 7 in the javascript to the page where you have edit form.
Thank you
Manish -
Hi all
I wanted to create a form with report based on two tables:
1. I created a display (called COMBO) based on two tables
2. I then created a form with the opinion-based report
Until then, everything seemed fine until I tried to edit existing records - I get the error:
Note: REPATRIATION_ID is the primary key of the table of repatriation. The other table is a plaintiff.ORA-20505: Error in DML: p_rowid=2002082600001172, p_alt_rowid=REPATRIATION_ID, p_rowid2=, p_alt_rowid2=. ORA-01776: cannot modify more than one base table through a join view Unable to process row of table COMBO.
& when I tried to create a new record - I got the error:
Someone enlighten me please!ORA-01776: cannot modify more than one base table through a join view Unable to process row of table COMBO.
Kind regards
Kamo
Published by: Kamo 03/12/2009 02:33Hi Kamo,
You create a trigger of "instead of" (insert/update/delete) on your sight to treat inserts etc in the tables 'real '.
Greetings,
Roel
http://roelhartman.blogspot.com/
You can reward this response in marking it as useful or Correct ;-) -
Conditional display of interactive report based on the different SQL query
Hello
I have two drop-down list at the top of my page and below I have an interactive report.
Based on the selection of the user from the drop-down list values, interactive report should change based on different SQL queries.
Is it possible to have different SQL queries based on the drop-down list values and generate interactive report based on that?
Thank youHello
You can't have IR based on function returning the query as you can have classic report
But here is a workaround
http://www.oracleapplicationexpress.com/tutorials/71Kind regards
Jari -
Highlight conditional in standard report based on a column - endangered
Hi all
I've implemented a conditional formatting on a standard report based on the thread below
Highlighting a row in a tabular form, based on a column in the row
Everything works fine, except when you hover over the report highlighting disappears. It reappears if you refresh the page, or scroll to the next page in the report.
I use in my style in the model tag
style = "background: red".
Is this something to do with the model? I use the theme generator 2.
Any ideas?
AndrewHi André,.
It is in from the report model - before every line:
Just remove the # if #HIGHLIGHT_ROW you don't need.Regards Garry
-
Hide an entire column based on a condition
Hello
I'm trying to completely hide a column in a table based on a condition, if the column was not present. I wrote two conditional regions for the header and data, but it is still showing up. Any help would be appreciated. The XML model RTF, the PDF generated and the output I'm looking is attached. Thank you.
Please check your email that I have forwarded to update the model.
I counted occurrences of January in your xml and formed the condition based on the fi
MONTH
-
Remove the line from the Excel report when generating reports
Hi all
I try to delete whole lines of the report excel during the generation of the report in excel, but I'm not able to do this. Here I am attaching an excel template, in that I want to delete line no 3 to 5 How can I do this. I'm using LabVIEW 8.6 Report Generation Toolkit for Microsoft Office 1.1.3
Thanks and greetings...
If there is no function to generate report for simple operations like this, then use the palette of VBA macros to run this code snippet:
'remove all lines between two rows inclusive '.
Void DeleteRows (intTopRow As String, intLastRow As Integer)
Range (cells (intTopRow, 1), (intLastRow, 1)). EntireRow.Delete xlShiftUp
End SubImport Excel module allows to load the .bas file then run Excel Macro with parameters 3 and 5. Check your security settings if you get an error in the macro.
-
Report based on the result of the sorting function?
Dear all,
I will make this issue in general terms:
We have a report based on a query that reads data from a single table (P). It will take to provide a field more (X) in the report which is obtained using more than two tables (E, 1 m approx).
I wrote a function that produces this extra field based on a join of tables E and P1. Please note that this function depends on the report query variables. This output is correct and provides all the necessary information, but it is necessary to sort the report based on the result of this function, i.e. the value of field X.
Is this possible?
I appreciate your comments.
Note: I've tried incorporating pictures E, P1 in the request report (I can then sort on the required field) but gets reduced the number of lines in the report. This is because the join between the tables, P, E and P1 reduces the number of lines (which is not the correct result).
Yes, it is possible. If you have ended up above a formula column.
Create the formula column. For example, CF_SALARY_TOTAL. Place a level to the top of the query and set your desired sort (Asc/Desc)
Hope this helps
Hamid
-
interactive report based on an existing table
Many people, it is the next step in the construction of my app. I watched a tutorial of utube produced from a worksheet a table in a database and a set of pages to enter data and to display and edit data in the table. I already have the table and I would like to make the pages I've seen. a spreadsheet as a table which allows the edition of each row and a button create on top. I guess I was also able to delete a line if necessary. I think I need to creata a page, select report and interactive report. Continues in this way, I get a request for a sql statement that will likely tell the page generator that he needs to create the report. I need to make the report based on a table in another table space. At this page, I entered in the query designer and my table space is not listed, only the current APEX of table space is available. I went in a different direction to create a form for a table and to the bottom of the sequence, he also requested information in the table. My table db space is listed as available and I am able to create the registration in a satisfactory manner.
Then, why I can see and interact with my db table space when you create a form for a table but can not find the db table space when you generate an interactive report?
Also, I'm heading down the correct path for the interactive report, that I need?
"HustlingHare" alright, get ready to be the hero. "" "You're almost there. '"
(1) Firstly, nuke has report page IR that you just created. You don't need it.
(2) then go back and run the wizard to create a Page. Choose 'Form', then 'form on a Table with the report '. Because your DBUSER1 has privileges discrete objects on the table in the schema DBUSER2, DBUSER2 must appear in the select list of "Table / view owner" in this wizard.
Follow the steps in the wizard to create the interactive report and form, and you're done!
Joel
-
How to create a report based on the item selected from the list of selection?
Hello
I created a tables_LOV based on:
Select table_name table_name user_tab_cols r, d
where column_name like '% _type % '.
Then I created a ListOfTables page element, display in a selection list and pointing to tables_LOV.
I run the page, and I can choose the table I want in the drop-down list.
How to create a report based on the selected element? (ex: select * from selected_table)
Thanks in advance
Salah
Hi Salah,
Allright, take a look at this page: http://apex.oracle.com/pls/apex/f?p=vincentdeelen:collection_report
I think that simulates what you are trying to accomplish. I've implemented the simplest method I could think of.
The report is based on a collection of apex. If you are not familiar with this, you should study the documentation: APEX_COLLECTION
To recreate my example, you should:
(1) create a report (interactive) on your collection
SELECT * FROM APEX_collections WHERE collection_name = 'MY_COLLECTION'
(2) create a selection list page_item for the tables that you want to display (in my case, this is called "P38_TABLES")
(3) create a dynamic action that triggers on the evolution of your selection list page_item. Dynamic action must be a parade of PL/SQL procedure the following code:
declare l_query varchar2(4000); begin l_query := 'select * from '||:P38_TABLES; if apex_collection.collection_exists ( p_collection_name => 'MY_COLLECTION' ) then apex_collection.delete_collection ( p_collection_name => 'MY_COLLECTION' ); end if; apex_collection.create_collection_from_query ( p_collection_name => 'MY_COLLECTION' , p_query => l_query ); end;
Make sure that you add your page_item 'Page to send items' section.
(4) add a real extra action that makes an update of the report area.
Here are two photos describing the da:
http://www.vincentdeelen.com/images/OTN/OTN_COLLECTION_REPORT_DA1.PNG
http://www.vincentdeelen.com/images/OTN/OTN_COLLECTION_REPORT_DA2.PNG
Good luck and greetings,
Vincent
-
Merge the queries based on the conditional
Apex 4.2
I have a pretty complex question. I have a page that will have a selection list on the data entry form. The selection list contains a list of both 1) Active only or 2) active and inactive areas. We show the active areas when we create a new record (P101_ID IS NULL), we appear active and inactive sectors when you edit a record (P101_ID IS NOT NULL). I have therefore two separate queries to account for each case. Simple so far.
Problem I am seeing that create two lists of selection on the page and put a separate condition on each one (hiding one of selection lists depending on the case the ID IS NULL or the ID IS NOT NULL) does not work. So I was wondering if there was a way to combine queries for that to work based on a conditional statement. I did experiment with the instructions box and unions, etc., but my questions are a bit complicated. They are as follows:
LIST OF ASSETS SECTORS (P101_ID is NULL)
Select unique ISEC.inspection_sector_name, ISEC.inspection_sector_id From INSPECTION_SECTORS ISEC left join HWE_INSPECTION_SCHEDULING SCH on ISEC.inspection_sector_id = SCH.inspection_sector_id Where (ISEC.hurricane_protection_flag = :P157_IS_HURR and ISEC.river_protection_flag = :P157_IS_RIV) AND ISEC.superseded_date is null AND ISEC.commenced_date is not null AND ISEC.inspection_sector_id not in ( Select ISEC.inspection_sectors_id From INSPECTION_SECTORS ISEC left join HWE_INSPECTION_SCHEDULING SCH on ISEC.inspection_sector_id = SCH.inspection_sector_id Where SCH.high_water_event_id = :P157_high_water_event_id AND SCH.inspection_date = :P157_inspection_date) OR ISEC.inspection_sector_id = :P157_inspection_sector_id AND ISEC.superseded_date is null Order by inspection_sector_name
LIST ACTIVE AND INACTIVE SECTORS (P101_IS is NOT NULL)
Select inspection_sector_name, inspection_sector_id From ( Select ISEC.inspection_sector_name, ISEC.inspection_sector_id, '0' as this From dual, INSPECTION_SECTORS ISEC left join HWE_INSPECTION_SCHEDULING SCH on ISEC.inspection_sector_id = SCH.inspection_sector_id Where (ISEC.hurricane_protection_flag = :p157_IS_HURR and ISEC.river_protection_flag = :P157_IS_RIV) AND ISEC.superseded_date is null AND ISEC.commenced_date is not null AND ISEC.inspection_sector_id not in ( Select ISEC.inspection_sector_id From inspection_sectors ISEC left join HWE_INSPECTION_SCHEDULING SCH on ISEC.inspection_sector_id = SCH.inspection_sector_id Where SCH.high_water_event_id = :P157_high_water_event_id AND SCH.inspection_date = :P157_inspection_date) OR ISEC.inspection_sector_id = :P157_inspection_sector_id AND ISEC.superseded_date is null UNION Select unique ISEC.inspection_sector_name|| ' [CLOSED]', ISEC.inspection_sector_id, '1' as this From dual, INSPECTION_SECTORS ISEC left join HWE_INSPECTION_SCHEDULING SCH on ISEC.inspection_sector_id = SCH.inspection_sector_id Where ISEC.superseded_date is not null and ISEC.commenced_date is not null AND ISEC.river_protection_flag =:P157_IS_RIV and ISEC.hurricane_protection_flag = :P157_IS_HURR AND ISEC.inspection_sector_id not in ( Select ISEC.inspection_sector_id From INSPECTION SECTORS ISEC left join HWE_INSPECTION_SCHEDULING SCH on ISEC.inspection_sector_id = SCH.inspection_sector_id Where SCH.high_water_event_id = :P157_high_water_event_id AND SCH.inspection_date = :P157_inspection_date) OR ISEC.inspection_sector_id = :P157_inspection_sector_id NAD ISEC.superseded_date is not null Order by this, inspection_sector_name asc
If the requests are quite complex. I tested the times and they work in APex, separately from the course. Forgive me if I have mispeled anything. But any help on this would be greatly appreciated. Thanks in advance.
Thank you for taking to your friend Frank. You are a bird-guy (my attempt at sarcasm). Nobody has questioned whether its knowledge base; more so in the way he responded to my original post did not «do» Like the people who come on this forum looking for help to those who have greater knowledge, it would be nice to be greeted a little more friendly, lol. Just my thoughts. But, feel free to correct my spelling test, grammar and syntax in my sentences so (the effort once again to emphasize that I misspelled 'AND', and that the request would not be performed--> of course... smh... you are funny)
Apparently I failed to explain the issue in its entirety. I should start by saying... "I have two separate petitions that I tested and already working and am looking to put on a list of selection (at the top) with a conditional execution statement one or the other, through the conditional statement, but again, I was looking for more so for syntax and structure." I'm sorry, I forgot to mention that.
Anyway, enough of this. I found a solution to my problem:
Within the Apex 4.2, you can have a list of selection as a page element. I want to display different results depending on whether Yes or no P101_ID is set to Null or NOT NULL
P101_ID is a primary key for a table.
P101_ID is not the exact name I use in my application / request however.
In addition, you don't need to include double; It's not make or break the query. Something that I forgot to omit them.
In addition, something along the lines of
Select inspection_sector_name, inspection_sector_id From ( .....all the stuff in query 1.......) Where P101_ID is null UNION Select inspection_sector_name, inspection_sector_id From ( ....all the stuff in query 2.....) Where P101_ID is not null
will work on a selection list in the APex. So problem solved. Thank you for all your wonderful insight, of words and thoughts. Thank you.
-
hide the text label in the section report IR under certain conditions
Hello
We have a textlabel and a calculated field in a section of report to the IR 11.1.2.1. Is it possible (in a script) to hide the textlabel and field based on certain conditions, like for example, if the field computes to 'zero '?
Thank you.Use a field instead of the text label. In the Expression Editor you can use the function if() {} else {}
HTH
Wayne
-
The column report based on the build option
Hello
is it possible to display a column of report based on the selected build options?
I can exclude the elements or even a full page by adding a compilation option, but I couldn't find any way to exclude a column of a report according to a compilation option (for example not displayed this column if the build option is xyz).
Any ideas?
Thank you
JochenJochen:
I have not tested, but creating a condition for the column based on the APEX_APPLICATION_BUILD_OPTIONS could provide a solution.
CITY
-
Upgrade the generatation report toolkit OR
Hey there,
I have a few old screws that used to be in the (1.0.x) report generation toolkit I need to modify and upgrade.
Generate report Set updated the Data.vi
Generate data Get report to Modify.vi
Get Data.vi report
do not seem to no longer exists in the labview 2011 report generation toolkit.
I can grap one old library I have on another PC that includes these missing screws, but then I have a problem with
Generate the report objectrepository.vi which is password protected and not executable. It prevents screws from execution.
Found a few discussions of froum NOR years ago on the forum or and a link from the Web site of NOR, but could not find any viable solution yet. http://digital.NI.com/public.nsf/allkb/0C7100D6E9E4783B862575070055A499
I wonder if there is someone who has already changed some probably screws with the new activex calls to replace the missing screws and managed to do the update successfully?
Hi sezergin,
I think that even if they are no longer on the pallets, they are always included in the report gen toolkit 2011. I found them on my file system under C:\Program Files (x 86) \National Instruments\LabVIEW report 2012\resource\importtools\NISH. Try labview to use these screws to score, they should have the same functionality, as they did in previous versions.
There are usually other ways to produce this functionality using other screws in the Toolbox, that's why they are no longer included, but if you upgrade an existing piece of code, you can just keep it as it is.
All the best
Maybe you are looking for
-
Since one of the 2 weeks that Finder does not work properly. I start my iMac and when it is completely running the start-up procedure, I click on the button of the finder in the dock. Finder opens a window, but will freeze instantly or after one or 2
-
I don't know how it happened. My stupid cat came and laid down in front of me, on the keyboard, back bent and suddenly, the web page is teeny tiny. I can't read yet.
-
HP Pavilion HPE H8-1234: Hp screen after the passage of graphics cards
Hello I ordered a new graphics card and the power supply about two weeks ago. When I put the new power supply in the computer, it worked fine, power supply is Corsair 600 watts. This is not the first time that I changed my graphics card and the one I
-
23P 108 HP has in a BluRay: lack the BluRay Driver for HP BD CMB UJ160 B
After the upgrade of form 8.1 Win and clean then reinstall Win 10 Pro 64 bit on my 23P108A all in one HP Device Manager is showing the name of BluRay player, but with a yellow error against her. The BluRay player does not appear in my computer, eithe
-
I can't burn music to disc using my windows media player.
When I burn music tracks on a disc, instead of pieces of music, all I get is a high-pitched sounds static, deposited on the disc. Media Player goes through the correct procedure for the copy and finalize the disc, but when I play it back all I get is