Shows the columns having / sum not zero

We have a report that HAV total of twenty columns.

Whenever we run you report (dynamic query) random columns have sum = zero

We want to show only eachtime the columns having the amount greater than zero.

concerning

Jean Marc

Hi John,.

OK - I've tested this here [http://htmldb.oracle.com/pls/otn/f?p=267:43]. The report on the left shows/hides the SAL and COMM columns according to totals. The report on the right shows the complete data. Change the Dept to see this implemented.

There are other methods available, but that's what I did:

The select dept list (item name is P43_DEPTNO) is simply a list of departments and a NULL option that returns 0 (zero).

This report is a SQL statement of:

SELECT EMPNO, ENAME, SAL, COMM
FROM EMP
WHERE :P43_DEPTNO = 0 OR :P43_DEPTNO = DEPTNO
ORDER BY ENAME

I have a region in the position after the header that uses "No. Template" and contains two pieces of Hidden - P43_SAL and P43_COMM.

I have a calculation of element, running "Before Header", which sets P43_DEPTNO to 0 if it is NULL.

I have a PL/SQL unconditional process, "to charge - before Header", which has the following code to the currently running process:

DECLARE
 vSAL NUMBER;
 vCOMM NUMBER;
BEGIN
 SELECT NVL(SUM(SAL),0), NVL(SUM(COMM),0)
 INTO vSAL, vCOMM
 FROM EMP
 WHERE :P43_DEPTNO = 0 OR :P43_DEPTNO = DEPTNO;
 :P43_SAL := vSAL;
 :P43_COMM := vCOMM;
END;

And, finally, on the SAL column in the report, I put the Condition Type for 'value of element in the Expression 1. = zero' and the Expression 1 is: P43_SAL. And even on the COMM, but the Expression 1 column: P43_COMM

When the page is loaded, the process is executed and SAL and COMM totals are calculated and inserted in P43_SAL and P43_COMM. The report runs and conditions check the values of these two hidden items - if a is not null, then the column is displayed.

Andy

Tags: Database

Similar Questions

  • It shows the logo, but is not on even a while it does, but for only 2 seconds then shows new logo

    It shows the logo, but is not on even a while it does, but for only 2 seconds then shows new logo

    Hello

    Follow the instructions here, including contacting Apple Support or your Genius Bar reservation if necessary:

    If your iPhone, iPad or iPod touch won't turn on - Apple Support

  • update date and time for 3.6 numbers does not show the time and does not automatically update the date

    The 'update date and time"for numbers of 3.6 does not show the time and does not automatically update the date.  What should I do?  Thank you.

    Hi david,

    where do you find ' update of the date and time.

    Quinn

  • I have W XP, SP3. Suddenly, Adobe reader showed the error: Acrobat could not load the DLL base.

    I have W XP, SP3. Suddenly, Adobe reader showed the error: Acrobat could not load the DLL base. Have Adobe reader X (10.0.1) who refuses to be carried away. Other than a drive X (10.1.0) has been reinstalled. Also have Acrobat reader 5.0 is installed from a CD of the Canon scanner slide. The error remains. If anyone can help. Leif Stg

    Hi Leif,

    Where do you get this error message?

    I suggest you to follow the steps and check if it helps.

    Method 1: Uninstall all the instance of Adobe reader and Acrobat reader and install the latest version of one of the drive and check if it helps.

    http://get.Adobe.com/reader/?promoid=DINRS

    Method 2: If the problem persists, perform a system restore and check if that helps.

    How to restore Windows XP to a previous state

  • Hello, I can not open my adobe because its shows the message "you are not connected to the internet, but I am online.

    Hello, I can not open my adobe because its shows the message "you are not connected to the internet, but I am online.

    Check your hosts file.

    help for that and other adobe.com sure common connection problems read, http://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html

  • The column that does not match when comparing two records

    Hi all

    We try to compare two tables and find the differences. So if two records (1 of each table) have same PK but not always matching because of some columns, then we would display this columnname. For example:

    Table 1

    PK Parent Child Property1 Property2
    1AA1P1PR1
    2BB1P2oraPR2
    3CC1P3SRP

    Table 2

    PK Parent Child Property1 Property2
    1AA1P1PR1
    2BB1P2PR2
    3CC1P3PR4

    In the above example when I compare 2 tables all matches except Property2 online n ° 3. Thus, we would like to get an output like:

    PK Column_Mismatch
    3Property2 (this must be the name of the column that does not match)

    Appreciate the help.

    Thank you

    Andy

    Hi, Andy.

    Andy1484 wrote:

    Hi all

    We try to compare two tables and find the differences. So if two records (1 of each table) have same PK but not always matching because of some columns, then we would display this columnname. For example:

    Table 1

    PK Parent Child Property1 Property2
    1 A A1 P1 PR1
    2 B B1 P2 oraPR2
    3 C C1 P3 PR3

    Table 2

    PK Parent Child Property1 Property2
    1 A A1 P1 PR1
    2 B B1 P2 PR2
    3 C C1 P3 PR4

    In the above example when I compare 2 tables all matches except Property2 online n ° 3. Thus, we would like to get an output like:

    PK Column_Mismatch
    3 Property2 (this must be the name of the column that does not match)

    Appreciate the help.

    Thank you

    Andy

    Why you don't want no matter what exit for pk = 2?  Property2 does not correspond either to pk.

    What happens if the 2 columns (or more) do not match?  The following query would produce a list delimited, such as ' parents; PROPERTY2 '.

    WITH got_mismatch AS

    (

    SELECT pk

    , CASE WHEN t1.parent <> t2.parent THEN '; PARENT' END

    || CASE WHEN t1.child <> t2.child THEN '; CHILD ' END

    || CASE WHEN t1.properry1 <> t2.property1 THEN '; PROPERTY1 ' END

    || CASE WHEN t1.properry2 <> t2.property2 THEN '; PROPERTY2 ' END

    AS the offset

    FROM table_1 t1

    JOIN table_2 t2 ON t2.pk = t1.pk

    )

    SELECT pk

    , SUBSTR (incompatibility, 3) AS column_mismatch

    OF got_mismatch

    WHERE mismatch IS NOT NULL

    ;

    If you would care to post CREATE TABLE and INSERT statements for your sample data, and then I could test this.

    The query above does not count NULL values as inadequate.  If you want that, the same basic approach will work, but you can use DECODE instead of <> to compare columns.

    What happens if a pk exist in a table, but not the other?  You want an outer join, where I used an inner join above.

  • The column span does not work for me?

    Hey guys

    I don't know if there's another question/thread on this problem I have. I tried searching but doesn't gives me good results.

    Basically, I received a file Independent of my client. The paragraph style title main column span (together) setup already. But according to my customer, for some reason, it does not. I tried fixing but I can't say what caused it.

    The main title is a title of numbered list. This would cause the column span does not?

    The setting is quite simple, with duration of set through all the columns and space after the span to 15mm (space before is 0mm).

    If I can get tips for how to address that would be fantastic because I have a number of reports to deal with this template.

    Thank you guys.

    See you soon

    Leanne

    Never mind. I realized what the problem was.

    It works only if all of the text in a single text frame with columns.

  • How to display a list of the columns (search bar - not displayed) in ascending order

    Hello

    I'll have an interactive report...
    In the Search bar we have to Select columns, unless we must do not display it.
    where all the columns (not shown) are listed.
    How can we display these columns in increasing order

    Thank you
    Deepak

    You want to display these columns in the IR?

    In the affirmative. Select the column you want to display, and then click on the the ' > '.
    In the interactive report regions - source, where you have your query to select columns use to rank them by order of the Association.

    You want to keep these columns as "do not display" and make them in the Association order it?
    Select all the columns to display and return the columns selections making "Not displayed" region order assn.
    Or in the query, select the columns in the desired order.

    I don't know if I'm helping. I fell like I got your question all wrong. Still...

    Published by: machan on December 11, 2009 11:01

  • Under the authority: How do I not show the column "else" when you edit a formula

    Hello everyone

    I'm creating a new analysis (reporting) and I have a problem when you edit a formula.

    I have an item called 'age' of the RPD. In my analysis (such as a table), I do not want to display each value 'age', I think you'll understand why. So, I'm to change the formula, and that's what I wrote:

    CASE

    WHEN 'âge' < = 18, THEN "minor".

    WHEN 'The age' (19, 20, 21, 22, 23, 24, 25) THEN ' < 26'

    END

    When I try this formula, I had 3 columns, a "minor", a "< 26' and an other empty but with numbers in it."

    It's I don't want to display a column for those who are more than 26 years.

    I tried to add another line before "END":

    NOTHING ELSE , but I read on other forums that if I write this line or not, OBIEE seems to do the same.

    I know I can hide the empty column, but I like, the analysis of 300 that include these data and it would take me some time if I had to hide the column for each analysis... In addition, I have a column selector and he won't do it more easily.

    If anyone has an idea how to solve this problem, I would be very grateful.

    I hate to make mistakes, I'm not a native English speaker

    Thanks for your help

    Clemency

    Good then you're basically transposing the rows into columns...

    Well how about setting a filter or selection stage to remove all NULL values for the column Age

  • Query of query count (column) returns empty not zero

    This seems to be a bug in 7,0,1,116466 and 8,0,1,195765

    Query of query count (column) or count (*) returns empty not zero when there is no match. Correctly returns a number when there is query matches.

    For example select count (i_id) of PersonnelQuery where i_id < 100

    Where does a report these?

    scottcook,

    It's a known bug in ColdFusion 6.x which apparently has not been set.

    Bug in CF6 (see the comments section of the page linked below)
    http://livedocs.Adobe.com/ColdFusion/6.1/htmldocs/using_29.htm

    Workaround
    http://www.bennadel.com/blog/244-ColdFusion-query-of-queries-odd-count-behavior.htm

    Report it as a bug
    http://www.Adobe.com/cfusion/mmForm/index.cfm?name=wishform

  • C4280 showed the error message "A4 not loaded in any bin" in Windows 8

    I connect my HP Photosmart C4280 all-in-One printer to my new laptop with Windows 8. Paper & I tried to print. However, he showed the error message "No loaded into any tray A4" and not printed.

    More information, I can't have ink cartridge 75 market. If the printer running with cartridge only 74.

    Please tell us how to solve the problem.

    I have uninstall & re-install the software. However, it does not work. But I discovered that running in 1 cartridge must be any problem, because it shows he showed as "single cartridge Mode."

    After that, I studied the error again & discovered "unloaded... A4. "look like related to digitization. Then, I tried to scan a document. After that, I tried to print a document & it works.

  • When I turn on my laptop and it does not have the startup sound, video, or audio won't work.sound icon shows the audio service is not running.

    Hello
    I'm not a problem with my his laptop. I don't get all the sounds, even start-up noise. the audio icon indicates that the audio service is not running.when I try you trouble shoot the problem. I get the message the windows audio and generator of endpoint audio windows needs to run correctly for audio work for sound. At least one of the device does not work correctly.
    waiting for answer

    Sincerely

    Hello

    Did you of recent changes to the computer that caused the problem?

    What is the brand and model of the computer?

    What issues you're having with videos?

    To solve the problem, see these articles:

    No sound in Windows

    http://Windows.Microsoft.com/en-us/Windows/help/no-sound-in-Windows?T1=tab02

    Tips for solving common audio problems

    http://Windows.Microsoft.com/en-us/Windows7/tips-for-fixing-common-sound-problems

    It will be useful.

  • ADF LOV-&gt; UI: main table showing the fields ID and not the search values

    Hello
    I am very new to the development of the ADF and will have a simple question that I can't solve.

    Using Oracle JDeveloper 11.1.2.0.0 I create my views and objects of entity without incident. I have an entity object that has several "search values" (these are all optional references to foreign keys to tables 'children'). Objects and relations are perfectly mapped the ADF.

    In the views of child object I created the list UI tips
    -Type: Combo box with list values
    -the "selected" column is the "description" of the research

    in the editable display object, I traced the fields 'id' to use the predefined LOVs.

    This works as expected in the user interface, I created with an ADF table can be updated.

    However (here's the noob question), the "id" is displayed in the search on the table column. When I click the menu drop-down I can see the description, etc, but for a professional user when they look at the table, they see an unfriendly identification number.

    How can I get the part of the LOV display to show the description, while remaining linked to the ID of the parent entity.

    for example, it shows
    Country             LOV1        LOV2     LOV3
    United States     15           18           2
    while I want to display:
    Country             LOV1            LOV2       LOV3
    United States     Washington  Seattle     Rain
    If this has been answered several times or walk through there, sorry for the redundant question, I simply can't find a solution!

    Hello

    There are several ways to do this, you simply need an additional outputText next to the lov component field to display the value of the description.

    If you search the forum or adf blocks, you'll find several implementations.

    And here's one: http://andrejusb.blogspot.com/2010/06/lov-description-text-with-groovy.html

    Gabriel.

  • When I try to attach a PDF to an email, it always shows the whole document and not an icon.

    When I try to attach a file to an email, it shows the entire document.  Is this a setting problem?  I've tried everything.

    No, it's a feature.

    Because he knows how to view a .pdf file, it displays, as a courtesy to you.

  • To the Acrobat Pro XI to the new iMac Macintosh, but now it shows the serial number is not valid.

    After migrating to a new iMac, he told me that he has not installed properly and I had to reinstall Adobe Acrobat Pro XI.  So I did, and now when I enter the serial number for activation, he says that there aren't valid.  Anyone know what could be the problem?

    Hey Circuit rider,

    Could it please let you me know if you disabled Acrobat XI from the old machine or not.

    You will need to first disable Acrobat (Help menu) from your old computer and then install and activate the software on the new computer using the same credentials of the Adobe ID (by subscription) or the serial number (for license) (menu help).

    Please note that you can activate an Acrobat subscription or license on maximum two computers (a desktop computer at work and laptop at home for example)

    If you need to install Acrobat on the third computer, then you will first need to disable any old computers, so there is no problem with installation.

    Please let me know if you did the same way.

    We hope to get your reply.

    Kind regards

    Ana Maria

Maybe you are looking for