Parameter in select to returns all records.

Post Author: ComputerMike
CA Forum: Crystal Reports
Hi,
I have a "project" parameter I use in my select formula to return records based the project field.  I would like to pass a value like "All" or "*" and have all reords returned, to see the records for all the projects.  If I pass in "3" I would just get records for project 3.  "All" would give me all the projects.
Thanks,
Mike

Post Author: GraemeG
CA Forum: Crystal Reports
Modify your selection formula to something like:
(if {?project} <> "ALL" then   {table.project} = {?project}else   1 = 1)
You have to specify an 'else' and the above is a cheat that makes sure everything is selected if 'ALL'  is entered. A suggestion - make 'ALL' your parameter default.

Similar Messages

  • Mac mail search function is not working. Any search term returns all records.

    Mac mail search function is not working. Any search term returns all records.

    hi eric. many thanks.
    i will have to read these links closer but what i meant to say is that the hard drive space that was being taken up seemed like it suddenly jumped way up because i had just gotten through a process in the last month where i am storing all my My Documents data on my Mac Pro. i am doing this in order to decide whether i should just keep it ALL on my Mac Pro and use ChronoSync to sync /some/ of it to my MBP.
    so if i look in the Documents folder on my Mac Pro i have a ton of folders that i have created with a ton of data. if i look in the Documents folder on my MBP there are NO folders that have data in them that i created. there are other folders such as folders that various software created but what i mean to point out is that there was a LOT of available space on my HD until recently.
    i am wondering if there is some way that running the Mail re-index (it then ran some kind of "Importing" routine) or by syncing my Photostream to the MBP caused a huge jump in data on this drive. if it is the photostream sync i can just take this off or see if it will sync more selectively. if it is something to do with mac mail jumping in size i am not sure why this would happen or what to do about it.
    does that question make sense?
    i mean, before i did these two operations my recollection is that i would have had 130 GB on the hard drive (really just guessing here) and now there is like 218 GB on the hard drive and i don't know where all this came from...

  • Search query returning ALL records

    DW CS3 - MS Access - ASP/VBScript
    I have a search form for records to display on the same page with keywords highlighted.  The search is returning ALL records and highlighting keywords throughout rather than returning specific records with the searched word.  What am I missing?  I'm sure it's something terribly simple.....
              <input name="search" type="text" id="search" value="<%= Request.QueryString("search") %>" />
              SELECT item, item, item, item
              FROM tbl_name
              WHERE item OR item OR item LIKE %MMColParam%
              ORDER BY sql_orderby, Date DESC
              Name: MMColParam
              Type: Text
              Value: Request.Querystring("search")
              Default Value: %

    I was using the word "item" as an example for multiple columns without actually naming them - they are not the same.  I should've used this example:
    SELECT shoes, socks, hats, gloves
    FROM tbl_apparel
    WHERE shoes OR socks OR hats LIKE %MMColParam%
    ORDER BY sql_orderby, Date DESC
    In the past, I had four duplicate query parameters for four columns which worked fine.  But since I only have one search term, I thought I could eliminate three of the duplicate parameters and use just one with the OR statement.
    In the past, you questioned me on this.  You stated, "You only have one search term and so all of the parameters have the same value, but DW still wants to creates 4 parameters. If you were coding this by hand you wouldn't do it that way, but DW's one-size-fits-all code generates four seperate parms. It's nothing to worry about."

  • Can select statement return 'No Record found' for each of invalid inputs.

    Let say when you select a invalid booking number, oracle will
    return nothing, but do u know how to make oracle return a record
    saying it's invalid?
    Example, the following sql normally return 3 records cause
    only 3 numbers are valid, is there anyway to make it return
    4 records and indicate those invalid ones are invalid somehow.
    select booking_service, BOOKING_NO from tb_booking where booking_no in ('valid1','INVALID', 'valid2', 'valid3')

    Along the same lines you could use object types to achieve the same result. This would remove the need for a temporary table, and also allow you to create the list of ids to check with PL/SQL without i/o. As an example
    CREATE TYPE booking_id_typ IS OBJECT (id NUMBER);
    CREATE TYPE booking_id_list_typ IS TABLE OF booking_id_typ;
    CREATE TABLE bookings (booking_id booking_id_typ);
    (you could have booking_id as type NUMBER, but for consistency with subsequent SQL I've used booking_id_typ)
    INSERT INTO bookings VALUES (booking_id_typ(10));
    INSERT INTO bookings VALUES (booking_id_typ(20));
    INSERT INTO bookings VALUES (booking_id_typ(40));
    INSERT INTO bookings VALUES (booking_id_typ(50));
    The following SQL statement creates a collection on the fly, rather than using an IN clause.
    SELECT i.id booking_id, DECODE(b.booking_id.id, NULL, 'Invalid', 'Ok') status
    FROM bookings b,
    SELECT id
    FROM TABLE(booking_id_list_typ(booking_id_typ(10), booking_id_typ(20), booking_id_typ(30), booking_id_typ(40)))
    ) i
    WHERE i.id = b.booking_id.id (+)
    BOOKING_ID STATUS
    10 Ok
    20 Ok
    30 Invalid
    40 Ok
    This SQL statement works in 9i. I get the following error in 8i, but you might be able to CAST the TABLE to booking_id_list_typ, or depending on your application, create a PL/SQL variable of type booking_id_list_typ and CAST that instead.
    ERROR at line 5:
    ORA-22905: cannot access rows from a non-nested table item

  • Returning all records for a query

    Hi,
    still working on this library. I have the majority of it working (not pretty but it works). One problem I have run into is that when I query an authors name I would like all records for that author to be shown. However, it is only showing the final record.
                   public void Search_a()throws Exception{
              String S_author1 = JOptionPane.showInputDialog(null,"Please enter the authors name");
                   String query = ("select * from library where Author=('"+S_author1+"')");
                   ResultSet rs = db_statement.executeQuery(query);
                   while (rs.next()) {
                  String s = rs.getString("Author");
                  output.setText(rs.getString("ISBN")+"\t"+rs.getString("Title")+"\t"+ s +"\t"+ rs.getString("Publisher")+"\t"+rs.getString("Genre")+"\t"+rs.getString("Details")+"\n");
              }//end while
         }// end search_aI cannot see where the error is. I think maybe I am overwriting the previous records but thought that the inclusion of +"\n" would force each result to a new line.
    Any ideas?

    Thanks for that. Not really sure how I would implement that (new to programming) but I have managed to solve it using               output.setText(output.getText()+rs.getString("ISBN")+"\t"+rs.getString("Title")+"\t"+ s +"\t"+ rs.getString("Publisher")+"\t"+rs.getString("Genre")+"\t"+rs.getString("Details")+"\n");Thanks for the reply though.

  • Web API OData $Select Option Returning All Fields

    I have a GET statement as follows:
    ...://AAA.azure-mobile.net/api/plist?$select=id,PropertyName
    where "AAA" is the my mobile service.  Even though this statement asks to return only two fields, it returns all of the field.  I don't see a syntax error but maybe there is something I am missing?  Thanks.

    Hi OliverTCOS,
    Thanks for your post to our forum.
    Your request url looks fine in my side. And if the method "plist" works fine, then the $select will select the is and propertyName field only for you. As for your scenes, I suggest you checking your server side method and make sure there is a [Queryable]
    attribute for "plist" like below.
    Collection entities:
    [Queryable]
    public IQueryable<Category> GetCategories()
    Single entity:
    [Queryable]
    public SingleResult<Category> GetCategory([FromODataUri] int key)
    And also make sure your web api odata package version supports $select and $expand.
    Besides, I suggest you taking a look at similar issue and get more information
    http://stackoverflow.com/questions/17617946/odata-select-not-working-on-web-api
    https://aspnetwebstack.codeplex.com/workitem/326
    Regards,
    Fuxiang

  • URGENT Select Query Returning No Records take same time as that of insert

    Hello Everrybody,
    I am facing a wierd problem...
    I have table with 15 fields and I am selecting a record with some condition...
    for e.g
    select field1,field2,field3....... from tablea where field1=123
    Now I have index on field1
    When I do SQL Trace it show me time taken as
    00:00:00:60 in oracle 817 SQL PLUS
    and using
    oracle 92 sql plus it show as
    00:00:00:01 in oracle 817 SQL PLUS
    Now Query is what does this 60 denotes milliseconds or what in oracle 92 and in oracle 817 sql plus.....
    Also this query does not return any rows...
    When I run the SP that insert records in same table...That sp take about same time as that of select returning no rows......
    Why is ORACLE Taking so much time for that select ????
    Please help.....

    8i measures timings in 100th of a second but I believe that 9i measures stuff in 1000th of a second. However, from your output it looks like SQL*Plus trace is rounding up to the nearest centisecond.
    Time is a very poor way of judging performance when you're talking less than a second per operation. You'd be better off looking at CPU usage and IO activity.
    Anyway, here are some questions for you to research:
    (1) Is field1 a unique index?
    (2) How many rows does this table hold?
    (3) How fresh are the statistics on the table and the index?
    (4) What's the explain plan? What's the TKPROF output?
    (5) Are all of the above the same on both databases?
    Cheers, APC

  • User selection to return filtered record set

    Hi,
    I want to create a JSP which allows a user to enter search criteria for several columns of a table. I will use the entered values to set the sql where clause and produce the filtered record set. (eg the user enters a particular customer code and status code in order to see a list of orders placed by that customer which have the selected status code.)
    The problem I have is this: I want the input fields for the selection criteria to be combo boxes populated with values from the database.
    What is the best way to do this?

    Hi,
    I want to create a JSP which allows a user to enter search criteria for several columns of a table. I will use the entered values to set the sql where clause and produce the filtered record set. (eg the user enters a particular customer code and status code in order to see a list of orders placed by that customer which have the selected status code.)
    The problem I have is this: I want the input fields for the selection criteria to be combo boxes populated with values from the database.
    What is the best way to do this?

  • XL Reporter Parameter that returns all data if not used

    Is there a way to use a parameter on a field, but if the user doesn't select a value, return all rows? I have a report that returns a bunch of data about items. I would like one report where if the use chooses to narrow it down to a specific item they can, but if they choose not to narrow it down, it would return all items. I can only get it to do one or the other, but not both in one report.
    Thanks

    I have a parameter setup for the ItemCode and I tried to assign it * for its default value, but it returns nothing. If I enter a valid item code it works, but it seems as if I put an * in, it looks specifically for that rather than treating it like a wildcard. If I remove the parameter and put the *, it returns all. I want the parameter available, but if they don't want to use it I would like to return all records.

  • Parameter not returning all values

    I have a crystal report built off an oracle DB.  For one parameter it is not returning all values.  I can display data or the entire table it shows me all values, but when i build a parameter it only shows me through August.  It is a date/time field.

    check the following thread
    [Dynamic Parameter only showing 1000 records when Crystal report is run.;
    regards,
    Raghavendra.G

  • Using index in a query return few records than full table access

    Today we have an issue with a query, when it use the ok index the returned are not all records that apply to where clause condition.
    See bellow
    explain plan for
    select * from movdb.zan_m03 where
    M00AF = TO_DATE('11/01/28','YY/MM/DD') AND
    M00za = 10 AND
    m00AC = 50 AND
    M00AD between 136906 and 136999
    SELECT * FROM TABLE(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 1882720105
    | Id | Operation | Name |
    | 0 | SELECT STATEMENT | |
    | 1 | TABLE ACCESS BY INDEX ROWID| ZAN_M03 |
    |* 2 | INDEX RANGE SCAN | PK_ZAN_M03 |
    Predicate Information (identified by operation id):
    PLAN_TABLE_OUTPUT
    2 - access("M00AF"=TO_DATE('11/01/28','YY/MM/DD') AND "M00ZA"=10 AND
    "M00AC"=50 AND "M00AD">=136906 AND "M00AD"<=137141)
    filter("M00AD"<=137141 AND "M00AD">=136906)
    Note
    - rule based optimizer used (consider using cbo)
    20 rows selected.
    The query above return only one row insted 1579 record that apply to this conditions.
    When forcing a full table acess with a hint, the query return all records that apply, the 1579 record.
    select /*+ FULL(zan_m03) */ M00AF, M00za, m00AC , M00AD from movdb.zan_m03 where
    M00AF = TO_DATE('11/01/28','YY/MM/DD') AND
    M00za = 10 AND
    m00AC = 50 AND
    M00AD between 136906 and 137141
    Can you help me to identify what's happening?
    I am with Oracle 10g R2 10.2.0.4 standard edition
    the statistics are up to date
    the opitimizer_mode are rule, but altering in session level to all_rows happens the same issue.
    Nothing about corruption in the alert log.
    Thanks in advance
    Regards
    Cristiano

    Yes the query are the same and correct restriction for where clause are M00AD between 136906 and 137141.
    I've pasted, by mistake, another test query
    The corrects are:
    select M00AF, M00za, m00AC , M00AD from movdb.zan_m03 where
    M00AF = TO_DATE('11/01/28','YY/MM/DD') AND
    M00za = 10 AND
    m00AC = 50 AND
    M00AD between 136906 and 137141
    This use pk index and return one row
    select /*+ FULL(zan_m03) */ M00AF, M00za, m00AC , M00AD from movdb.zan_m03 where
    M00AF = TO_DATE('11/01/28','YY/MM/DD') AND
    M00za = 10 AND
    m00AC = 50 AND
    M00AD between 136906 and 137141
    This does a full table access and return 1579 records
    I´ve been searching for wrong results bugs on my oracle support, but not found one that mentions something like our issue.
    I checked the dba_tables and dba indexes and the number of rows are different, and I think this would be the same because it's is a pk.
    Look this
    SQL> select NUM_ROWS from dba_tables where table_name = 'ZAN_M03'
    2 /
    NUM_ROWS
    228527878
    select NUM_ROWS from dba_indexes where index_name = 'PK_ZAN_M03';
    SQL> select NUM_ROWS from dba_indexes where index_name = 'PK_ZAN_M03';
    NUM_ROWS
    217510185
    Is normal a index for pk having much fewer rows than table? I think not, but not sure.
    Again
    Thanks in advance
    Regards
    Cristiano

  • Display all record in case of null parameter OR selecting "ALL"

    hi all,
    I want to show the all records in the report in case the user give empty parameter Or "ALL" from the parameter list.
    I used such the way in the query:
    select item
    from item_master
    where ITEM_ID = NVL(:P_ITEM,ITEM_ID);
    its working good but now I want to give the "ALL" in the list of parameter form. so when the user select the "ALL" then the all items to be displayed.
    thanks
    Muhammad Nadeem
    [email protected]

    Hello,
    You can use the following SQL Query :
    select item
    from item_master
    where (:P_ITEM='ALL' or ITEM_ID = NVL(:P_ITEM,ITEM_ID);)
    as long as :P_ITEM has a "type" compatible with a string ...
    Regards

  • LOV an SQL : how to configure a select list to get all records

    Hello,
    I am using Oracle 10g with APEX 2.0.
    Here is my question:
    I have a report and I am using 3 text fields and a select list to search through a join of two tables. The select list is composed of a "list of values" and the parameter, which is used in the SQL-sentence, has a numeric value.
    Result table after the join operation looks like this:
    Field1 Field2 Field3 Field4 (By assuming the field3 is the one which used in the select list.)
    21a this 1000 bn
    21a that 1001 vb
    33c thus 1012 ct
    What I want to do is to set another parameter-value pair in the select list to let user choose the "ALL" of the mentioned items in the select list so that the search will return all the records without having taken this select list-field into consideration.
    Is it possible to do it with LOV and SQL? Do I need any other functions? or configurations?
    Thanks in advance,
    Sedef

    Hi user630478!
    I always use a select list with submit and the option to get a NULL-Value for such things. To solve your problem do the following things:
    1.) Create two named LOVs. One as you already did and another one for all values.
    2.) Your select list with submit should be configured to show a NULL-Value e. g. it shows ALL with the value 0.
    3.) Create two conditional branches that work together with your select list. One that show the normal results if a user has clicked on a normal value and the second should act only if a user has clicked on ALL.
    4.) Write a process that switches the LOVs in your select list from one to the other. This process should only be fired if the second conditional branch has been actived.
    Maybe if I understood right that's what you want to know.
    yours sincerely

  • Parameter Field Value returns "no records"

    I am using Crystal 11 and am new to Crystal but not to other Reportwriters.  I have a Crystal report that has 2 parameter fields, one is "Enter Date" that prompts for the start and end date, the other "Select Items" prompts for the supply Item Numbers to be included in the report.  In the "Edit Parameter: Select Items:" edit/create parameter dialog, the Select Item parameter has "Allow Multiple values" and "Allow discrete values" set to true. The report runs fine and returns any items entered in the "Select Items" prompt that has usage during the start & end date.  My problem is ... if the entered Item Number for the Select Items parameter returns no records, I cannot report that Item Number as having zero usage.  I cannot find a way at the time of report running to identify and report the "not found" items.  I would also like to report the Start and End Dates parameters requested, but cannot, the Enter Date parameter returns an empty parameter field across the whole report.  I'm sure other users have had this problem of reporting the requested parameter values.   Need assistance.  

    Jeff's answer is one way to do it.  There are others:
    If you want the items with no data interspersed with the other items (say, in item number order), then you'd change the report to use your item master table and do a left join from that to the usage data.  If a field from the usage table is null, then there was no usage, and you can condition a message based on that.
    Or, if your parameter selects item numbers without some type of "ALL" option, then you can use arrays to keep track of which if the selected items printed.  Then in the report footer, compare the list of items reported to the parameter items, and show which item numbers had no usage.  (This might run a tad faster than the separate subreport that Jeff suggested - but maybe not...)
    HTH,
    Carl

  • Retrieve All records and display in Report using CAML query in Report Builder if Parameter value is blank

    Hello Experts,
    i have created a report where i have one parameter field where user will pass parameter(e.g. EmpId). As per parameter record will fetched to report if no parameter is passed then it will display all records. I have done it by taking SqlServer Database as datasource.
    by using Following method
    Now i would like to do it by taking Sharepoint List as Datasource. For that what would be the CAML Query.
    Here is my existing CAML query.
    <RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ListName>Employees</ListName>
      <ViewFields>
        <FieldRef Name="Title" />
        <FieldRef Name="FirstName" />
        <FieldRef Name="LastName" />
        <FieldRef Name="FullName" />
        <FieldRef Name="UserName" />
        <FieldRef Name="Company" />
      </ViewFields>
      <Query>
        <Where>  
    <Eq> 
        <FieldRef Name="Title" />
      <Value Type="Text">    
       <Parameter Name="EmployeeId"/>    
    </Value>
    </Eq>                  
        </Where>
      </Query>
    </RSSharePointList>
    The above code is working if i am passing an employeeId to Parameter. If nothing is passed, it is Not retrieving any record.
    Please suggest
    Thank you
    saroj
    saroj

    Your problem follows the well-established pattern of using an "All" parameter filter in SSRS. There are a few approaches depending on the size of your data. The easiest one is to return all data from CAML and then filter it within SSRS, the following thread
    provides some examples,
    http://stackoverflow.com/questions/18203317/show-all-records-some-records-based-on-parameter-value.
    Other options include passing all of the possible values within the CAML query when "All" is selected, using multiple Report Files to distinguish between both CAML queries, or to use multiple datasets with some logic to show/hide the correct one.
    Dimitri Ayrapetov (MCSE: SharePoint)

Maybe you are looking for

  • Managing two iTunes users on one computer - a complicated scenario.

    Here's my situation: I have two users/accounts on my computer. Each user wants access to all the media (music, podcasts, etc) on the computer. However, there are a few specific constraints: 1) Each user's instance of iTunes should only display the me

  • Blackberry volume rocker

    I have BB 8520 i have a problem with the down volume button......when on the homescreen when i press the down volume HI come and in the music player the music does not lower down while pressing also Y is that

  • Regarding function module in update task

    Hi, I have a function module(Zxxx) which is update type. i have called the fun.module in my program (Zyyy) using the syntax CALL FUNCTION ZXXX IN UPDATE TASK. As I suppose to debug the function module, I activated the update debugging in the debuggin

  • Loading Period 0 - Time Period

    Have a question in Hyperion Planning. We have a Time Period Dimension with two Children (Beg Balance and Year Total). Year Total has the usual childeren (Q1, Q2, etc) and the Q's have the usual children (Jan, Feb,...Dec). Where do people load Balance

  • FCP export to XDCAM HD (PDW-F70)

    I am having an issue exporting my FCP sequence to my PDW-F70 xdcam hd deck. I am getting a failed export alarm , "record inhibit on", but record inhibit is OFF on both the disk and the deck. I can see the disk in the finder but it comes up as read on