Is there an easier way to get tabular report results with select lists?

Ok, as a newbie, I have gotten this query to work in my report region but I figure if I am doing something this convoluted then I am not letting a wonderful feature of HTML DB do its job.
I have 3 select lists that I want to "AND" together to filter the result list. Two of the selected items to filter could have null values.
I want to have the entire results to appear when the list is reset (clear cache is working and sets each select list value to null). However, it appears to me, if one select list is used and the others are not, the other select lists by default have %null% (Null return value setting left blank) which isn't really null.
Well if that wasn't confusing so far. Here is the select:
select [my columns]
from my_table
where (instr(upper("COL1"),upper(
decode(:P1_FILTER_COL1,'%null%',"COL1",
null,"COL1",:P1_FILTER_COL1))) > 0 -- COL1 is mandatory
AND
(instr(upper("COL2"),upper(
decode(:P1_FILTER_COL2,'%null%',"COL2",
null,"COL2",:P1_FILTER_COL2))) > 0 OR "COL2" IS NULL)
AND
(instr(upper("COL3"),upper(
decode(:P1_FILTER_COL3,'%null%',"COL3",
null,"COL3",:P1_FILTER_COL3))) = 1 OR "COL3" IS NULL)
Do I have to use decode for the select values being reset, selected/not selected? Is there some way for the Null return value setting to really be null not %null%?
Thanks,
Kelly

Rather than creating your report directly from a SQL statement use the "Sql Query (PL/SQL Function Body returning Sql Query)" option and re-write your code in PL/SQL. PL/SQL gives you greater control and allows you to test the "null" values and add where clauses to your SQL query based on whether or not a value was selected in the SELECT list.
For example, I have a report parameter screen that has a state drop down list that returns a value of -1 if no state is selected. I can, therefore, code:
IF :P6_STATE_CODE != -1 THEN
query := query + " WHERE state_code = ' ||
:P6_STATE_CODE ;
END IF ;
I have a more complete example if you would like to send me an email ([email protected])
Jeff

Similar Messages

  • HT1473 Sometimes when I copy a CD into iTunes all of the songs do not show y up in one album, but mutiple albums, all with the same name. Is there an easy way to get all of the songs into one album.

    Sometimes when I copy a CD into iTunes all of the songs do not show y up in one album, but mutiple albums, all with the same name. Is there an easy way to get all of the songs into one album.

    Generally adding a common album artist will fix things.
    tt2

  • HT204406 after this new itunes and ios7 update all my music is off my ipod touch unless i download them one artist at a time, i have over 3500 songs in there.  really?  is there no easier way to get my music back into my ipod?  like a download all button?

         after this new itunes and ios7 update all my music is off my ipod touch unless i download them one artist at a time, i have over 3500 songs in there.  really?  is there no easier way to get my music back into my ipod?  like a download all button?  thanks.

    thanks for the reply.  guess i'll have to do that.  apple, not really happy with what you've done with this latest update.  have not been able to enjoy my music in my car since the update.  most of us dont mind changes that progress timely, but this was much more than just a progression.  this was a complete change.  and not a good one, at all.  thanks to the two people that replied.  appreciate it.

  • Is there an easy way to get rid of duplicates in your music library?

    Is there an easy way to get rid of duplicates in your music library?

    Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin. Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership.See this thread for background and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • Is there an easy way to convert from a String with a comma, ie. 1,000.00 to

    Is there an easy way to convert from a String with a comma, ie. 1,000.00 to a float or a double?
    thanks,
    dosteov

    Like DrClap said: DecimalFormat. However, make sure you understand the Locale things, as explained at http://java.sun.com/j2se/1.3/docs/api/java/text/DecimalFormat.html (which refers to NumberFormat as well) and use them explicitly. Like
    public class FormatTest
      public static void main(String args[])
        try
          // see NumberFormat.getInstance()
          DecimalFormat fmt = new DecimalFormat();
          Number num = fmt.parse("1,000.01");
          System.out.println(num.doubleValue());
        catch(ParseException pe)
          System.out.println(pe);
    }most likely seems OK on your system, but may print "1.0" (or even fail) on some non-English platforms!
    When performing calculations, also see http://developer.java.sun.com/developer/JDCTechTips/2001/tt0807.html
    a.

  • Is there an easy way to delete complete albums instead of selecting and deleting each single foto?

    I am using an ipad 4 with IOS 8.0.2
    I am using the Standard "Photo" app
    Is there an easy way to delete complete albums instead of selecting and deleting each single photo? I want to reorganize the structure of my Pictures and delete lots of the photos and download new Pictures via iTunes Synchronisation.

    Go to Albums. Tap edit in the upper right corner. Tap the x. Tap done.

  • Is there an easy way to get GPS coordinates from Maps.app in Mavericks?

    My DSLR doesn't have a GPS built in, but I like to Geo-tag some of my photos. I usually just take a pic with my iPhone and then copy the geo data (GPS coordinates) and paste into the photos (in Adobe Lightroom). Unfortunately, I didn't have my phone with me. I have the location stored as a bookmark in Maps, but I don't see any easy way to just pull coordinates.

    Hi,
    I am doing the same thing too. I have to call my reports thru menu. I tried web.show_document in my menu and it works. I also added paramform=yes and it gives the report parameters, but I want to give the user the choice of format for the reports. eg. pdf, html, excel, etc. instead of hardcoding it.
    Could you please give me some idea on how can I do that??
    Thanks.

  • Is there any easy way to migrate painter reports from 4.7 Enterprise to 6.0

    Dear All
    We are being upgraded from 4.7 Enterprise to ECC 6.0 . The issue that we are facing is that company has more than 200 report painter reports ( on special ledger)  and I was wondering if there is any easier way to migrate it to ECC than redoing the whole work. What I mean to say is that, is there any tool/program/tcode that we can use for copying/editing purpose of the reports in ECC 6.0 to be based on flex ledger.
    Thanks

    Hello
    Why do you need to transport the reports?  Upgrade to 6.0 should keep your
    old reports from 4.7.
    In any case transaction GR57 allows you to export them to local file in C:\ and GR58 will import them. I have tested between systems of different releases and
    it worked correctly.
    Regards
    Javier

  • Running report and get the report result with coding

    Hi all,
    In our R/3 system, there is a custom sales report.
    My question is: is there possibility to get data by running this report and grab it the result with code and store it in internal table?
    Sorry if my question too basic because I am not abaper
    I am just wondering to find new solution for my project.
    Regards,
    Steph

    My requirement is: I want to get the result from this report
    (rather than try to get the data from SAP original table, because this report is very complicated with a lot of selection data) and use it this result into my new program.
    The mechanism that I want is pull the result from the current report, not to add some code in current report to push into new program, to avoid changed the report.
    Btw, the output of this report not only the excel file, we can also run this report on foreground mode and see the result.
    The report is not ALV report.
    Regards,
    Steph

  • Is there any easy way to get my account able to purchase with iTunes.  I get an error message and apple takes 2 days to respond

    I have a credit on iTunes and tried to puchave an app on a game but it failed.  It takes Apple 2 days to respond and clear the error.  Is there any way to do it without going through Apple/iTunes support?

    Depends upon what you mean by 'it failed'. If it's that you are getting a message to contact iTunes Support then no, you will have to contact them (the 48 hours should be the maximum time that it takes for them to reply).

  • Is there an easy way to get my podcasts back into regular playlists?

    I have an iPod Touch 4th Gen. One of the main things I use it for is to listen to podcasts in my car during my daily commute. I listen to a number of different podcasts, which I manage through iTunes. I use Smart Playlists to store the podcasts, and sync these to my iPod. Since my upgrade to iOS 8, this approach no longer works.
    The Smart Playlists still exist, and still show as having contents in iTunes. However, they only show up on my iPod within the Podcasts app. It seems that Apple's new approach to managing podcasts means that they will no longer show up in normal playlists. I can get to them through the Podcasts app from Apple, and I have read various articles touting competing podcast apps as being even better. However, I don't want to mess with an app while I'm driving, for obvious reasons. My car (2010 Honda Civic) has fairly basic iPod integration built in, but it allows me to navigate through playlists by using the radio controls. The smart playlists meant to hold podcasts still appear in my car, but when I select any of them, it displays "1" (just "1"), and crashes.
    I know Apple probably has bigger problems than this right now, but I would like to see my basic functionality restored. Accessing podcasts through the app is fine, but it doesn't seem necessary to have removed access through other ways, like through regular playlists.
    If anyone has any ideas, I'd appreciate it. Thanks!

    I don't think it's possible anymore. I'm mildly surprised you were able to keep podcasts in regular playlists this long - I thought this option disappeared back with iOS7.
    I do share your pain. I've finally grown used to having the podcasts in a separate app, but I still don't like it.

  • I want to use my canon pixma ip4500 as my printer with my good ole G4.  I need a driver.  Is there an easy  way to get that or is my G4 too old?

    I want to use my canon pixma ip4500 as my printer with my powerbook G4.  I need a driver but was very confused with how to get one.  Is it possible and could someone come down to my level and tell me step by step how to do it?  Many thanks.

    Nope, your PB is not too old.
    Here is the link to the PIXMA ip4500 drivers on Canon's site:
    Drivers & Software
    The page has you first select your version of the Mac OS (10.4) from the pull-down "Chose Operating System" menu. Once selected, you'll see the available software, Click on the arrown next to "Drivers" and it should look like this:
    (click image to enlarge if needed)
    Click the word "Download " and you'll get the driver.
    Note at the top of that image there are other links to other documents pertaining to this printer. If you click on "Brochures and Manuals," while you are on that web page, you'll have Canon's instructions, probably better done than by anyone here other than someone who has the same printer model on a Mac running OS 10.4.

  • Is there an easy way to get itunes to find ALL my songs ?

    After moving my itunes library to a new hard drive and consolidating it most of my 1000's of songs have an ! mark next to them, which means that itunes can't find that song, movie or tv show. I can individually click on each song, movie or tv show, and direct itunes where to find it and then it's fine, but it would take me the rest of my life to do that to everything I've got. I looked this issue up and found a couple of recent posts of the same question, but the solutions posted have in fact made the situation worse not better. The issue is with my iTunes on 1 hard drive 750gig on my G5 which is running itunes 7.4.2 and Mac OS 10.4.10. This is not a new problem as I have had this on my imac as well when I transferred music to it rather than downloading fresh from a cd.
    I would appreciate any help with this. Thanks!
    the solution I tried was to drag the library.xml from the itunes folder to the desktop and then open itunes and do file/import/choose and choose the library.xml on the desktop. After doing this I found that the songs I had loccated manually for itunes were now "Lost" again.

    I run itunes from an external hard drive as I have too much itunes for my laptop! Part of my "back up" process is to always copy the "itunes library" and "itunes music library.xml" anytime after I buy/add music or change a playlist. Regardless of where your library is kept, those two documents on your hard drive in your music/itunes folder determine your library.
    One time I had a hard drive failure and had to reinstall all my itunes stuff (I always back everything up to another hard drive and on dvd). I had not backed up since the last time I had purchased music/tv. When I dragged the two documents to my music folder on my hard drive, the most recent files didn't show up. They were in the music folder, but not appearing in the interface. I had to re-import them through itunes. No biggie. It was only a couple of files and I knew which ones weren't there.
    Good luck!
    Sharon

  • Some how I have several duplicate photos, is there an easy way to get rid of them without deleting one at a time?

    Can I make Iphoto delete duplicate photos?

    Duplicate Annihalitor - http://brattoo.com/propaganda/ - or Decloner - http://www.pixelespressoapps.com/decloner/
    LN

  • Is there an easy way to get a "recent files" menu with a path control?

    If not, does anybody have any modular code that would do the trick? I could build this from scratch, but I'm sure it's been done many times already.

    bmihura wrote:
    Yep, that's what I need. Before posting it, please test it with no other VI's open, as others on this forum will likely want it.
    Are you refering to password locking the subvis?  Or do you mean you want me to make sure it can work with any top level VI?  If the latter is true, then the answer is YES.  It will work with any menu.  It will place a list of recent files (it will limit them to a specified number, which is configurable) just above the last option under your first menu group.  So say you have the "File" menu first, and your last option is "Exit," then the File menu would look like:
    Before:
    New...
    Open...
    Close...
    Exit
    After:
    New...
    Open...
    Close...
    "Name of recent file 1"
    "Name of recent file 2"
    Exit
    Now of course your menu probably won't look just like that, but as long as the recent files list can put itself beside the last option (with a seperator), it will work fine.  Let me know if you have any more questions before I post the subs.
    7J1L1M
    P.S.  They run on LabVIEW 7.1, but I can save them to 7.0 if that is the version you have.

Maybe you are looking for

  • Very Basic Objective-C issue, I am sure

    So I picked up a book on ojective-c namely Mr. Kochan's, and have been trying to work through the exercises and examples. I ran into my first problem that I haven't been able to solve myself. The error says that the object I tried to create "point" i

  • GRN against different SCN

    Dear All Pls help 1)Materials against certain PO line items have been received in full under different SCNs  while the rest of the line items have been received in part under different SCNs 2)GRNs need to be generated for the line items that have bee

  • Mini DVD stuck in drive

    My darling son, who never causes us any problems, has done it this time. He inserted a mini DVD into the drive slot. It never booted, the machine doesn't recognize it has a disk in the slot, it can't be ejeted, there's no little paperclip hole, etc.

  • Leopard 10.5.4 update and security patches

    I am new to macs and I have a question regarding OS updates and security patches. I installed the 10.5.4 update. Do I need to install the 2008-004 security update? Thanks.

  • Trying to make a graph that actually works

    I'm trying to make a graph for my boss that displays the number of tickets each staff member have completed. I found this tutorial: http://www.flashkit.com/tutorials/Dynamic_Content/Creating-Zoubin_Z-61/index.php However when I finished it, I wanted