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

Similar Messages

  • How can I modify column width in a spreadsheet report without using an Excel template

    I currently use the LabVIEW Report Generation toolkit in LabVIEW 2011SP1 to create simple spreadsheet reports that I can build/print without having Microsoft Office products installed.  I really like being able to do this, and it allows me to generate nice on-demand data reports - I'm also not tied to having Office installed on the system I'm using, so this works on just about any test fixture I can install the software on.  
    I recently have a requirement that I must have variable-length columns in my report.  I currently use the VI "Append Text Table to Report" in order to create a text table, but the column width requirement is that all columns must be equal width UNLESS I use an Excel Template file to define my column widths.  
    My questions are:
    Is it possible to create a text table and define per-column widths without using an Excel Template?  If so, how?  My report mainly has a lot of small numerical values for the columns, but some columns contain system names or status messages - I really hate the longer text blocks wrapping and taking up so much real-estate when if I could control the column widths I can get all my data on a single line.
    I'll admit I haven't tried this myself yet, but if I use an Excel Template will that require me to have Excel installed on the PC in order to print/generate reports?
    Is there a recommended way (with an example) of generating a text table in a report with or without using the "Append Text Table to Report" VI that allows me to have custom column widths that doesn't require me to manually build a custom print page?  If I do have to create a custom print page, what would be the most straightforward approach?
    Thanks!
    -Danny

    Sure, I'll provide a pared down example that demonstrates my use-case:
    I have a control to the VI that takes in a 2D array of strings representing the data I want printed in a table.  I am generating a standard report, adding a table to the report, and printing it.  The first VI is "New Report.vi", the second VI is "Append Table to Report.vi", and the third is "Print Report.vi", all found standard in the Report Generation palette.
    Note that the "Append Table to Report.vi" has an input parameter "Column Width" with a default value of (1).  This input parameter is a single input parameter, which defines the column widths of ALL the columns in my table - hence, with the VI the way it is, all my columns will be 1 inch wide.  
    I find myself needing to be able to define per-column widths, not just a single global column width parameter.  
    The only way I have found to do this is by using an Excel template file.  The "New Report.vi" takes in a "template" parameter, and if used, the report generation toolkit can be set to ignore the "Column Width" input parameter on the "Append Table to Report.vi" by setting the width value to -1.  Instead it will launch Excel, open the template file provided, build the table using the template, will close Excel, and will attach the generated table to the report.  However, I have a strict requirement that Microsoft Office NOT be required to be installed on the computer.  
    So, without using Excel, is there a way to generate a table in a report and define the width of each column individually?
    -Danny

  • First group heading below displays below column headings using Template 23 Classic Report using Repeat Headings on Break

    Hello,
    I am migrating an application from APEX 3 to APEX 4.2 on one thing I notice with the classic reports when I bring them into Template 23 is that the first break section has the break row display below the column headers for that section while the remaining rows correctly have it display above the headers on subsequent group sections.
    When I look a the code in firebug I can seen that the all tables but the first, the break row is being included as the last row of the previous table so I can see how this would not work for the break since.
    I have tow questions.
    1. Is this really intentional because it doesn't seem  terribly elegant and my users zeroed in on it right away as a perceived bug.
    2. Is there a reasonable work around that still uses Repeat Headings on Break? I have multiple reports on the same page in places so changing over to interactive reports is not a silver bullet for me in this case.
    Example of issue can be seen at apex.oracle.com at  Home
    Thanks,
    Brad

    Roadling wrote:
    Hello,
    I am migrating an application from APEX 3 to APEX 4.2 on one thing I notice with the classic reports when I bring them into Template 23 is that the first break section has the break row display below the column headers for that section while the remaining rows correctly have it display above the headers on subsequent group sections.
    1. Is this really intentional because it doesn't seem  terribly elegant and my users zeroed in on it right away as a perceived bug.
    The Standard report template definition in theme 23 contains thead and tbody elements:
    Before Column Heading
    <thead>
    Column Heading Template
    <th #ALIGNMENT# id="#COLUMN_HEADER_NAME#">#COLUMN_HEADER#</th>
    After Column Heading
    </thead>
    <tbody>
    After Rows
    </tbody>
    </table>
    </td>
    </tr>
    </tbody>
    <tbody class="uReportPagination">
    #PAGINATION#
    </tbody>
    </table>
    <div class="uReportDownloadLinks">#EXTERNAL_LINK##CSV_LINK#</div>
    This is intentional, following best practice for marking up HTML tables. What is not intended is the problem that arises when this template is used with the Repeat Headings on Break break formatting option. The repeated headings result in the table consisting of tag soup containing multiple incorrectly constructed tbody and thead elements, which is invalid.
    2. Is there a reasonable work around that still uses Repeat Headings on Break? I have multiple reports on the same page in places so changing over to interactive reports is not a silver bullet for me in this case.
    Create a copy of the Standard report template as Standard (break formatting) for use with break reports, remove the thead and tbody tags from the template definitions, and change the break reports to use the new template. (Or, if you primarily have break reports using the Standard template, keep the tags in the copy and remove them from the original to minimize the number of reports you have to edit.)
    Personally I'd create a custom row report template for complex break reports in order to be able to have complete control over the structure and presentation.

  • 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

  • Using APEX_APPLICATION_PAGE_RPT_COLS.IS_REQUIRED Column to control Template

    Hi,
    I am using ApEx 4. Theme 17 - Saphire.
    In my tabular forms I want to identify required and not required columns so I can display them differently. Currently I am doing this by appending an img tag to the column name, but this needs to be done for every column - and if we change the name or location of the img we want to use, we have to change every column definition.
    My idea is to use the Conditional Column template capabilties in the 'Standard' Report template. This template allows you to define different templates that are optionally applied based on a PL/SQL Expression.
    To identify if the column is required I have tried looking at the APEX_APPLICATION_PAGE_RPT_COLS view which has an 'IS_REQUIRED' column. This view /column is based on WWV_FLOW_REGION_REPORT_COLUMN.IS_REQUIRED. For every column this is currently set to 'N' and I can see nothing in the Devleopment UI that allows me to define a column as required.
    I did think that it might do something clever when I update validations, but this does not work.
    How can I mark a column as required so the IS_REQUIRED column is updated to 'Y'?
    Thanks,
    Martin

    Hi,
    Ok,
    And what I did test different template affect to whole row.
    I did copy standard report template.
    I did modify new template and add Column Template 1 Condition pl/sql expression
    #SAL# > 2000I did add below to Column Template 2
    &lt;td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t14data" style="background-color:red">#COLUMN_VALUE#&lt;/td> And Column Template 2 Condition pl/sql expression
    #SAL# < 2000Then I did report from query
    SELECT *
    FROM empAnd here is result
    http://apex.oracle.com/pls/apex/f?p=40323:74
    As I can see it is working just same way as in Apex 3
    Regards,
    Jari

  • How to edit the "Oracle Three Column Layout" page template?

    Hello all,
    My question is very simple: how can one edit the Oracle Three Column Layout page template? I tried searching the file system for a file called "threeColumnTemplate.jspx" but I cannot seem to find it. Is it hidden into a jar file of some kind? Or at least can anyone tell me the name of the nice component located in the upper right corner that displays the loading activity?
    Thanks.

    Extract oracle-page-templates.jar with winzip & browse to location oracle/templates
    open the file threeColumnTemplate.jspx using jdeveloper.
    after you open it , you can edit the logo , save the changes & create this jar again or save it to the zip which will automatically update the jar.

  • Formula Columns in Data Template

    Hi,
    Is it posiible to have formula columns in data template apart from summary columns.please suggest.
    Regards

    You can put those formula-logic in sql query.
    summation/avg functions can be used directly in element.

  • Adding columns to existing template layout?

    In the "Contemporary" Template, I would like to modify the Section Text layout in Portrait Mode. I would like to make the text box have 2 columns instead of 1. These options are greyed out, however. How do I go about doing this?
    Many thanks in advance

    You are working a portrait template therefore the column options are  not available.
    Yes, contact will  flow, but its not endless, your text will flow only into the pages it needs.
    You can use a landscape template if it suits your project - and its possible to set it up to use portrait and landscape.
    I am told that  most "words only" books are written in MS Word or similar applications and pasted into inDesign, iBooks etc,. and then re-formatted to suit and the page producing flowing text works really well!

  • Additional Columns in Appraisal Template

    Hi,
    I am currently creating a template similar to MBO in PHAP_CATALOG_PA.
    Can i add additional columns in the template. Is there any configuration step to add additional column and give a column header name. For example: See Below, I require first column to be the list of objevtives, second column appraisee set his goals at the start of the year after having a mutual discussion with his manager. 3rd and 4th cloumns are for Mid year review one for self and other for manager. 5th and 6th columns are for the end of financial year to give the final scores.
    Please note we are on ECC 6 with Latest support pack 61 (But not EHP4)
    Objectives                                 | Goal Setting by | Mid Year Review | Mid Year review | Final Review |Final Review
                                                        Self & Manager   Self                       By Manager         By Self           By Manager
    1. Primary Objectives
    2. Department Objectives
    3. Individual Objectives
    4. Others.
    Regards
    Srinivasa Naidu

    Hi,
    Yes, you can create custom columns through transaction code OOHAP_BASIC.
    Hope this helps.
    Donnie

  • Appraisal - Column Configuration ( Apprisal Template)

    Hello All,
    I am implementing PMS on Ehp4.
    I really want to understand how to do the column configuration. Any tips & Tricks pls share with me.
    I tried to read various materials and help.sap but still i would like to understand the experiences in column configuration.
    Especially i want to understand how the ratings are calculated and taken a average weighting etc.. 
    Hide or un hide of the column between manager and employee etc..
    Pls help me on this...

    >
    Vijay Mohan wrote:
    > Hello All,
    >
    > I am implementing PMS on Ehp4.
    >
    > I really want to understand how to do the column configuration. Any tips & Tricks pls share with me.
    >
    > I tried to read various materials and help.sap but still i would like to understand the experiences in column configuration.
    >
    > Especially i want to understand how the ratings are calculated and taken a average weighting etc.. 
    >
    > Hide or un hide of the column between manager and employee etc..
    >
    > Pls help me on this...
    column config can feel very non-intuitive, since both the config and the way it displays in the new user interface (webdynpro) is all vertical or row driven.
    the better way to thing about the column config, is an "attribute" config for your template.  Any attribute (column) you want to use on the template, must be configured at the template level to make it available lower level criteria groups or criterion. 
    You may for example need to use "objectives" on a criteria group, but you don't want it displayed at the template level, at the template level you may only want the final calculated performace scale.  to make the column available for lower levels, but not displayed, you make sure the "use" is checkmarked, but than you configure no value list, value class, value determination, make sure the value input is "No Entry" and Note = "No note".
    to calculate final appraisal, a simple example could be,
    Template, with 3 Criterion Nodes.  Each criterion node you will have FAPP checkmarked, you can use a qualtative value scale, which will give the user a drop down box during selection.  Value Input = Required or Optional Entry.
    Than at the template level you would have FAPP checkmarked and you would put the BADI "Average (Weighted)" in the value determination column, leave value class / value list blank.  Make sure that Value input = No Entry.  This will calculate the score of the 3 criterion nodes as an average.  Since you selected no value input, the output will be displayed as read-only calculated field.  They can only change calculated score, by rescoring one of the child nodes. 
    hope that is a start for you.
    Edited by: Michael L Pappis on Dec 22, 2010 11:29 PM

  • How to use formula column,placeholder column in data template option

    Hi All,
    Can you some idea on these concept with example.
    Thanks in adv

    >
    formula column,placeholder column
    >
    it's oracle reports terms?
    http://oraclebizint.wordpress.com/2007/08/22/oracle-reports-to-bi-publisher-conversion-utility/
    http://eoracleapps.blogspot.ru/2009/04/how-to-convert-oracle-reports-in-bi.html
    so convert your oracle reports to bi publisher and you'll see mapping for your case

  • Report Time zone in Excel Template

    Hi,
    How can we display the TimeZone that is set in the BI Publisher Preferences. Is there anyway to display this timezone in Excel Template.
    In RTF Template, 'm able to display it using ,
    <?format-date:xdoxslt:sysdate_as_xsdformat();’dd-Mon-yy hh:mi:ss’?>, so whenever I change the Report Time Zone in BI Publisher , the output of RTF Template gets affected correctly.
    But I have to do the same in Excel Template, Is there anyway to achieve this?
    Thanks in advance

    I found a way to display the parameter, but it shows the return value. Is there a way to show the display value as it is when submitting the report? For example i have a LoV as follows:
    select test as display_value, 10 as return_value from dual and it is attached to a parameter. Then i define that parameter in the XDO_METADATA and display it to another sheet - it will display the return_value(TEST) ... Anybody knows how to output the display_value?
    Thanks,
    Alexander.

  • Getting Blank Report if using XSL sub-template in RTF file

    Hi,
    We have requirement that for printing page-break and header-footer info we need to call xsl template in exisiting RTF template
    Verified that if we include call to xsl template then blank report is generating through jdev
    but if we remove call to include xsl template then report is generating successfully
    Please help on this issue

    Put this as the first line in rtf
    The 'import' element children must precede all other element children of an 'stylesheet' element.

  • Translating a report which is using excel template

    Hello,
    We are working on a BI report using excel template. I've checked the report designer's user guide and it says template translation is a feature only supporting RTF and BI publisher layout template.
    I am wondering what is the best practice for translating a report which is using excel template.
    So far I have a alternative which is making all labels in my template dynamically getting values from HCM lookups , but this solution is time consuming.
    Could anybody help here?
    Regards
    Buyun

    Did you try reading sap help files which clearly explains about Managing templates, selecting templates, creating templates, deleting templates.
    [Managing Templates in ALV|http://help.sap.com/saphelp_apo/helpdata/en/d4/a2a138198daa2fe10000009b38f842/content.htm]
    This will provide you a clear picturesque on handling templates in ALV.
    Edited by: K.Manas on Dec 22, 2010 9:13 AM

  • Can I change Gallary template hight by item's condition in Project Siena ?

    Can I change Gallary template hight by item's condition in Project Siena ?
    I want to enlarge item height in Twitter Timeline Gallary at item have media.
    Gallary Layout = Vertical
    Gallary Data = Twitter!Timeline()
    NG : Gallary Template Height is If(IsBlank(ThisItem!entities!media), 150, 200)
    Regards,
    Yoshihiro Kawabata

    You can find the suggestions thread here:
    http://social.technet.microsoft.com/Forums/en-US/2e1f9446-56b2-419a-9c17-7037d2cd6146/from-the-community-overview-of-requested-additional-functionality?forum=projectsiena
    Thor

  • Report Trigger Code in Data Template

    Hello all,
    I've inserted a report trigger into a data template and created the required function in my database. Everything works as expected.
    My question is, is there any way to write the report trigger within the data template? Given the choice, I'd rather have the trigger code embedded within the data template itself rather than existing in a separate package.
    I've found no examples of this, but I just wanted to confirm that it can't be done.
    Thanks.
    Edited by: jasonr on May 17, 2011 7:39 AM

    No,
    The code to be executed by trigger will be a PL/SQL package, and it will reside in DB only.

Maybe you are looking for

  • Indesign: language modules; link to a database

    I would like to create a catalogue in different languages. Is there a tools/function for Indesign to create a module for each language? Is it possible to link an Indesign file to a database?

  • Why does camera icon appear next to slide to unlock bar on my IPod touch?

    why does camera icon appear next to slide to unlock bar on my IPod touch?  It makes a shutter sound when I turn the touch off

  • Work Group Manager Client side setup.

    In Workgroup Manager I have added computers by name and made one big computer group. Users can login on these iMacs, but none of the other settings I apply to this group in WGM save to these clients, e.g. printer settings, login, dock, etc. I'm obvio

  • Open old numbers template

    Hi, I found a template for a budget planer which was created with Numbers '09. No I'd like to open it with the new version of numbers. I get an error message when trying to open the template with Number 3.0: Template is to old. Open with Numbers '09

  • VPN IN

    Sent from my iPhone Begin forwarded message: From: VPN in Touch Support <[email protected]> Date: ٢٢ نوفمبر، ٢٠١٢ ١١:٣٢:٤١ م جرينتش+٠٣:٠٠ To: khalid alghamdi <[email protected]> Subject: Re: [VIT-iPhone][[email protected]] Khali,     This is Tommy ag