Conditional Display of Interactive Report Based on Field Above
Page one has simple text box entry for a Vendor # with a button that branches to a page displaying information for that vendor. In a region below, I would like an interactive report that displays all of the item and description that vendor provides to our company. I have tried to use the Conditional Display to disply only items in the report but have been unsuccessful. Your help is appreciated!
Thanks.
Hello user2961006 (please tell us your name),
I understand your question to be, "how do I make a report on page two only show rows related to an item entered on page one". Putting a condition on a region isn't the answer here - you want the report to always display, but just with different rows depending on the vendor number entered. A condition on a region is used to either display the region or not.
What you need to do is put a WHERE clause on the SELECT statement that your report is using to get its data. For example, if the item holding the entered vendor number is P1_VENDOR_NUM, the SELECT statement for your report would look something like:
SELECT item, description
FROM my_items
WHERE vendor_num = :P1_VENDOR_NUMNote my_items is a fictitious name. This will tell the DB to only retrieve rows where the vendor number is the vendor number entered by the user.
Hope this helps, I'll gladly accept reward points if it does ;-)
John
Similar Messages
-
Conditional Display of Interactive Report Based On Different SQL Query
Hello,
I have two drop down list on top of my page and below that I have a interactive report.
Based on user selection of values from drop down, interactive report should change based on different SQL queries.
Is it possible to have different SQL queries based on values from drop down and generate interactive report based on that?
ThanksI am passing my drop down value to apex_collection like the following:
APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY( p_collection_name => 'IR_LIST',
p_query => REQUEST_VIEW(:P12_VIEW));However when I change the values from the drop down, :P12_VIEW is not getting the value from drop down even though I could see value being changed in URL. I have created page process for apex_collection
Process Point - OnLoad - Before Header
Run Process - Once Per Session or When ResetCould someone suggest as why I cannot get the values in function when drop down is changed?
Regards -
MAKE BUTTON CONDITIONAL DISPLAY IN A REPORT BASED ON STATUS OF COL VALUE
hello,
can anyone help me out with this issue.
Like I have a normal SQL report with buttons update,delete,insert and I wanted to display these buttons conditionally based on the value of the "status" column.
For Example: if the status columnvalue is 'DEV' then only display the buttons otherwise don't display them.
thanks,
OrtonI would use a CASE statement in the select....
each CASE would be an img src tag for a different button if the button is an image.
does that make sense? I can include an example if you would like... -
Conditional Link on Interactive Report
I'm trying to make the link column conditional on an interactive report. That is, I only want the pencil icon on the rows which have a field that is greater than 30. So, assume my query says:
select DEPT_ID, USER_LEVEL
from my_table;
I only want the link icon to appear on rows that have USER_LEVEL > 30. I tried (unsuccessfully) to get this to work by adding a condition of "Expression1 = Expression2", and I used the #USER_LEVEL# substitution string. (Note: I know this would be exactly what I want because I want the condition to be on all values > 30, but I couldn't even get this to work when I put #USER_LEVEL# in Expression1 and "30" in Expression2 and looked at the records that had a USER_LEVEL value of exactly 30).
In the end, I had to create a much more complex query like this...
select
case
when USER_LEVEL >= 30 then
'<a href="f?p=&APP_ID.:21:&SESSION.::&DEBUG.::P2_DEPT_ID:' || DEPT_ID || "><img src="#IMAGE_PREFIX#menu/pencil16x16.gif" alt="Edit" /></a>'
else ' '
end as edit_icon,
DEPT_ID, USER_LEVEL
from my_table;
This doesn't seem right to me. Can someone confirm that I'm doing this the right way?Hi -
It really bugs me this forum has such a problem with code examples, so for a while at least I posted quick example on Google:
[Conditional Column|http://docs.google.com/Doc?id=dd2tkvv6_212dbzw2ftq]
Not to complicate too much, but if you wanted to not have empty column except one row, you could of course apply this trick to the column that actually holds the user name in your table... in other words, the user could click right on their own name to go to edit screen, but every other user name but theirs would not be a hyperlink. But that is as they say an exercise for the reader :)
Good luck. -
Setting default columns displayed in interactive report
Hi APEX community,
I recently created an interactive report based on an sql query as follows:
select
"STOCK_CLIP_ID",
"TITLE"
from "STOCK_CLIP"
After creating the report I added an additional column:
select
"STOCK_CLIP_ID",
"TITLE",
*"UPLOADED"*
from "STOCK_CLIP"
The new column does not display by default, I have to add it under Actions > Select Columns. I cant find any setting to add my new column UPLOADED to the default columns to be displayed so that when a user first navigates to the report they dont have to add that column in order to be able to see it.
Sorry this is perhaps a stupid question with an obvious answer, i'm new to the interactive reports.
Thanks!Hi,
Login to Apex builder. Run page where is your interactive report.
Select columns you like to show default from Action menu. Save report default layout from Action menu.
Regards,
Jari
http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0 -
Require assistance in Interactive Report based in APEX 3.2
Hi All,
Thanks in advance
I have created editable Interactive report based on Form with report .
once report created , I have modified query with the column named TempNetto ,Temp Brutto .. Below is the query
select "IDSUB",
"JAHR",
"IDMITARBEITERLISTE",
"EKPREIS",
"WEBUCHUNGEN",
(WEBuchungen*EKPreis) TempNetto , --modified
"NETTO",
DECODE((WEBuchungen*EKPreis),0,0,(Netto+(Netto*VerwaltungskostenZuschlag)+(WEBuchungen*InfrastrukturkostenZuschlag))) TempBrutto, --modified
"BRUTTO"
from "#OWNER#"."SUBS"
I receieved the below message "You have requested to change the Interactive Report query. If you added columns to the query, they will not be displayed when the report is run. You will need to use the actions menu and either select the columns or click Reset. If you removed any columns from the query, it will disable existing filters, highlight rules, and other report settings referencing those columns. Please confirm your request. "
I want the column started with temp should appear in report . I have checked under search bar Action menu is checked and options like Select column and Reset is checked
Kindly provide some help
Cheers
SachinHi,
When you've selected all the columns (Select Columns) you then need to save the report...not reset it. Go back and make sure all columns are on the right and then:
- Save Report
- As Default Report Settings
- Apply
Mike -
Interactive Report Based On A Collection
Hi guys
Using Apex 3.2
I have a classic report based on a collection, which works fine.
I am now trying to create an interactive report based on the same query (collection), but no data is returned.
I there anything special I need to do with an interactive report.
Cheers
GusGo into Interactive Reports Actions Menu > Select Columns > Add all missing columns to right side and apply (Display In Report)
OR
Check interactive report attribute settings
Thanks -
Placing buttons in a region displaying an Interactive Report
Hi,
I have a page on which I am displaying an interactive report.I would like to place buttons on this region where the report is displayed-
- The first button right of the search bar of the interactive report
- The second button right of the first button.
- The third (exactly ) below the second button (still right of the search bar)
I am aware that if this where an HTML region,then I would have had the flexibility to place the third button in a new line without a problem,but can I achieve this in a region displaying an interactive report?
Is there any way to do this?
Regards,
Priya JetleyCreate the buttons as region buttons in the IR region, with the following properties:
Button Position: Right of Interactive Report Search Bar
Button Alignment: Left Right
Enter *style="display: block; float: right;"* in the Button Attributes of the third button.
Edited by: fac586 on Nov 11, 2008 8:04 AM
Changed to fix slight layout glitch in Firefox 2.
Edited by: fac586 on Nov 11, 2008 9:06 AM
Changed back as the slight glitch in FF2 is preferable to not working in FF3 and Safari -
Interactive report based on dynamic query
Hello
I am using Apex 4.1 and have a requirement to create an interactive report based on a dynamic query. This option is available in Classic report but in Interactive this feature is not there. Tried using collections or just a view (thought of changing the view definition during "On load", but structure of the report is already defined based on the definition of the view at design time).
Is there any way of achieving this?
Appreciate any help!
Thanks
aksTry looking at this: http://rakeshjsr.blogspot.com/2010/10/oracle-apex-interactive-report-based-on.html
Thank you,
Tony Miller
Dallas, TX -
Conditional display column in report
Hi,
If we have a single row report of 30 columns, and I want to display only the one with any values but null and hide the null ones, Is there a way to do it?
It's the same issue discussed in this thread conditional display column in report
thanks,
Fadi.Samara - I suspect there are a few ways to do this, but none obvious or very easy as far as I can see.
You can create dynamic SQL (as Arie and others have suggested) to only include the columns that are not null.
You can build and output the HTML directly to the page, choosing only to include the values that are not null.
You can create a set of conditions that you can apply to the report columns. A very crude example might be 30 hidden page items like 'SHOW_COL1' etc. (not great, I know), or perhaps you could set a hidden page item to a value like '01:02:03:'etc., with the number only being included if the value is not null (so that col3 being null gives you '01:02::04'etc.), so that the condition for each column is 'Text in expr 1 in contained in Item in expr 2', where expr 1 is '01' for column 1 etc.
Sorry, that is a very contrived example, but it's just to illustrate that there's generally a way of doing pretty much anything in APEX. You might create your item containing the comparison expression by requerying the data in this kind of way:
SELECT NVL2(column1, '01', '') || ':' || NVL2(column2, '02', '') || ':' etc.
FROM table
WHERE condition
However, wanting to create a single-row report with nulls hidden makes we wonder what you're actually trying to achieve and whether there's a better way? Could you use a series of page items, for example?
John. -
Display a conditional link in interactive report
Hi, I would like to display a link in a column of an interactive report, if the value of this column is not null.
This is the sql code.
Select
(case
when mytable.myvalue is not null then ('<a'||' href="'||'f?p=&APP_ID.:59:&APP_SESSION.::NO:59:P59_ITEM_ID:'||mytable.value||'">'||'<img src="#IMAGE_PREFIX#menu/download_32.gif">
</a>')
else null
end) link
from
mytableI also tried apex_uil.prepare_url.
Select
(case
when mytable.myvalue is not null then ('<a'||' href="'||apex_util.prepare_url('f?p=&APP_ID.:59:&APP_SESSION.::NO:59:P59_ITEM_ID:'||mytable.value)||'"><img src="#IMAGE_PREFIX#menu/download_32.gif">
</a>')
else null
end) link
from
mytableAlthough it seems that is correct, instead of displaying the link, the report displays the html text of the link
(I omitted the first *<* and the last *>* to display the text in the thread):
value displayed a href="f?p=101:59:4377010977110083::NO:59:P59_ITEM_ID:146"><img src="/i/menu/download_32.gif"></aI did a lot of researchs of implemented solutions, but to me always return the same result.
I hope someone can tell me the solution or my mistake that maybe at this time is escaping me.
thanks
greetings
Edited by: diapason on Sep 8, 2011 9:09 AM
Edited by: diapason on Sep 8, 2011 9:19 AM
Edited by: diapason on Sep 8, 2011 9:33 AM>
Welcome to the forum.
Please read the FAQ and forum sticky threads (if you haven't done so already).
Hi, I would like to display a link in a column of an interactive report, if the value of this column is not null.
This is the sql code.
Ah. It looks like you've now found the instructions on how to post code...
Although it seems that is correct, instead of displaying the link, the report displays the html text of the link:
value displayed
<a href="f?p=101:59:4377010977110083::NO:59:P59_ITEM_ID:146"><img src="/i/menu/download_32.gif"></a>I did a lot of researchs of implemented solutions, but to me always return the same result.
I hope someone can tell me the solution or my mistake that maybe at this time is escaping me.Ensure the Display Text As report column attribute is Standard Report Column rather than the default Display as Text (escape special characters). -
Conditional Display of A region based on a Search condition
Hello All,
I would really appreciate any suggestion and pointers on how to achieve the below.
My requirement is to display a tabulated result based on a search condition.
I have two regions. One region contains the items to enable a search and the other region will be used to display the search results.
Region A is an HTML region containing three items
1. A text field: to enter the search text
2. A list field: to determine the type of entity to search (customer_id, invoice number, Passport No)
3. A button: to initiate the search process.
Region B is a reports region displaying the search results
My question is:
1. Is basing the source of the region as a “PL/SQL function returning a select statement” the ideal choice. I will have variable “WHERE” clauses based on the search criteria entered in region A. However, the columns returned will always be the same
2. How do we get the region B to display only when there are results returned from the search results
3. How do we base by result set based on a stored procedure in the database. Basically as an API. We pass in the parameters and the API passes the result set back to APEX. This way, I can have all the DML hidden behind the stored procedures
Looking forward to your comments and suggestions
PravindHello,
See the below link
Re: item dispaly conditionally
Regards,
Shijesh -
Displaying an interactive report differently depending on user connected
Hi,
I have an interactive report on a table which holds server information. This table has a column which is called "Restricted". It has only two possible values (Y or N). It determines whether or not a user has the privileges to view the server password of that server.
We are using database authentication for our APEX 3.2.1 application. We have 2 predefined roles, one with full privileges (Select, Update, Insert, Delete), and one with only Select privileges. When creating a database user account to access our APEX application, one of these 2 predefined roles is assigned to the user.
What i want to accomplish is to display the Server Interactive Report as follows:
If the user has full privileges, then they see the contents of the Password field regardless of the contents of the "Restricted" column (Y or N).
However, if the user only has select privileges, they will not see anything in the Password field if the "Restricted" column is set to Y. Either i will display a Null or a bunch of stars (****). Note: I cannot hide the Password column because i still want to display the password column for those records that have a 'N' in the restricted column.
I know how to create a condition which determines which level of privileges the user has and make the report display stars in the password field (I used a decode statement in the SQL statement generating the report which sets the Password field to **** if Restricted is set to Y). This only takes into account the role assigned to the user. The complicated part is factoring in the condition of wether or not the Restricted column is Y or N so that users with the right privileges will see everything whereas users without the privileges will see null or stars.
This is a major issue we are facing right now.
Thanks for any suggestions, advice.
TimHi Scott,
Thank you very much, I just had not structured my case statement correctly and ommitted that second condition about the user.
I did this: CASE WHEN "RESTRICTED" = 'Y' and :APP_USER = 'NO_PRIV' THEN '****'
ELSE ORA_PWD END ORA_PWD, "RESTRICTED"
The report works fine now! :-)
Tim -
Newly added column not displayed in Interactive report
Hello,
I have a tableA with 3 columns.In the application i am displaying as Form with Report region as Interactive report(Oracle 10g Application Express 3.2).
I added one column to tableA.Now when i am refreshing the report by adding that column in the select query,the new added column is not displayed in the application.
How can i do this so that the added column can be displayed.I dont want to delete the whole thing and redo it again.
Thanks
SiyaHi Siya,
The Interactive Report will not show you the newly added columns by default. You have to select those columns from the actions menu and when all the required fields are displayed then save it as the default report.
Then you will be able to see all the columns.
Hope this solves your problem.
Thanks,
Satish. -
Open orders display in BEX report based on Key date
Hello All,
I have a requirement:
We have an existing report which needs to have input selection as Key Date.
The report should display the Open orders based on the key date mentioned.
For Eg: if an item A was Opened on 20th Sept, 2010 and now CLEARED and if I run the ECC report today and mention the key date as 20th Sept, 2010, then the report will show me the item A status as OPEN
Plz help me with the logic for the same at the earliest
Tthanks..
SnehaHi Sneha,
I assume you have open and crear dates in your query. So put an open date in your query filter and restrict it as less then Key date variable(which is a variable of type user-input on 0calday), then create another variable that feeds from keydate variable (it can be a replacement path or simplest user-exit).
Note: the another variable is needed because as far as i can remember you cant use the same variable to restrict two different chars in the same query/anyway test if it's not possible - then create another variable as i mentioned.
Take Cleardate in your query filter and restrict it as more than keydate variable andr # (not assigned). (in case if it hasnt been creared at all yet at the key date time)
Pls let me know if this was helpfull
Maybe you are looking for
-
HP Web Services enabled, but info sheet not printing
Hi all Just installed my new LaserJet Pro MFP M128fw and networked it with a static IP to suit my network. Printer is accessible to ALL computers on the network. Can print, scan, copy and fax without ANY problem from any computer. Can ALSO print from
-
How do i connect a surface 2 to an office jet pro 8600
I am trying to connect a surface 2 windows RT 8.1 tablet to an HP office jet pro 8600. I have down loaded the driver from the HP web site but I get an error message that states it can not be run on this computer, and I should go to the app store. I
-
I am trying to find out why the Photo books I ordered from Iphoto cant be sent to france which is where I live most of the time
-
How to find the definition for variable creation in report painter
Hi expert, How/where I can find information about the variable created in basis key figure in the report painter? What is the mean for basis key figure and variable (set variable on/off check ) in the basis key figure? Please advice. thank you. Regar
-
Possible to parse HTML in TextArea?
Hi All, I'd like to know whether it is possible to display HTML code in textarea when we use webui page. We have a table column with HTML code in it(something like <font style="...">, <span style="background:xxxx">, <a href=""> and so on), and we wan