Conditionally display row report template.

Hi
I have a report template based on a Named Column(row template). Everything is working perfectly except I am trying to hide a section on the report if the value is null.
In Row Template 1 I have the following
<table width="100%">
<tr>
<td>#BLOB_CONTENT#<div class="imagecommentsheader">#COMMENTS#</div></td>
</tr>
</table> I have placed a condition on this based on PL/SQL expression and have the following:
#COMMENTS# is not nullIn row template 2 which should display everything but the comments I have the following:
<table width="100%">
<tr>
<td>#BLOB_CONTENT#</td>
</tr>
</table>I have also set a condition on this based on PL/SQL expresion and have the following in the expression:
#COMMENTS# is nullbut when I load the page I get the following error:
ORA-06550: line 1, column 35: PLS-00103: Encountered the symbol "IS" when expecting one of the following: ( ) - + case mod new not null others table avg count current exists max min prior sql stddev sum variance execute multiset the both leading trailing forall merge year month DAY_ hour minute second timezone_hour timezone_minute timezone_region timezone_abbr time timestamp interval date
Error ERR-1025 Error processing PLSQL expression. is not null
Where can I be going wrong?
Thanks you

Hi,
If I remember correctly, it was the nulls that caused me problems initially as well.
I ended up thinking of the condition as being what would need to go in:
CASE WHEN ...condition... THENbut also that it could only be fairly simple (you couldn't call functions, for example) as all it could deal with was column values.
Andy

Similar Messages

  • Conditional Display in Report Template

    Hello!
    This is a BI Publisher / Apex question but I'm not sure which forum my question should fall under...thought I'd try this one first. Let me know if I guessed wrong. :)
    I have created a report template (Word) and a report query in Apex. Everything works great (meaning the data is displayed as it should), but I can't figure out how to display a header/footer based on a user's response. On my search form, the user selects Yes or No if they want/don't want a header/footer printed on the report. The header/footer is predefined in the main database table, but it's not a field in my report query. How do I incorporate this into my template? It's been a while since I created a template in Apex but I don't think I've come across this issue before.
    Any ideas?
    Thank you,
    Tammy

    After a week off, I'm back to tackling this issue. I successfully created a sub-template and it works, except when I try to call the report via APEX. I've searched the forums and came across the "disable external references" set to False, but I'm using the standalone version of BI Publisher so I don't have that option. Is there a similar approach via the standalone version?
    Thank you!
    Edited by: 73pixieGirl on Feb 15, 2010 9:15 AM

  • Conditional Display of Report Columns

    I'm trying to hide a vertical list column, but it is either permanently off or permanently on. Any ideas!
    For example:-
    Display Department name if not null

    now i get why you're not liking the report templates approach to this issue. to be honest, my other suggestion on that "Referencing Report Columns" thread might probably be okay here. assuming you're looking up your one detail row with a primary key value, doing the extra query can't be too expensive. if you don't want to go that route (though i'm likin' it, the more i think about it) or the templates one, you might consider either of these two angles:
    1) code the detail page's region as a plsql anonymous block that selectively shows what it needs to show.
    2) code the appropriate nvl's or case statements into your detail page's report region and have that select statement select out most of your html formatting for you.
    i don't particularly like either of the two above suggestions, but now you at least have them. i think i'd run with the solution where you select the detail row twice, but please don't quote me on that.
    regards,
    raj

  • 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

  • Conditional Display on Report error

    hey,
    can anyone suggest a way/workaround to catch a report error. when error occures, i'd like to display another report, just below, without errorneus columns ( Oracle Text score(1) this time )
    report error:
    ORA-20000: Oracle Text error:
    DRG-50901: text query parser syntax error on line 1, column 1
    how could i make this error conditional?
    br,
    Simon

    Hi Simon - I have the same issue. Did you find a solution?
    thanks,
    Matt

  • Conditional display of report

    hi
    i have a batch table (batch_id,batch_name,batch_type..)
    i have to pass batch_name and batch_type as a parameter so i have 2 item on a page
    batch_name :-select list
    batch_type :-select list with submit and it values select from the values of batch_name
    create button :- when i hit the create buttons it will show me 2 report in the same page based on the latest batch_id
    so i have to apply conditional display on the reports
    what would be the condition for the conditional display so that i will get to reports in the same page
    dependency between report is batch_id
    Regards
    Amu

    Hi Tobias,
    i have interactive report.
    the content of report is displayed based on the input values(from select lists),
    1)select list -p_cust
    2)select list-p_switch(the values of the list select from the values of p_cust i.e select d r from switch_t where cust_name=:p_cust)
    requirement like this
    1)First i have to select a customer
    2)when i select a values (switch) from the switch select list -the result of the report for a paticular switch .
    e;g-p_cust='ABC' and p_switch='XYX'
    the output of the report would be the all records for 'ABC' customer for a Paticular Switch that is-'XYZ'
    3) again when i select a value "All_switches" from the switch select list it should returns all the records for all switches
    Regards
    Amu

  • Conditional Display in reports doesnot seems to work

    hi ,
    I tried to set conditinal display in a report to a pl/sql expression and it didnt work.
    in order to check if conditinal display works I tried to set it to never, and it is still displayed . I'm using Apex 2.0
    Please help
    sagsag

    New Info.
    The report is based on my own report template and using links
    a basic report does work with conditinal displau
    sagsag

  • HTML Display without Report Templates

    Hi all
    I am saving html page (with all data and formats) in a table. On next step I will query this table and will display this column and will disply it on the region. But I dont want to use HTMLDB report templates. Because I want to control the formatting (like color change, background color, fonts). Is there some way to gain control on this ?
    Here is my homework. While creating the region, I tried PL/SQL and Reports. Is there some option where I can override everything with my html implementation (which is coming from the table). I tried HTML, but there you cant query the table.
    Any help will be highly appreciated.
    prashant bhandari

    Hello,
    You can't you will have to adjust your xslt to deal with the CDATA sections.
    Carl

  • Conditional display of report row

    Hi All,
    I've a report form and have a LOV for a column. Based on the data selected in the LOV I need to populate some more rows to that report.
    It is basically like a survey page where depending on the answer provided by the user, sub suvery question needs to be populated. For example if I select "Married" for maritial status another question should be populated asking for Spouse Name. All the queries are stored in a same table with Parent question ID to link Child question to Parent Question.
    Any clue on how to do this.
    Thanks in advance
    Prasanth

    a. It is a report on table and one column is editable with a LOVThat is Tabular Form or Updatable report. Implies there is a ApplyMRU/ApplyMRD process to perform the update.
    >
    b. APEX 4.1
    >
    The solution will depend on your database design. You may need to review in the light of the page design you will do.
    I don't think I will get into the code for this as it will be fairly nifty and will require a study of your database design.
    At a high level:
    a. Create a table(s) for keeping your questions, say Questions.
    b. Next you need to decide how you want to store your "rules" for selecting questions based on prior responses. Rules may be built into the database design or external processing based on column(s) in the question rows.
    c. Create a table for Responses. Populate it with the mandatory questions.
    d. Base your Tabular form on the Responses table
    e. Each time a use makes a selection in a row's LoV submit the page to loop back on to itself.
    f. In OnSubmit processing, after the Responses table has been updated, add the relevant rows from your Questions table to the Responses table using your rules in a Page Process.
    h. When the Form is displayed again the new questions will be displayed as the corresponding rows have been inserted into the Responses table in the process referred to above.
    Of course, you will need to write some more code for situations where a user goes back and changes the Lov of a prior question that affects related questions....
    Cheers,

  • Value not displaying in report template

    I am attempting to use a template for the first time and am having difficulty when using the following template to format the output of an ApEx 3 report.
    All values in the template come from the main table but TRADE comes from a joined table. The output from the report correctly displays the TRADE when run on its own but the value of #TRADE# fails to display when I use the template. Is there something I am missing or should this work?
    <tr><td colspan="6"><strong> </strong></td></tr>
    <tr><td><strong>Date</strong> #CALLDATE#</td><td>&nbsp&nbsp&nbsp&nbsp <strong>Client</strong> #CLIENT_NAME#</td>
    <td>&nbsp&nbsp&nbsp&nbsp <strong>JOB</strong> #JOB_DESCRIPTION#</td> <td> &nbsp&nbsp&nbsp&nbsp <strong>Trade</strong> #TRADE#</td>
    <td> &nbsp&nbsp&nbsp&nbsp <strong>Address</strong> #ADDRESS# #TOWN#</td> </tr>
    <tr><td colspan="6"><strong>___________________________________________________________________________________________________________________________________________________________________________________

    Sandy,
    It's the first time I have used apex.oracle.com as well so I hope I've done this right.
    You did a superb job, thanks a lot. It allowed us to debug the problem, a rather difficult one to isolate as it turned out.
    The problem occurs when your report columns' "query column ID" attributes don't match the "column display sequence" attributes. This is apt to happen in queries that use joins and is not a problem in itself. But if you have this situation and also use a named column row template in which you reference column aliases in #ALIAS# format, the wrong value can get substituted. That's what happened in your case.
    The workaround until we can fix this is to replace the problem alias reference, e.g., #TRADE# with #13# in the template. I got the value 13 by exporting the page and finding this:wwv_flow_api.create_report_columns (
      p_id=> 7496949738101935544 + wwv_flow_api.g_id_offset,
      p_region_id=> 7496823660512873188 + wwv_flow_api.g_id_offset,
      p_flow_id=> wwv_flow.g_flow_id,
      p_query_column_id=> 13,
      p_form_element_id=> null,
      p_column_alias=> 'TRADE',
      ...You'll need to keep track of this template change in case you rearrange the order of the report columns. We expect to fix this bug in the 3.1 release (no announced date yet).
    Thanks again.
    Scott

  • Conditional display in Reports

    Hi,
    Does anyone know of a way to make a icon used to implement a link to another page appear for some rows of a report but not others? The condition for display could be based on the value of one of the columns in the report.
    Niall

    Right now, you have to put your logic into your SQL for the report. You can use CASE or DECODE to determine what should (or should not) be displayed for a given column.

  • Access to customizing default: report templates

    I seem to remember far back in the corners of my memory, someone here on the forum mentioning that although we didn't have access at the time (probably back at HTMLDB 2.0) to customize the default report templates, that there were plans to make this an option in a future version of Apex. Does anyone have any idea if this is something that is being planned, or better yet, available today?
    If you're not sure what I'm talking about I'm referring to the field that says 'Report Template' in the 'Layout and Pagination' section of the 'Report Attributes' page in the application builder.
    The problem I'm having is that I'm using the 'default: vertical report, look 2 (show null columns)' report template and I've got some long column headings that I want to include a line break between each word of the heading, so they're stacked vertical instead of wide horizontally. I've add HTML break tags to the headings but they're disappearing when the page is rendered.
    I've made sure to set the 'Strip HTML' setting to 'No', but whether it's set to yes or no doesn't matter, the headings display the same either way.
    BTW, doing the same thing in a template based multi-row report seems to work fine. However, trying to use/apply the 'Value Attribute Pairs' report template yields the same result as the default vertical look template.
    So I have 2 questions:
    1) anyone know how I can make these heading words stack up vertically, one word to a line?
    2) are we going to get access to customize the default report templates?
    Earl

    Hello,
    1) anyone know how I can make these heading wordsstack up vertically, one word to a line?
    Probably the best way to do this is to just hard code
    a &lt;br /&gt; between your words.That's exactly what I'm doing (and what I said in my original post), however those breaks are disappearing during page rendering when I choose the report templates I mentioned.
    I don't understand why this technique works in the multi-row report templates and not in these vertically oriented value/attribute report layouts.
    2) are we going to get access to customize thedefault report templates?
    No, you should just use a regular theme based
    template, the default report templates are there for
    backwards compatibility and well basically for people
    that don't care about the UI. Since your at the point
    it seems you do care about UI the proper thing to do
    is to move to a standard report template that you
    have full control over.Fair enough. I'll look into that, but I think there's still an open question here as to why the HTML breaks aren't being returned in the page markup for these report layouts.
    Regards,
    CarlEarl

  • Need help with conditional display

    I found a older thread (704012) that explains how to conditionally display a link using style.  Which is what I want to do.  The part I'm having trouble with is that part of the instructions say to put
    class="row_has_values_#HAS_VALUES#"
    in the Link Attributes which I have done.  I also have a column in the report called HAS_VALUES and I'm properly populating it in my select.  I know because I left it displayed while I'm testing.  I can run the report and I have Y's and N's showing up in that column but the conditional part does not work.  When I look at the page source (below) I see that in the html the #HAS_VALUES# has not been replaced by the actual Y or N.  I think that's where I'm having trouble?  I think it might work if there was a Y or N in that but I don't understand why that didn't happen.
    <tr class="odd"><td headers="LINK"><a href="f?p=125:3:12628966088981::NO::P3_PROGRAM_KEY:2" class="row_has_values_#HAS_VALUES#"><img src="/i/e2.gif"  border="0"></a></td><td  align="left"

    LawrenceJ wrote:
    I've continued to snoop around and see lots of posts on conditional display in reports.  Common desire I guess.  I saw some stuff that I interpreted to suggest that what I'm trying to do may not work in interactive reports, only in classic reports.  Does that sound familiar?
    That would certainly apply to anything template-related. However there have been enhancements to IRs (like adding HTML Expressions) that might supersede information in older posts. If you provide a link to the sources you've found and the APEX version you're using someone will be able to confirm whether that information is relevant.
    Many other posts on doing things conditionally in reports seemed to lean towards "selecting" the html based on data values and then just letting that get put in the report column.  That looks promising but sure is a bit ugly.  I've very little apex experience but lots of mod pl/sql and that sort of solution was pretty common when I did stuff with it.  I saw a little suggesting using templates as a solution but I'll confess to not understanding it at all.
    As I pointed out in the original thread, if the conditional display of the link is in any way security related then CSS or JS/jQuery methods are not acceptable. If the user is not supposed to be able to click the link or see any data contained in it, then you have to use a method that ensures that the link element never reaches the browser.
    Hard-coding the link HTML in the report query is the common approach, but is as you say a bit ugly. Using a custom report template (my favourite APEX subject) enables clean separation of the report query, conditional logic and HTML structure. If you know HTML then you're advised to get familiar with using templates in APEX. You'll find this a major advance on the PL/SQL web toolkit. What is it that you're not understanding about using templates?

  • Conditional display in the row template!

    Hi,
    I created a report template and my report shows like this:
    col1 col2 col3 col4 col5
    a 4 5 6 7
    b 4 8 7 2
    Total 8 13 13 9
    I am able to display all the above, but the column name should be "Total" at the end of the report when i am displaying the totals. totals also coming from the database, so i am not calculating here.
    Shall i put any condition saying that if the col1 is null then col1 should display "Total".
    Please suggest.
    Thank you.

    manyam16 wrote:
    Actually I used the row template conditions to solve that. But I have added one more count in the database package, that column is coming into the report attributes, not showing in the report. any ideas?
    I am using like this #COL50#where are you using this? if you are using this in column conditions, it will not work
    thank you,

  • Report Template -  NULL in Row Template Condition

    I just found a workaround, but,
    in a report template, in a Row Template # Condition, based on a PL/SQL expression, the condition always fails if/when #COLUMN_VALUE# was NULL.
    I worked around this with a NVL in the query - but, is there a better way?
    I want the column highlighted when the value is null - to point out where values need to be entered - i.e. when the record needs to be updated.
    THanks - Karen

    Ok, I have since found out that the setting to make a report template
    available in the Based on > Visualization templates is in the
    'package.xml' file for each report. The value that needs to be changed
    is <IsQueryParameterized>0</IsQueryParameterized> and change the 0 to 1.
    kmcooke1
    kmcooke1's Profile: https://forums.netiq.com/member.php?userid=5806
    View this thread: https://forums.netiq.com/showthread.php?t=49091

Maybe you are looking for

  • Could not open key: HKEY_LOCAL_MACHINE error. Please help!

    Every time I try to install QuickTime/iTunes, this error message pops up: Could not open key: HKEYLOCALMACHINE\Software\Classes\Quicktime.Quicktime\CLSID. Verify that you have sufficient access to that key, or contact your support personnel. I have n

  • Ppc glibc: problem with kernel-headers dependency

    I wasn't sure where to post this... After attempting to follow the tutorial Wii Tutorial here: http://wiki.archlinux.org/index.php/Wii_Tutorial I discovered that the kernel-headers dependency of glibc is set to the wrong version. The dependency is ke

  • JDeveloper stack trace - what's happened to JDev overnight?

    Hi, It's one of those days. JDeveloper worked fine when I left work last night, load it up this morning and I get this stack trace: java.lang.StackOverflowError      at java.util.HashMap.get(HashMap.java:320)      at oracle.ide.net.URLFileSystem.find

  • Short Dump - Transaction TBB1 - Insert new item in table FLQITEMFI

    Dear All, I have a problem with transation code TBB1. The short dump happens when the new item has created into the table FLQITEMFI. A RAISE statement in the program "SAPLFLQPO" raised the exception condition "INS_ERROR_IT". Since the exception was n

  • How to get and display image file through servlet

    If I've got a jpg file on the server.. How can I use servlet to return that image via the following calling method /displayfile?filename=image.jpg the image.jpg in the server will return I know that I need to set the content type to image/jpeg after