Help with setting a condition (if-then-else statements)

Hello,
In the following data template I am trying to create a condition for
SUMAMOUNTPERKELEASE when cs_countfund > 1 in my rtf template.
<dataTemplate dataSourceRef="xmlpdemo" name="cs_ar_kelease">
     <dataQuery>
          <sqlStatement name="Q_1">
               <![CDATA[
select     fm.ke
,     ltrim(to_char(fm.ke,'000')) || '-'
||     ltrim(to_char(fm.lease#,'000000')) || '-'
||     ltrim(to_char(fm.lse_code,'00')) kelease
,     fm.ar_doc# ar_doc
,     fd.fund
,     fd.sub
,     ro.lname
,     fm.billed_from
,     fm.billed_thru
,     fm.due_date
,     sum(decode(trancode,
          10, fd.amount,
          420, fd.amount,
          421, fd.amount,
          100, fd.amount*-1,
          101, fd.amount*-1,
          102, fd.amount*-1,
          109, fd.amount*-1,
          110, fd.amount*-1,
          112, fd.amount*-1,
          120, fd.amount*-1,
          121, fd.amount*-1,
          122, fd.amount*-1,
          130, fd.amount*-1,
          230, fd.amount*-1,
          0 )) amount
from     finhist_main fm
,     rolodex ro
,     finhist_detail fd
where     fd.fund <> 999
and     fd.sub <> 99
and     fm.status not in (106,110,120)
and     fd.trancode <> 11
and     fm.ar_doc# < 9000000
and     fm.rolodex# = ro.rolodex#
and     fm.lse_code = fd.lse_code
and     fm.lease# = fd.lease#
and     fm.ke = fd.ke
and     fm.ar_doc# = fd.ar_doc#
group by     fm.ke
,     fm.lease#
,     fm.lse_code
,     fm.ar_doc#
,     fd.fund
,     fd.sub
,     ro.lname
,     fm.billed_from
,     fm.billed_thru
,     fm.due_date
order by     fm.ke, fm.lease#, fm.lse_code
,     fm.ar_doc#
,     fd.fund
,     fd.sub
]]>
          </sqlStatement>
     </dataQuery>
     <dataStructure>
          <group name="G_ke" dataType="varchar2" source="Q_1">
               <element name="ke" dataType="number" value="KE"/>
               <element name="SumamountPerke" function="sum" dataType="number" value="G_fund.amount"/>
               <group name="G_kelease" dataType="varchar2" source="Q_1">
                    <element name="kelease" dataType="varchar2" value="KELEASE"/>
                    <element name="ar_doc" dataType="number" value="AR_DOC"/>
                    <element name="lname" dataType="varchar2" value="LNAME"/>
                    <element name="billed_from" dataType="date" value="BILLED_FROM"/>
                    <element name="billed_thru" dataType="date" value="BILLED_THRU"/>
                    <element name="due_date" dataType="date" value="DUE_DATE"/>
                    <element name="CS_countfund" function="count" dataType="number" value="G_fund.fund"/>
                    <element name="SumamountPerkelease" function="sum" dataType="number" value="G_fund.amount"/>                    <group name="G_fund" dataType="varchar2" source="Q_1">
                         <element name="fund" dataType="number" value="FUND"/>
                         <element name="sub" dataType="number" value="SUB"/>
                         <element name="amount" dataType="number" value="AMOUNT"/>
                    </group>
               </group>
          </group>
     </dataStructure>
</dataTemplate>
<element name="CS_countfund" function="count" dataType="number" value="G_fund.fund"/>
<element name="SumamountPerkelease" function="sum" dataType="number" value="G_fund.amount"/>     
I have tried the following conditions in the text form field for SUMAMOUNTPERKELEASE
<?if:cs_countfund > 1?>
SUMAMOUNTPERKELEASE
<?end if?>
<?xdofx: if :cs_countfund > 1 then
SUMAMOUNTPERKELEASE end if?>
<?xdofx: if cs_countfund > 1 then
SUMAMOUNTPERKELEASE end if?>
<?choose:?>
<?when: cs_countfund > 1?>
SUMAMOUNTPERKELEASE
<?end when?>
Nothing seems to work. Help...
Any suggestions would be greatly appreciated.
Susie

Hi,
I assume that in your resulting XML CS_countfund is written in uppercase.
So try
<?if:CS_COUNTFUND > 1?>
<?SUMAMOUNTPERKELEASE?>
<?end if?>
Regards
Rainer

Similar Messages

  • I need help with setting up time machine for backup

    I would like help with setting up time machine for backup.

    You will need an external hard drive (formatted for a Mac).
    Then you plug it in and go to system preferences>time machine and select the external HD and turn it on.
    The backups are automatic.
    Barry

  • How to total 2 colums with an -If then else- statement each

    Hello,
    I have 2 colums A en B who generate data based on an “If then else” statement.
    Colum A
    <?xdofx:if (OMZET_YTD_VJ )!='' then ((OMZET_YTD_VJ) * (BM_YTD - BM_YTD_VJ)) div 100 else 0 end if?>
    Colum B
    <?xdofx:if (BM_YTD)!='' then ((BM_YTD) * (OMZET_YTD - OMZET_YTD_VJ)) div 100 else 0 end if?>
    Colum C needs to be the sum of both. Who can help me?
    Thanks a lot.

    Can you send me the RTF template and xml file to [email protected]? I can take a look and try to help.
    Thanks,
    Bipuser

  • Can anyone help with setting up AirPrint on my iPhone 4

    Can anyone help with setting up AirPrint on my iPhone 4.  Printer is ready.

    you have a compatable printer correct? http://support.apple.com/kb/ht4356
    if you do may i introduce you to a hassel free app for your mac called printopia i use it also very easy to set up and use
    http://www.udeo.com/mac/printopia/
    hope thats helped
    Goody

  • Purchased extreme to replace modem/router DSL used telephone cord need help with set up

    Prior to purchasing Airport Extreme had a standard modem/ wireless router from ATT for DSL. I have two macbooks both dropped connections while online with older modem.
    Airport Extreme purchased to correct connection issues I need help with set up. The older modem just used telephone cord. I tried to use telephone with extreme it did not work.
    How do I get extreme to work as the modem and router ?

    How do I get extreme to work as the modem and router ?
    you can't. the extreme is only a router. you need a separate modem (or disable the wireless part of your old router and use it as a modem - if that's possible).

  • I need help with setting up my Sun Java Studio Creator

    Hello all, i need help with setting up the Studio Creator, i"m new to all that staff so is there anyone to help me just a little with all that if yes email me at [email protected] or get me on AOL Instant Messanger with the screen name: wretch17
    thanks :-)

    Hi,
    Welcome to the Creator community! Thanks for your interst in Sun Java Studio Creator. Please feel free to post any question related to creator on this forum .
    Take a look the creator website at
    http://developers.sun.com/prodtech/javatools/jscreator/
    CreatorTeam

  • If Then Else Statement in SAP R/3 BW

    Hi,
    Does anyone know how to create an If Then Else statement in BEX?
    Thanks,
    Mounika.

    Hi mounika,
    do this way
    If 'material number' > 0.
    rslt = 'enter into table'.
    else.
    rslt = 15.
    endif.
    A True condition always evaluates to 1, a False condition evaluates to 0.
    for more quieries in bw ..pls go through  the link
    http://sap.ittoolbox.com/groups/technical-functional/sap-bw
    pls reward if helps,
    regards.

  • Inserting a 'null' value in an IF THEN ELSE statement

    Greetings,
    I'm using Business Object webi XiR3
    I'd like to return a 'null' value in certain cases for an IF THEN ELSE statement.  Depending on if I format the field as a text or a number, I can return blanks ("") and zeros (0).  However, what I really need to do is leave the field / column formatted as a number and return a 'null' value.  You can see the variable below ... this will return a blank but the column is text.
    Suggestions?
    thanks.
    variable:
    =If([Comp Rate Mid] = 0 And( ([Market Rate 50th].085) - [Annual Total Targeted Comp] >=0) ; ([Market Rate 50th]0.85) - [Annual Total Targeted Comp]; If([Comp Rate Mid] <> 0 And( ([Comp Rate Mid] 0.85) - [Annual Total Targeted Comp] >=0) ; ([Comp Rate Mid]0.85) - [Annual Total Targeted Comp];""))

    I don't think this is possible using a formula, as formulas deal with content, and images can be placed in cells only as 'image fill', which is Format, rather than Content.
    Might be possible using an AppleScript, but I'm not the person to advise you on that.
    Regards,
    Barry

  • Java If/Then/Else Statement

    Hello,
    Just wondering if it is possible to call one java file from within another.
    I'm thining wiht an if.then/else statement similar to
    If x==true
    then run file1.java
    else run file2.java
    any examples of this, or if it is even possible would be appreciated.

    This is something like what I would do.
    public class FileRunner {
        public static void main(String [] args) {
            if ( args[0].equals("file1") {
                File1 file1 = new File1();
                file1.init() //method you define in File1 that runs everything that would've been in the File1's main method
            } else if (args[0].equals("file2") {
                File2 file2 = new File2();
                file2.init() //method you define in file2 that runs everything that would've been in the File2's main method
            } else {
                System.err.println("Invalid argument");
                System.exit(1);
    java.exe FileRunner.class file1
    java.exe FileRunner.class file2The other method is to start a new jvm from within java, but that gives you less control than this imo.

  • Usage of exists in if-then-else statements

    please correct the mistakes in this procedure regarding exists in the use of if then else statement .as i am new to oracle i am unable to do it.
    errors are statement ignored
    exists should be inside the statement;
    CREATE or replace FUNCTION CHECK_FG_Id
    p_LegacyDocumentId VARCHAR2,
    p_LegacyFGroupId VARCHAR2,
    p_TransmissionId INTEGER
    RETURN INTEGER as
    BEGIN
    IF EXISTS
    (Select FG.ControlNo from functionalgroup FG,document D
    WHERE FG.DocumentId=D.Id AND D.TransmissionId=p_TransmissionId
    AND FG.ControlNo=p_LegacyFGroupId AND D.ControlNo=p_LegacyDocumentId ) THEN
    Return 1;
    ELSE
    Return 0;
    END IF;
    end;

    Lots of different ways...One way is as follows:
    CREATE OR REPLACE FUNCTION check_fg_id (
    p_legacydocumentid VARCHAR2,
    p_legacyfgroupid VARCHAR2,
    p_transmissionid INTEGER) RETURN INTEGER AS
    vDoesItExist NUMBER;
    BEGIN
    SELECT COUNT (1)
    INTO vdoesitexist
    FROM functionalgroup fg,
    document d
    WHERE fg.documentid = d.ID
    AND d.transmissionid = p_transmissionid
    AND fg.controlno = p_legacyfgroupid
    AND d.controlno = p_legacydocumentid;
    IF vDoesItExist > 0 THEN
    RETURN 1;
    ELSE
    RETURN 0;
    END IF; /** vDoesItExist > 0 **/
    END check_fg_id;

  • Procedure with out parameter in if-then-else condition

    Hi,
    I want to fetch the out parameter of a procedure inside another procedure that has if-then-else condition.
    <<Proc1_start>>
    if ..
    then <<proc2_>> --- with out parameter
    end if;
    <<proc1_end>>
    How to do this...
    Thanks.

    Ummm, the same way you would do it anywhere else?
    Declare variable in proc1 to hold the output of proc2 and then call proc2.
    John

  • New computer ~ Help with setting up

    Hi everyone, Newbie here!
    I am going to set my new computer up tomorrow. The computer I am using at present was installed and set up by someone else so this will be a great learning curve for me. Also I had Infinity installed by the engineer.
    Is everything I need to install relating to my broadband available to download? What do I need altogether? I spoke to a BT chap on the phone and he said he would help by remote access. I am a bit nervous of this!
    I need to ensure my computer is safe and secure and it all seems technically daunting. Norton security came with  my Microsoft Office package. Is this better than McAfee (Net Protect Plus), do I need both? What about a key code scrambler  (someone mentioned this to me). As you can see I need reassurance and help arghhhhhhh.
    A step by step guide would be great!
    Thanks
    Solved!
    Go to Solution.

    It is best not to install any of the BT software, just connect your computer to the BT Home hub using an Ethernet cable, or by using the wireless key, if its a wireless connected computers.
    See http://bt.custhelp.com/app/answers/detail/a_id/14964/~/getting-started-with-wireless
    Using a direct cable connection is best, if you want to get maximum speed.
    I would not allow anyone remote access, but if you have no choice, and cannot resolve the issue any other way, then make sure that it is as a direct result of you ringing BT, and not some random person ringing you at home, pretending to be from BT or even Microsoft.
    Many people have been caught out by that type of call, and had their computer infected with spyware.
    If you already have a trial version of Norton Security, then by all means use it until it expires, then uninstall it.
    After that, you have the choice of using the free Microsoft Security Essentials, which is preferred by many forum members, or using BTs Netprotect which is free with some broadband packages. This has been known to make computers run more slowly though.
    That is all you need.
    If you have any problems, then please return here.
    If you have any problems with BT Infinity, then please visit the Infinity board on this forum.
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • I took my iMac to be fixed and when i got it back, mail was not set up. I called Apple Support and they helped me set up mail. Then the emails went to trash on the iMac and on the MacBook Pro (same emails). There are no numbers by the 'inbox' to tell how

    I took my iMac to be fixed and when I got it back, mail was not set, so I called Apple and they helped me set up mail. Now the new mail goes to trash and there is no number by the 'inbox' to tell me how many new messages I have. I cannot save a draft to 'drafts.' There is a large number by 'trash' (I think all mail went to trash - including drafts). When I send myself an emai, it goes to trash also. This is on both my iMac (the one taken in) and my MacBook Pro (same emails) which was not taken in.
    I went to 'rules' but have no idea what to do there. There are no rules in the rule box. When I click 'add rule' it puts 'rule 1' in the rule box, but since that was not there when I took it in, I delete it to have an empty rule box.
    Can someone pleasehelp me. I am completely stupid with all this. Do not under stand what is suppose to be set up in 'rules.'
    Thank you so much,
    Arudi

    Now new mail is coming to both computer's inboxes but there is no number on the stamp icon on dock to show number of emails on the iMac. Nor is there a number by either email address under MAILBOXES/inbox (sidebar) on the iMac. This number is showing on MacBook Pro.
    I also can save drafts now on both computers.
    Seems the Pro is fixed and the iMac is only missing the numbers on dock icon and by addresses in inbox.
    Now that the problem is less, I feel i am wasting your time but will continue so maybe I can get those numbers back.
    Two emails > AT&T email and gmail.
    Apple's Mail program for email - yes, and gmail.
    IMAP for both accounts.
    Did not change mail configuration on MacBook.
    The iMac and MacBook Pro have the same mail configuration except in Accounts/mailbox behaviours/store draft messages on the server was not marked on MacBook > it is now.
    'Store junk messages on the server' was marked on one computer for gmail, but is unmarked on both now.
    On the iMac, Accounts/Accounts info/Outgoing mail for gmail is smtpgmail.
    On the MacBook Pro for gmail it is smpt.gmail.com (plus) my email address.
    Rules/Add rule window, on the MacBook third line is 'Any Recipient', on the iMac third line is 'From."
    The last box on that line has my email address on the MacBook.
    The last box on that line has the last address I sent an emil to (last night), on the iMac.
    On the last line on iMac, no box was selicted for 'to mailbox' > I choose 'inbox' because it is on the MacBook Pro.
    Now I have a Rule #1 and am not sure I should have because there was no rules marked when I took the computer in.
    Thank you. I relized I had done the labeling wrong when so much of my question appeared twice and no one else's did. I know how to do it now.
    Thank you so much,
    Arudi

  • Help with setting up Rosegarden?

    Hi, I am looking ino creating an open source music studio with my laptop to enter a state competition for my High School's TSA chapter. Problem is that I'm totally new to sound on linux. I have very limited experience in music making and the best I have done was create a beep in Acid Pro on my friends machine on Windows . All jokes aside, I really need this to work. I have a Toshiba Satellite L45-S7409 with a Pentium Dual Core 1.47GHz with 1GB. I know it's not the best hardware and am hoping it can handle what I want to make since I have my idea already set.
    Rosegarden came to mind because I saw it under a forum topic in the Feora Forums about making music and is currently the only one I know.
    Any help would be very well appricated.

    A few packages I'd suggest installing, as well as Rosegarden/Ardour/Hydrogen/Jack, in order to have a decent bulk of stuff to play around with (some from AUR):
    qjackctl - a very useful GUI for Jack, making it easy to play about with the settings.
    patchage - a graphical point-and-click patchbay for controlling audio connections between applications in Jack, and also MIDI input and output.  Much more clear to use than the one provided in qjackctl.
    zynaddsubfx - a quite versatile synthesiser
    bristol - emulation of a whole load of vintage synths (launched from the command line with 'startBristol')
    fluidsynth & qsynth - an alternative to timidity, with the ability to create numerous instruments in qsynth, each loaded with a different soundfont (google 'soundfonts' to find plenty of sources of these, from the good to the awful!).  Each instrument will appear separately in patchage.
    Jack is a sound server designed for the needs of realtime audio work, and needs to be started (via qjackctl) before you launch any of these Jack-dependent programs.
    Off-hand, the things I can remember about getting Jack running nicely are to add the following to /etc/security/limits.conf:
    @audio - rtprio 99
    @audio - nice -19
    @audio - memlock unlimited
    As long as you're in the audio group, this then lets Jack take priority over other processes when it needs to.
    In qjackctl, in setup - settings, check 'realtime', leaving the rest of that column unchecked.  You probably will want the driver to be Alsa, make sure your input and output devices are selected correctly, maybe match the sample rate to your hardware, and then you'll need to play around with the frames/period setting.  This gives a fixed (and therefore predictible) latency, which you want to be as low as possible without causing 'xruns' (buffer over- and underruns), which will be flagged up in the messages window of qjackctl once you start the Jack server.  I'd suggest starting of with frames/periods=1024, and then see if you can get any lower.
    Also, Rosegarden will complain about not having a high-resolution timer, due to the 300Hz kernel timer of the stock Arch kernel.  This really isn't accurate enough for MIDI in particular.  I think there's kernels in AUR which offer alternatives, but I just compiled a custom kernel, using pacbuilder to edit the PKGBUILD to give it a custom name (kernel26-custom), and only modifying one setting from the stock config, putting the kernel timer up to the 1000Hz maximum.  Using a custom name meant it didn't overwrite the stock kernel, and I could add it as an extra entry in grub.
    Rosegarden can have MIDI outputs from individual tracks connected to external synths (zynaddsubfx or bristol), or plugins (try installing calf, whysynth and xsynthdssi from AUR, for instance).  You can record MIDI input from a controller, or input directly into Rosegarden either through notation or piano-roll interfaces.  You can record audio tracks as well, or route the various synth outputs into Ardour and record everything there instead.  Another thing that Jack enables is synchronising drum patterns in Hydrogen with whatever you've got in Rosegarden, and you can then record the two at once with Ardour.  Or, if you just want to use Hydrogen as another synth providing drum sounds, you can control it from a Rosegarden MIDI track.
    Or, in short, just play around with it all!
    Edit: if you've got pulseaudio installed, use 'pasuspender qjackctl' to stop it interfering with Jack.  There's enough to deal with here without also trying to get the two to play nicely together!
    Last edited by owain (2009-12-03 14:27:21)

  • Need Help with setting up this Filter

    Hi,
    I need help making a filter sound like the one used in this youtube song.
    I tried setting it up but I've had no success; even though I know for a fact that this filter was made in Logic Pro 9 according to the maker of this song.
    I think there might be a bit of 'Fuzz-Wah' in there too but I've never really used that effect so any tips on that would be great, too.
    Link: http://www.youtube.com/watch?v=tf017M8SZZE&feature=plcp
    Any help with this would be widely appreciated.
    Thank you :-)

    It sounds like a simple hi Q filter sweep to me but getting close to the original synth sound that it is being used on is the challenge. It might well be that it is the filter on the synth itself is what is being swept. Either way, turn up the filter resonance on a band pass filter and sweep it with the lfo or adsr to modulate the filter cutoff if its the synth filter, or automate the filter frequency  sweep if you use the channel filter.

Maybe you are looking for