Conditional display in a SQL-Report/Report Region

Hi,
here I have an example for "Conditional display in a SQL-Report/Report Region". I figured it out in Firefox 3.6.2 using Firebug as development tool on Apex 3.2.1.00.12.
First you have to put the following javascript code in the Page HTML-Header:
<script type="text/javascript">
<!--
// SOURCE
// W:\oracle\PRJ DWLS\javascript.07.js
// Beispiel Funktion zur bedingten Formatierung einer Tabellenzelle.
// Help (Substitution Strings):
// http://htmldb.oracle.com/pls/otn/wwv_flow_help.show_help?p_lang=de&p_session=2412201185523196&p_flow_id=4003&p_step_id=420,4003
// HTML Expression:
// <script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#DFT_COND1#
function ex_conditional_td
( p_id
, p_rownum
, p_cellnum
  var l_td;
  l_td = vd_getColumn(p_id, p_rownum, p_cellnum);
  // hier die Bedingung definieren
  if (true) {
    l_td.style.color = '#808080';
}  // -- eof ex_conditional_td -- //
// Beispiel Funktion zum Abstellen der onMouse Funktionalität der Tabellenzeile
// HTML Expression:
// <script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#DFT_ID#"
function ex_conditional_tr
( p_id
, p_rownum
  var l_tr;    // TABLE.TR
  var l_td;    // TABLE.TR.TD
  if (true) {
    l_tr = vd_getRow(p_id, p_rownum);
    l_tr.onmouseover = null;
    l_tr.onmouseout  = null;
    for (var i=0; i<l_tr.cells.length; i++) {
      l_td = l_tr.cells;
l_td.style.backgroundColor = '#DDDDDD';
} // -- eof ex_conditional_tr() -- //
var g_DEBUG = false;
var g_TBODY = null;
// Liefert das Body-Element der Tabelle mit der ID <p_id>.
// Parameter
// p_id - die Id der HTML-Tabelle
// Return
// das Body-Element oder NULL, wenn die Zeile nicht gefunden wurde
function vd_getBody
( p_id
if (g_TBODY == null) {
var l_table = null;
l_table = document.getElementById( p_id );
if (l_table == null) {
l_table = document.getElementByName( p_id );
if (l_table != null) {
if (vd_debug()) {
alert("Tabelle gefunden, " + l_table.nodeName);
g_TBODY = vd_search( l_table, 'TD', 't10data', 'TBODY');
return g_TBODY;
} // -- eof vd_getBody() -- //
// Liefert die Zeile <p_rownum> der HTML-Tabelle mit der Id <p_id>.
// Parameter
// p_id - die Id der HTML-Tabelle
// p_rownum - die Zeilennummer
// Return
// die Zeile oder NULL, wenn die Zeile nicht gefunden wurde
function vd_getRow
( p_id
, p_rownum
var l_body = vd_getBody(p_id);
if ( l_body != null
&& l_body.nodeName == 'TBODY'
&& l_body.children[p_rownum].nodeName == 'TR') {
return l_body.children[p_rownum];
else {
return null;
} // -- eof vd_getRow() -- //
// Liefert die Spalte <p_column> der Zeile <p_rownum> der HTML-Tabelle mit der
// Id <p_id>.
// Parameter
// p_id - die Id der HTML-Tabelle
// p_rownum - die Zeilennummer
// p_column - der Index der Spalte / Zelle
// Return
// die Zelle oder NULL, wenn die Zelle nicht gefunden wurde
function vd_getColumn
( p_id
, p_rownum
, p_column
var l_tr = vd_getRow(p_id, p_rownum);
if ( l_tr != null
&& l_tr.nodeName == 'TR'
&& l_tr.children.length >= p_column
&& l_tr.children[p_column].nodeName == 'TD') {
return l_tr.children[p_column];
else {
return null;
} // -- eof vd_getColumn() -- //
// Rekursives Suchen nach einem Node.
// Zweck: Das bedingte Formatieren einer Tabellenzelle in einem Apex Standard
// SQL-Report.
// Diese Funktion durchsucht rekursiv, ab einem Ausgangsknoten <p_node>, alle
// darunter befindlichen Elemente, ob in dem Element <p_seachIn> sich die
// Klasse <p_class> befindet.
// Bei Standard-Reports ist die Reportzelle (TD) mit der Klasse
// "t10data" formatiert.
// Zunächst muss dazu die Tabellenzelle (TD) selbst, die übergeordnete
// Tabellenzeile (TR), der Tabellenbody (TBODY) oder die Tabelle (TABLE)
// selbst ermittelt werden.
// Der Beispielaufruf:
// var l_body;
// var l_node = document.getElementById( 'R112233' );
// l_body = search( l_node, 'TD', 't10data', 'TBODY');
// durchsucht also das mit der Id "R112233" versehene Element [der Report, für
// den in Apex eine statischen ID vergeben werden musste] rekursiv, bis er
// die [erste] Tabellenzelle "TD" findet, die als Klasse "t10data"
// definiert hat. Für diese ermittelt er dann das übergeordnete TBODY-Element.
// Parameter
// p_node - das Ausgangselement
// p_searchIn - der Knotenname, der durchsucht werden soll
// [node.nodeName == p_searchIn]
// p_class - der Name der CSS Klasse
// [node.classList[<index>] == p_class
// p_parentName - der Name [node.parentNode.nodeName == p_parentName]
// des Elements, das zurückgeliefert werden soll. Wird als
// p_parentName der Suchname p_searchIn angegeben, wird
// das Element selbst zurückgegeben.
// Return
// das per p_parentName gesuchte Element (TD, TR, TBODY, TABLE)
function vd_search
( p_node
, p_searchIn
, p_class
, p_parentName
var LN = "vd_search";
var l_element = null;
// DEBUG
if (vd_debug()) {
alert(LN + ":" + "Untersuche " + p_node.nodeName + ", id=" + p_node.id);
// 1) der aktuelle Knoten ist der, der durchsucht werden soll
if (p_node.nodeName == p_searchIn) {
if (p_node.classList.length > 0) {
for(var c=0; c<p_node.classList.length; c++) {
if (p_node.classList[c] == p_class) {
// Parent Node dynmisch suchen
l_node = p_node;
if (l_node.nodeName == p_parentName) {
return l_node;
while(l_node != null && l_node.parentNode != null) {
if (l_node.parentNode.nodeName == p_parentName) {
return l_node.parentNode;
else {
l_node = l_node.parentNode;
// 2) wenn nicht 1) oder nicht in 1) gefunden, dann in den Kindelementen
// weitersuchen
if (p_node.children.length > 0) {
var i = 0;
while (i<p_node.children.length && l_element==null) {
l_element = vd_search( p_node.children[i], p_searchIn, p_class, p_parentName);
i++;
return l_element;
} // -- eof vd_search() -- //
// Gibt an, ob Debug ein- (true) oder ausgeschaltet (false) ist.
// Return
// true - debug ist eingeschaltet
// false - debug ist ausgeschaltet
function vd_debug()
return g_DEBUG;
-->
</script>
Maybe you have to modify the "vd_getBody" function. I'm searching the table cell with having the class "t10data". When you use another theme, there's maybe another class used.
Second is, that you set an static id for your report region. I prefer this structure:
R<app-id><page-id><seq> (Raaaaappppsss) e.g. R094260001010.
First example is to turn off the onMouse-Effect. Maybe on the first or last column definition you put this code in the "HTML-Expression" area:
<script>ex_conditional_tr('R094260001010', #ROWNUM#);</script>#ID#This will call the example function ex_conditional_tr with the parameter
a) the region id
b) the rownum (as oracle always starts with 1 this is the first data row [rownum=0 is the table header row])
Second example is the conditional formatting of a table cell. Put this in the HML-Expression area:
<script>ex_conditional_td('R094260001010', #ROWNUM#, #COLNUM#-1);</script>#ENAME#This will call the example function ex_conditional_tr with the parameter
a) the region id
b) the rownum
c) the cellnum (here we have to subtract 1 to get the "real" cell index)
The "ex_conditional" functions are just a representation of how to get the row or cell node.
Hope this help a bit.
Tom

I 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...

Similar Messages

  • Conditionally displaying different images in a report

    Hello. I have a simple report. In one column of it I have a link to another report. Instead of showing the value for the column, I show an image using the column's Column Link's Link Text property.
    In the Link Text field, I put an <img src="#WORKSPACE_IMAGES#my_image.jpg"> tag.
    Works like a charm - on the report the column displays little icon images that can be clicked on that take the user to a different page.
    I would like to conditionally (based on the actual value of the column's row) display two different images. Think of a green Up arrow vs. a red Down arrow.
    How can I do that?
    Or can I at least have the image above conditionally display and if the condition is not met, not display anything?
    I notice each of the report's column's attribute page has the Conditional Display section. How does work for a column?
    Thanks
    Boris

    Use a case expression in the query, e.g.
    case
      when x <= 50 then 'down.png'
      else 'up.png'
    end icon
    ...and change the Link Text field to
    &lt;img src="#WORKSPACE_IMAGES##ICON#" alt=""/&gt;

  • Conditional display using Pl/SQL function body returning a boolean

    I am having issues with conditional display of a report.
    I have to select lists: p50_facility and p50_supervisor.
    I have entered the below pl/sql function body returning a boolean
    Begin
    if (:p50_facility is null or
    :p50_supervisor is null) THEN
    Return False;
    Else
    Return True;
    End if;
    End;
    No matter what values my items are set to (null, not null), the report shows.
    What am I doing wrong?

    Hi,
    The values for the lists will be null only until the first time the page is submitted. Thereafter, the value is likely to be '%null%'
    You will need to do something like:
    BEGIN
    IF (:P50_FACILITY IS NULL OR :P50_FACILITY = '%' || 'null%' OR :P50_SUPERVISOR IS NULL OR :P50_SUPERVISOR = '%' || 'null%') THEN
      RETURN FALSE;
    ELSE
      RETURN TRUE;
    END IF;
    END;Andy

  • Conditional Display Of Headings on Grouped Report

    I have a grouped report in 2 seperate tables. I want to print the values of 'H1' and 'H2' (which are my headings for 'Group:' and 'Name:') only 1 time per page. The grouped data needs to print on every occurance. How do I do that?
    Group: 1 Name: Bob
    ___001
    ___002
    ______2______Tom
    G
    H1 GROUP_FIELD H2 NAME
    F SECTION PERIOD E
    E
    G= <xsl:for-each-group select="DOCUMENT/REGION/ROWSET2/ROWSET2_ROW" group-adjacent="GROUP_FIELD">

    try this
    you can say it as display it as header of the table & repeat on top of every page in table row properties.
    And the H1 and H2 is in the loop, so it would ideally repeat for all the instances of row.
    May be we can limit for only one time, and not as one time on every page.
    in that too, you have value which is changing next to the H1 and H2.
    so it is adding little more confusion to your requirement.
    alternatively send me the xml and template and existing sample output.

  • Displaying Stored Procedure (SQL) in Report (INFORMATION_SCHEMA.ROUTINES.ROUTINE_DEFINITION)

    We have processes that call numerous stored procedures.  We are trying to create a SSRS report for our IT department to use so they can easily lookup the stored procedure definition.  Some end users do not have access to SQL Server Management Studio.
    The dataset query uses a System View... INFORMATION_SCHEMA.ROUTINES.  We are joining on the
    ROUTINE_NAME.  When running the SQL, it works perfect.  We are able to get all the columns we need.  The primary column in the INFORMATION_SCHEMA.ROUTINES we need is ROUTINE_DEFINITION (the sql/text of the stored procedure).
    In SSRS, we copy/paste the same SQL into the DataSet query.  When I test the query in the DataSet window (using red
    ! button), it pulls back the data just fine.
    I then drop all the queried columns on the report (see query below).  When I run the report all data is display except the ROUTINE_DEFINITION column.  Why is this?  Is it because it's SQL and SSRS won't display SQL content?  How
    can I get the ROUTINE_DEFINITION column data on the report?
    Here is example query I'm using in the SSRS dataset:
    SELECT SPECIFIC_CATALOG, SPECIFIC_SCHEMA, SPECIFIC_NAME,
    ROUTINE_TYPE, CREATED, LAST_ALTERED,
    ROUTINE_DEFINITION
    FROM INFORMATION_SCHEMA.ROUTINES
    WHERE ROUTINE_NAME = @StoredProcedureName
    Andy Kreider | Principal Financial Group | Des Moines, IA, USA

    I have created a new report with the query.  When I run the query, you can see I get results for all columns (as expected).
    I'm using a tablix report and just dropping the columns on the report.  No other editing or customization of the report.  I confirmed (twice) that the Field Name and Field Source are present within the
    Dataset Properties > Fields page. 
    ROUTINE_DEFINITION is list as the Field Name AND Field Source.
    When I run the report through Report Builder, this is what I see...
    As you can see, the ROUTINE_DEFINITION column has no data.  I also ran this same report outside of Report Builder editor by just clicking on the report to open it in a browser window.  Same results... data for all columns except ROUTINE_DEFINITION.
    Seems like this would be something between Report Builder and SQL Server when being displayed.  Or could it be a permissions issue?
    Andy Kreider | Principal Financial Group | Des Moines, IA, USA
    Just out of curiosity did you try using same query on a reporting services report and see if there's any change?
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Conditional display of buttons in a report

    Hello all,
    I'm a beginner in HTMLDB 2.0 so excuse any obvious mistake of mine!
    I have a report about the running status of some procedures. I wanted to had a button to each line of the report to start or stop that procedure.
    If the line contains a Y I want to display a Stop button, if it contains a N I want to display a Run button.
    I hope that I explained what I want to do.
    thanks,
    Eduardo

    vitaly:
    That will only display the buttons given the conditions, but is not exactly what I wanted. I want a button in each row of the report.
    Something like this:
    Action | Procedure Name | Paused |
    ----------------------------------------------------|
    [Pause] | Test_1 | N |
    [Resume] | Test_2 | Y |
    ----------------------------------------------------|
    I think that if this is not possible I will put a radiobutton instead with a global button labelled Change Status, or something similar.
    But thank you for your reply.
    Regards,
    Eduardo

  • How to conditional display Report Region based on number of rows returned

    I have a page with two Report Regions.
    One Region should display if the Query returns 0-1000 rows. The other should display if the same Query returns more than 1000 rows.
    The only way I can figure out how to do this is have ANOTHER query in the conditions field for each Region to Select count(*) from etc.
    I know there is a #TOTAL_ROWS# value but that is only available after the Region is displayed. Is there some other built-in variable that can be used to put in the Conditions field or is doing duplicate SQL queries the only way?
    Any help would be appreciated.

    Rather than running your query 4 times (by embedding it in your condition), you can have a region that is not displayed, with a hidden item, and set the value of the item in a before header computation to the count of your query. Now you can conditionally display based upon the value of that item.
    -- Sharon

  • Conditional display of a column link in sql updateable report

    Hi There,
    I've attempted to look thru the Apex forum about using an Authorization Scheme in an SQL Query (Updateble Report) where I can conditionaly enable (display) a column link based upon a value in the report but alas I cannot find a solution.
    What I have is a SQL Query (updateable report). What I want to achieve is dependant on the value of one of the columns in the report query conditionaly display a column link for the row being displayed. For example if the report dispayed the data from emp, dept only display a column link for rows where the deptno = 100 otherwise don't display the column link. Is this possible to achieve?
    I've tried to define in the authorizatuon scheme in the where clause of an SQL Statement to reference the report column as #deptno# but this doesn't work.
    TIA

    Boketi,
    I was unsuccessful yesterday in demoing what I believe you want to achieve. It appears that an authorization scheme will not process row by row within a standard report so as to allow a conditional display of a link or any other column attribute. You can conditionally display a column by the use of a page item but this method appears to be all or nothing.
    I was successful when I coded the return of the empno via a Case statement but the Link still appeared even though there was no value (empno) to link with. So essence the link to you to a blank for with no PK to read the database by.
    SELECT CASE WHEN deptno = 10 THEN empno ELSE NULL END empno,
           ename,
           job,
           hiredate,
           sal,
           comm,
           deptno,
           phone_nbr
    FROM   empJeff

  • Conditional display of region with PL/SQL function returning SQL query

    Hello,
    ApEx 2.0.
    I use PL/SQL functions that return SQL queries to display the contents of a region.
    How could I conditionally display such region ? If no data is found, the region shouldn't be shown. I tried with "SQL query returns at least one row" but this doesn't seem to work.
    Thanks,
    Matthias

    Hi Matthias,
    Are the regions in question report regions? So your PL/SQL process is returning a SQL query and then populating a report?
    The EXISTS(SQL Query returns at least one row) condition should work, try running the query you are using in the Expression 1 textarea inside SQL*Plus, or SQL developer using the same parameters, and see what gets returned.
    If you are still stuck, can you post the query you are using inside your Expression 1 textarea of the Conditions section and I can take a look at it for you.
    Hope this helps,
    Cj

  • Complex conditional display in report table

    Hi,
    I built a report in a region, and want to make one of the columns conditionally display based on attributes from two other columns in the table. The drop-down for the conditional display only lets me refer to the current item. Is there a way I can reference the other cells in that table row in a PL/SQL expression (e.g.: something akin to #COLB# is not null and #COLC#>1000 ?)
    Related question: I'm assuming the reason I can't directly change the source for the report region and can only modify it from the Query Definition tab is because I used a wizard to create it. Is there a way to "undo" this and make the source for the report fully editable? That would also solve the problem, since I could just add a function-derived column to the query.
    Thanks in advance,
    Keith

    One final update and rephrasing of the problem, because maybe there's another way to solve this.
    I have a column in a report that links to another page, but the link is only shown if a certain condition is met (which is based on other cells in this table row). I can test for those conditions in my original SQL query, so that a null value in my link column results in no user-clickable link being created. (I have to make sure that a null value appears as null on the report page, too.)
    This works fine if the link text is just that: text. Because not meeting the condition returns null, so no text == no link.
    Now the only problem I have comes if I want to use an icon (e.g.: the edit icon) instead of link text.
    What I really want is for the icon to only appear if a certain condition is met. However, the icon replaces the column value so I can no longer use a null value to prevent the link from appearing.
    The original question asked whether I can use other report cells (#foo#) in the conditional display for a cell. If that's not possible, any suggestions on how to achieve the desired effect without resorting to JavaScript?
    Thanks.
    Edited by: kswartz on Jun 20, 2009 1:56 AM

  • Creating tabs for a single SQL report type region

    I would like to find a way to use tabs in a single SQL report type region. The problem I have is that there are too many columns to be displayed so the report looks very cluttered. I would like to find a way to assign say columns 1 - 5 to tab 1, 6-10 to tab 2 etc so the user can find the columns they need by simply clicking on the various tabs without having to execute the query again.
    I have looked at JQuery tabs but that seems to only be applicable to more or less unrelated regions. I tried to create different regions using the same query with different columns and that kind of works, but the regions don't stay in sync if say the user change the order for column 2 in tab 1, when they click on tab 2 everything displays in a different order.
    Another wrinkle is that this is an updatable report so some of the columns are updatable.
    I also looked at the hide / display column solution which is described in a few threads and that may also sort of work, but it is also not quite what I am looking for.
    Any help is greatly appreciated

    Does anybody know if this can be accomplished using APEX? What I am really looking for is very similar to an old fashioned client / server screen developed using say Oracle Forms. Consider an order line screen where say columns line number, SKU and SKU description is to the left of the tabs so these columns are visible no matter which tab is active. Then the first tab has say pricing information including UOM, quantity, list price, unit selling price, price list. The next tab has say customer information including customer number, name, bill to and ship to addresses. the next tab has say shipping information with say the warehouse, shipping instructions and shipping method.

  • SQL Query report region that only queries on first load

    Hello all,
    Is there any way in which you can prevent a SQL Query report region from quering data after every refresh?
    I would like to make a report that queries on the first load, but then I would like to change the individual values, and reload to show the change, but every time I reload the page the columns are queried and the original values are displayed once again...
    any ideas?
    -Mux

    Chet,
    I created a header process to create the HTMLDB_COLLECTION. It is something like:
    HTMLDB_COLLECTION.CREATE_COLLECTION_FROM_QUERY(
    p_collection_name => 'Course_Data',
    p_query => 'SELECT DISTINCT COURSE_ID, HTMLDB_ITEM.CHECKBOX(14,COURSE_ID) as "checker", TITLE, SUBJECT, COURSE_NUMB, SECTION, ENROLLED, null as "temp_term", null as "temp_title", null as "temp_crse_id", null as "temp_subj", null as "temp_crse_numb", null as "temp_sect", FROM DB_TBL_A, DB_TBL_B, DB_TBL_C, DB_TBL_D, DB_TBL_E, DB_TBL_F WHERE ...');
    The names were changed, for obvious reasons.
    I then created an SQL Report Region to see if it would work. The SQL is:
    SELECT c001, c002, c003
    FROM htmldb_collections
    WHERE collection_name = 'COURSE_DATA'
    When I run the page it says:
    ORA-20104: create_collection_from_query Error:ORA-20104: create_collection_from_query ExecErr:ORA-01008: not all variables bound
    Any idea why this is happening?
    I'm new to HTMLDB_COLLECTIONS, so I may be doing something wrong
    -Mux

  • How to display the items in a Report Region

    Is it possiable to have the fields in a report region based on an sql query be display in somthing other than a row? For example if I have a Report Region with four columns it will look something like:
    <Field 1, row 1 value> <Field 2, row 1 value> <Field 3, row 1 value> <Field 4, row 1 value>
    <Field 1, row 2 value> <Field 2, row 2 value> <Field 3, row 2 value> <Field 4, row 2 value>
    <Field 1, row 3 value> <Field 2, row 3 value> <Field 3, row 3 value> <Field 4, row 3 value>
    etc
    Is it possiable to tell ApEx to display the Report Region like:
    <Field 1, row 1 value> <Field 2, row 1 value>
    <Field 3, row 1 value> <Field 4, row 1 value>
    <Field 1, row 2 value> <Field 2, row 2 value>
    <Field 3, row 2 value> <Field 4, row 2 value>
    <Field 1, row 3 value> <Field 2, row 3 value>
    <Field 3, row 3 value> <Field 4, row 3 value>
    etc
    Maybe there is a nother way to do this that uses somthing other than an sql based report region. Thanks very much for the help.

    This can be done using a SQL query report region with a [custom report template|http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/themes.htm#sthref1744].
    Unfortunately the documentation is not particularly helpful on this topic, and as use cases tend to be very specific, reusable solutions are rarely shared in the community ("custom" reports after all...) See [this thread|http://forums.oracle.com/forums/thread.jspa?messageID=1569996] for a good discussion of the technique, with a link to an example on apex.oracle.com.
    A response to [another recent thread|http://forums.oracle.com/forums/thread.jspa?threadID=1012690] showed another example on page 1 of the [Online Store demo app|http://www.oracle.com/technology/products/database/application_express/packaged_apps/packaged_apps.html#STORE], which you can download, install and examine. This uses a custom report template in conjunction with the report HTML Expression feature.
    (I'm not totally clear on the display you're after: it might help to repost it using some example data rather than the abstract <Field 2, row 1 value> approach. Wrap the sample in \...\ tags to get fixed width characters that can be made to align, if that will help.)

  • 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.

  • 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

Maybe you are looking for