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

Similar Messages

  • 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

  • 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

  • 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

  • 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

  • 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

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

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

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

  • Report Template, Column Template, Column Template Condition

    I have a template, Standard Revenue from Standard, I have cloned for a Classic report.
    Application ###>Shared Componets>Templates>Edit Report Template
    Column Template 1 looks like:
    <td#ALIGNMENT# headers="#COLUMN_HEADER_NAME#" class="t1data_revenue">#COLUMN_VALUE#</td>
    I have set Column Template 1 Condition to:
    "Use based on PL/SQL expresiion"
    I have tried several expression in "Column Template 1 Expression" - last one is:
    case
    when #COLNUM# <= 2 then false
    when #COLUMN_VALUE# < 0 then true
    else false
    end case;
    I am trying to use the value in "Column Template 2" when to value of the #COLUMN_VALUE# < 0
    where "Column Template 2" is :
    <td#ALIGNMENT# headers="#COLUMN_HEADER_NAME#" class="t1data_revenue_negative">#COLUMN_VALUE#</td>
    I get the following error when I run the page:
    ORA-01403: no data found
    and
    ERR-1025 Error processing PLSQL expression. case when #COLNUM# <= 2 then false when #COLUMN_VALUE# < 0 then true else false end case;
    Any help will be appreciated.
    thank you,
    jwm

    Hi,
    That's actually easier. See: [http://apex.oracle.com/pls/otn/f?p=267:60]
    The SQL for both reports is:
    SELECT EMPNO, ENAME, NVL(SAL,0) SAL, NVL(COMM,0) COMM
    FROM EMP
    ORDER BY EMPNOThe SAL and COMM columns have been formatted using:
    999G999G999G999G990D00For the Row Template, the Row Template 1 setting contains an empty space (you have to have something in there otherwise Apex adds back in a default row containing five cells!). The condition for this is:
    TO_NUMBER('#COMM#','999G999G999G999G990D00') < 100The template will see the data as a string, so we use the same number format to convert that string back into a number and compare this to 100. If we didn't use formatting on the numbers and we are sure that every row contained a number (hence the use of NVL()), then you could use:
    #COMM# < 100Row Template 2 contains the format for the rows that need displaying:
    &lt;tr&gt;
    &lt;td class="t18Data"&gt;#1#&lt;/td&gt;
    &lt;td class="t18Data"&gt;#2#&lt;/td&gt;
    &lt;td class="t18Data" style="text-align:right"&gt;#3#&lt;/td&gt;
    &lt;td class="t18Data" style="text-align:right"&gt;#4#&lt;/td&gt;
    &lt;/tr&gt;and is unconditional.
    The only other settings on the Row Template are the Before Rows:
    &lt;table class="t18Standard" style="border-collapse:collapse; border:1px solid black;"&gt;
    &lt;tr&gt;
      &lt;th class="t18ReportHeader"&gt;Empno&lt;/th&gt;
      &lt;th class="t18ReportHeader"&gt;Ename&lt;/th&gt;
      &lt;th class="t18ReportHeader" style="text-align:right"&gt;Sal&lt;/th&gt;
      &lt;th class="t18ReportHeader" style="text-align:right"&gt;Comm&lt;/th&gt;
    &lt;/tr&gt;and After Rows:
    &lt;/table&gt;Of course, you will note that the record counters at the bottom still show the number of records in both reports - as the SQL still outputs the same data, this doesn't change.
    Andy

  • Question on changing the report template to display the images

    I am trying to change the report template so that each table cell will display an image and a checkbox for the image. The column templatet for the new report template is like this:
    <td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t17data">
    <table>
    <tr height="90%"><td>
    <img src= "&F101_GET_THUMB.#COLUMN_VALUE#" onmouseover="return onmouseover_img('#COLUMN_VALUE#');">
    </td></tr>
    <tr height="10%"><td align="center" valign="bottom">
    <input type="checkbox" name="f01" value="#COLUMN_VALUE#"/>
    </td></tr>
    </table>
    </td>
    My questions are:
    1. If the #COLUMN_VALUE# is null, the table cell will display a broken image icon and a checkbox. How could I avoid this? I could add condition to this template, such as when #COLUMN_VALUE# is not null, but how to refer to the value of #COLUMN_VALUE# in pl/sql?
    2. I want to always put the checkbox at the center bottom, but no matter what I set "align='center' valign='bottom', it is always close to the image. Since the image sizes are different, the appearance of the checkbox are just up and down. How to fix this?
    Thanks,
    Fengting

    hello,
    at designtime the elements from the template are physically
    imported into the report. the only way of re-applying a template
    is to use the wizard, which will re-default the layout.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

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

Maybe you are looking for

  • My ipod has the sad face

    well my ipod got int the washing machine and anyway it was all messed up the screen was all foggy and wet, but now the screen looks normal and all and now the sad face won't go away. And i've tried putting it into disk mode like they say to but it wo

  • Insert timestamp into a Date field.

    Hi anyone knows if I insert a timestamp into a date field, will it sort according to the date field if I use an sql statement to sort the data?

  • While accessing Integration Directory (No authorization for this action)

    Hi, I am getting below error, while accessing  Integration Directory it is showing (No authorization for this action I had provided necessary authorization to XI* users & j2ee_guest, j2ee_admin. below error is in application.log #1.5#0019BB24F5460065

  • Loading my library on a new computer

    Hopefully this is a simple question, but I am not very tech minded and can't figure it out. I bought a new laptop, and before setting it up "tried" to save my songs from the old laptop onto an external drive. Turns out its only an itunes shortcut tha

  • Premiere crashes while opening project

    Hello Adobe Premiere community, My project (which I was about to picture-lock) cannot be opened. After opening Adobe Premiere (or simply double-clicking on the project icon) the normal loading bar appears: The loading speed is as fast as it was previ