Selection formula not selecting by dates

I'm having an odd problem with my report. I'm trying to filter by the start date of a job. The DB I'm pulling from stores it as a string, YYYMMDD (e.g. today is 20090713). In most of my reports it works just fine, but in this one it seems that it's ignoring the filter altogether.
My original selection formula was:
{JobMaster.StartDate} IN {?FromDate} to {?ToDate}
In an effort to 'fix' it, I changed it to:
DateSerial(ToNumber(Mid({JobMaster.StartDate},1,4)),ToNumber(Mid({JobMaster.StartDate},5,2)),ToNumber(Mid({JobMaster.StartDate},7,2))) >= DateSerial(ToNumber(Mid({?FromDate},1,4)),ToNumber(Mid({?FromDate},5,2)),ToNumber(Mid({?FromDate},7,2)))
AND
DateSerial(ToNumber(Mid({JobMaster.StartDate},1,4)),ToNumber(Mid({JobMaster.StartDate},5,2)),ToNumber(Mid({JobMaster.StartDate},7,2)))
    <= DateSerial(ToNumber(Mid({?ToDate},1,4)),ToNumber(Mid({?ToDate},5,2)),ToNumber(Mid({?ToDate},7,2)))
I noticed that it even grabs jobs July, even if I pass the FromDate as 20080601 and ToDate as 20090601. The startdate I'm dealing with is 20090702.
Any ideas? Thanks in advance.

Hi Lain,
Do the following :
Create single Date parameter and in options allow range values true.  Now in your record selection you gie = {?Date}
Thanks,
Sastry

Similar Messages

  • Dimensions set to Selectable are not selectable w/in Smart View Data Forms

    When trying to use a data form by clicking "Select Form" in the Hyperion toolbar in Excel (not exporting from webspace), Dimensions that are defined as Selectable are not actually selectable within Smartview. Below is a portion of the script:
    BackgroundPOV=S#***.Y#***.w#***.V#***.I#***.C4#***
    SelectablePOVList=P{***}.E{***.[Base]}.C1{***.[Hierarchy]}
    Within the web, the form works fine and everything selectable is selectable. Within smart view, only Entity is selectable. Any insight would be greatly appreciated.
    SV Version 11.1.1.3.500
    HFM 11.1.1.3
    Excel 2007
    Edited by: JL on Aug 4, 2011 12:36 PM

    I have found this and its generally because the dimension is referenced in the column
    i.e Year and period is displayed in the column.
    In HFM you can select the members from the POV but when opening in SmartView you can't
    Solution is to remove the dimension from the col or row.
    Thanks
    G

  • Help:  Need to calculate a radio button when selected or not selected

    I am hoping its possible to use a script to calculate a radio button when it is selected.  For example:
    My form has 4 grouped radio buttons (Radio Button 1-4) of 5 buttons.
    So its something like this:
         Level 1     Level 2     Level 3     Level 4     Level 5
    1.   RB1          RB1            RB1           RB1         RB1
    2.   RB2          RB2            RB2           RB2         RB2
    3.   RB3          RB3            RB3           RB3         RB3
    4.   RB4          RB4            RB4           RB4         RB4
    Items areas total:               Total Points:               Average Score:
    The buttons already have different values set for each button to calculate a score in the "Total Points" text field. (Level 1 scores 1, Level 2 scores 2, etc.)
    I would like to have the "Items areas total" text field to calculate either a value of 1 if selected or a 0 if not selected.  So if 3 of the 4 rows are selected a return of "3" is calculated, if all 4 rows are selected then it returns "4", etc.
    Seems it would be a simple script.
    Thanks

    Hi Franklin,
    I understand that we can show the selected row in different color.
    But still there is a requiremnet given saying that there should be an radio button or Select button or check box (Checked only one at a time of several rows) apart from showing the selected row in a different color.
    Current display of the page:
    We have three regions, 1> Main region, 2> Master region, 3> Detail region.
    Main region has some text parameters, Master region has a adf:table and when ever you select a row on the master region the detail region values are getting refreshed based on the row selected.
    Is there any simple way apart from adding a boolean transient attribute to VO and displaying it as one of the column in adf:table?
    Thanks,
    Sandeep

  • Not IsNull in Selection Formula not working

    Hi,
    I'm trying to select all the Not IsNull values for a field but I'm not getting the correct results:
    I have 2 parameters. If {?AssignedTo} Param is blank and {?r_AllAssigned} = True I want to return only the values that are NOT Null for {BI_RESOURCE_REF.BI_RESOURCE_NM}
    Any ideas?
    if Hasvalue({?AssignedTo}) then
    {BI_RESOURCE_REF.BI_RESOURCE_NM} = {?AssignedTo}
    Else if (Not hasValue({?AssignedTo}) and {?r_AllAssigned} = False) then
    IsNull({BI_RESOURCE_REF.BI_RESOURCE_NM}) = True
    Else if (Not hasValue({?AssignedTo}) and {?r_AllAssigned} = True) then
    Not isNull({BI_RESOURCE_REF.BI_RESOURCE_NM})

    Hi, 
    Normally I'd recommend breaking this formula down into three parts and see if  you get the results you expect.  If you do then add each part back in and test the result. 
    Instead of checking for NULL, check for an empty string.  I changed your formula to do this.  It's possible the data isn't a null. 
    if {?AssignedTo} &lt;&gt; "" then
        {BI_RESOURCE_REF.BI_RESOURCE_NM} = {?AssignedTo}
    Else if ({?AssignedTo} = "") and ({?r_AllAssigned} = False) then
        {BI_RESOURCE_REF.BI_RESOURCE_NM} &lt;&gt; "" 
    Else if ({?AssignedTo} = "") and {?r_AllAssigned} = True) then
    {BI_RESOURCE_REF.BI_RESOURCE_NM} &lt;&gt; "";
    Good luck,
    Brian

  • In RSA3, Data Selection is not Restricting the Data

    Hi Guys,
       In RSA3, if check the entries after providing the Selection Criteria, it is extracting all the Data.
    I tried for OSS Note. I didn't find any?
    Please refer this information:
    We load data from a source system EBP (similar to R3) to our BW system. The four ODSs (targets) we are using are:
    0BBP_SC (Shopping Cart - Individual Documents)
    0BBP_SCA (Approval Process for Shopping Cart - Single Documents)
    0BBP_INV (Invoice - Single Documents)
    0BBP_CON (Goods/Services Confirmation - Single Documents)
    And the four Datasources related to the above respectively are:
    0BBP_TD_SC_1
    0BBP_TD_SC_APPR_1
    0BBP_TD_INV_1
    0BBP_TD_CONF_1
    In the four InfoPackages related to the above, we use company code 0COMP_CODE (which corresponds to EBP field CO_CODE (Company Code in FI System) as data selection and the range, e.g., from X100 to X200, but somehow other company code ranges of data get in, e.g., Q001, Q100, 1000, and etc. What would cause the problem?
    Thanks
    Nagesh.

    Can you just try giving only one value instead of range and see what it comes?
    Ex: Company code = X100?
    regards,
    Hari

  • Select statement not returning correct data

    I'm working on an application and I'm having a weird problem. The application connects to an Oracle database, pulls out some data, and does something with it. In the process of testing I've already read and dealt with some rows. On those rows the UPDATE_FLAG field was changed to a N so they wouldn't be selected again.
    I do want to select those rows again, so with SQLPlus I changed the UPDATE_FLAG back to Y. Now here's the strange part. The same select statement run from SQLPlus is returning thoe row I modified, but my application does not.
    Here's the select statement:
    SELECT * FROM MY_TABLE WHERE UPDATE_FLAG = 'Y' and USER_ID like 'B%';
    When I run this I get a row back called Brian.
    In my application I do this:
    try
                   Class.forName("oracle.jdbc.driver.OracleDriver");               
                   Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@server:port:sid", "username", "password");
                   Statement st = conn.createStatement();
                   ResultSet rec = st.executeQuery("SELECT * FROM MY_TABLE WHERE UPDATE_FLAG = 'Y' and USER_ID like 'B%'");
                   System.out.println("SELECT * FROM MY_TABLE WHERE UPDATE_FLAG = 'Y' and USER_ID like 'B%'");
                   while(rec.next())
                        System.out.println(rec.getString("USER_ID"));
                   st.close();
              } catch (Exception e)
                   System.out.println("Error -- " + e.toString());
                   e.printStackTrace();
                }When this runs it doesn't return Brian and there are no exceptions caught. It's like it does not find it.
    Assuming I explained this well enough, anyone have any ideas what the problem could be?
    Thanks,
    James

    I do want to select those rows again, so with SQLPlus I changed the UPDATE_FLAG back to Y. Last time I ran SQLPlus I explicitly had to do a commit after modifications, because it was creating a transaction around the sqlplus session. Of course running a query in that session would work on the modified data rather than the actual data.

  • Select is not working with date range .

    In my program doing a simple select from cdhdr table based on date range i have created but it fails .
    here is the code I am using.
    SELECT SINGLE *   FROM tvarv  INTO  wa_tvarv WHERE name EQ 'Z_SERVICE_CHANGE_DATE' .
    move wa_tvarv-low to v_date .
    move wa_tvarv-high to v_time .
    fill the date range
    *write v_date to ra_date-low  .
        move  v_date TO ra_date-low  .
    *write sy-datum to v_dateh .
        ra_date-high = sy-datum  .
        ra_date-sign = 'I' .
        ra_date-option = 'BT' .
        APPEND ra_date .
    fill the time range
        move v_time  TO  ra_time-low .
    *write sy-uzeit to v_timeh .
        ra_time-high = sy-uzeit  .
        ra_time-sign = 'I' .
        ra_time-option = 'BT' .
        APPEND ra_time .
    *Get all the records from cdhdr table for contract i.e VERKBELEG .
        *SELECT objectclas objectid FROM cdhdr INTO CORRESPONDING FIELDS OF TABLE it_cdhdr*
                                   *WHERE objectclas = 'VERKBELEG'*
                                   *AND  udate IN ra_date*
                                   *and  UTIME in ra_time .*
    above select is creating Problem .
    Help will be Appreciated .

    I wonder if you have a conflict between your date and time.  If you want all records between 3PM and 3AM the next day, that will cause a conflict.  That's because the first date should be "before" the second date, wthin a given day.
    To troubleshoot, why don't you try taking the time part out of the SQL?

  • Selection Tool Not Selecting Properly? PE 2.0

    Hi, interesting looking forum you have here! Discovered it today, and then this evening, I find a problem. Typical. At least I knew where to come.
    Anyway, working on a project tonight, using the selection tool with a large square brush, I selected a square in a block of black, and erased it using the normal eraser with a round brush set to 'pencil'. I saw it gave a clean edge on the top and left edges, but the right and bottom edges faded out outside the selection. Repeated erasings of the area did give it a nice neat line ... but outside the selection, so it wasn't square. I'm sure I must have some setting ticked and I just don't know what it is.
    Piccie below, because I don't think I explained that well. Any help you could give me would be much appreciated!

    Since it is not known what caused this unusual behavior so resetting the behavior of tools would be good idea to use the tool at its original functionality. For this click the small triangle at the upper left corner above tools and click Reset Tools and try using the selection now. If issue still persists please reset the settings from Edit->Preferences. Let me know if you have any comments.
    -Garry

  • Tree renderer - change the appearance between selected and not selected

    Hi,
    I have a JTree that I would like to show for each node different information depending on it selection status. I wrote my own renderer to create the Component to display (it is a JPanel with one JLabel in one case, and a JPanel with mulitple JLabels in the other case).
    When I run my program, the node appears ok, but when I select it the tree doesn't update the size of the composnen to be displayed, and that resualts in displaying only a fraction of the information for the selected node.
    I have tried to set the tree row height, so the tree will ignore the chached size of the renderer but it didn't work.
    Any suggestions?
    Thanks,
    Benny

    Have you tried calling tre.setRowHeight(0) - this is supposed to indicate to the tree that the renderer will determine the height of each cell.
    Never tried it, though.

  • What if I implement data level security using Selection formula?

    Hi All,
    I have a requirement to implement data level security for all the reports, the thing is, we donot have a front end application developed in java/.net or any other language, so we have only two options (as per me, if you think there are other alternatives then please share).
    1) Implement security at the database level (that is use user roles in where clause which will make the where clause really complicated and hence the performance of the query will eventually decrease).
    2) Retrieve the data with the flags of user role/permission on data. Use these flags in selection formula to select the needed records as per the user login.
    I have already in middle of implementing the second method, thought to take suggestion from you guys, I appreciate if you could tell me the drawbacks of the method I am using, and if there is an alternative method you could think of.
    Thanks,
    -Azhar

    Standaone Crystal Reports does not have any security option except to use Trusted Authentication when connecting to the DB. We use Microsofts NT or MS SQL Server Authentication only.
    Doing this in CR Designer using flags and formula will never be secure, the user could simply change the formula etc...
    Check with your DBA on how to configure AD authentication and then enable or add each user to SQL server. You may need to configure and mantain this manually depending on how you ahve your network configured.
    Thank you
    Don

  • Update form not returning correct data selection in dropdown menu

    Using CS3 DW along with SQL 2008 R2. I have a number of dropdown menus on an entry form (using VBScript/ASP) that are feed by SQL queries. All data is accepted in the entry form and writes to the table in the database without any issues. I created an Update form and based on a Rec ID clicked on from a list the Update form is presented with all the data in the correct fields except for one dropdown menu. All the other menus go to the correct selection except for the one. Spent 2 days attempting to resolve this. If I change the dropdown menu to a field the correct data is presented when the form comes up, but doesn't allow the user to make a selection from the menu. When I change it back to a dropdown menu the saved selection is not selected - just lists the entire list of items in the menu. Any help or ideas on this is greatly appreciated.

    Hello All,
    Once more thank you. I have sorted the issue out.
    I observed that I was selecting the wrong field. I selected the field matching the record set of the select instead of the field matching the record set of the table I am working as seen on the image belew
    I was selecting this - This is the record set of the table that hold values for the city select list
    Instead of this. This is the record set of the table behind the form I am working on
    My issue is now re-solved.
    Mike

  • Selection formula breaks report

    Hi all,
    I have a reporrt which basically outputs this...
    Fred Smith 0
    Tom Jones 3
    John Doe 2
    Mary Thing 0
    Peter Cupcake 1
    Now I only want to see entries that are flagged in the database with 0 so I'm trying to remove the others using this in the selection formula:
    not ({RMP.NO} in ["1", "2", u201C3u201D])
    But in Crystal this returns a blank report.
    Any ideas on what is going on here?
    Bill

    have you tried
    ({RMP.NO} ="0")
    Or Not ({RMP.NO}) in ["1", "2", "3"])
    maybe you made a mistake in ""? in the array
    Regards
    Jehanzeb

  • Selection tool not working properly

    As I am dragging the tool it is selecting as it should but as soon as I stop dragging the area I was trying to select has a bunch of random sections which are no longer selected.  When I then try to add to the selection, it simply changes which sections are selected and not selected.  I cannot get it to just select as I want it to. 
    Therefor, when I select via layer I end up with this.
    Please help.

    Your using the quick selection tool in add mode with a large brush size and who knows what other brush settings.  Try reducing the brush size and play with the other brush setting too. Look at the black dash outline your selection compared to the one on her forehead made using a smaller brush. However even with a 25% space 96 px brush I have no problem selecting the background. Try resetting your preferences.

  • Select formula works with one set of data but not another??

    Post Author: rkckjk
    CA Forum: Formula
    I have the folloing Select formula:{Sheet1_.Assign Group History} = '{"COMPUTER OPERATIONS"}' and{Sheet1_.Resolved By Group} = "COMPUTER OPERATIONS"That I'm using to select records from an Excel spreadsheet. It works fine with the Jan. 2008 spreadsheet file: Test MTTR Jan 2008.xlsbut not with the Feb. 2008 spreadsheet: Test MTTR Feb 2008.xlsWhen I use the Feb. 2008 file I get this error:"Query Engine Error:'Error code: 0x800a06ff Source: DAO.Recordset Description: this expression is typed incorrectly, or it is too complex to be evaluated."Basically both Excel files are in the same format but have different data in them. I don't understand why Jan's works, but not Feb's???
    Since, I can't upload the two files without contacting the system administrator, maybe someone can help me debug the error code or how to debug this error using another method or idea??

    Post Author: sharonmtowler
    CA Forum: Formula
    did you try each sheet while removing one of the select statements?  i would start there and try feb with no select statement, add one in, then the next
    see what is causing your problem. it sounds like some data in the xls file is in an incorrect format.

  • Saved Data Selection Formula

    Hi...
    I need some help in creating a Saved Data Selection formula. The data source is a SQL Server Stored Procedure which returns a number of fields including 16 'flag' fields which can contain either a 0 or a 1.
    The client wants to select which 'flag' fields will be used to filter the report, interactively changing the selection(s).
    Any number of fields could be selected, or just 1.
    The parameter has values 1-16 along with a description. The description is what the user sees. The parameter is named 'Indicator'
    I'm stumbling over the fact that the formula has to return a boolean.... I tried:
    if not hasvalue({?Indicator}) or {?Indicator}=0  then 1=1;
        if hasvalue({?Indicator}) and {?Indicator} = 1 and {p_rpt_Customer_AutoHigh.is_314a}
        or hasvalue({?Indicator}) and {?Indicator} = 2 and {p_rpt_Customer_AutoHigh.is_auto}
        or hasvalue({?Indicator}) and {?Indicator} = 3 and {p_rpt_Customer_AutoHigh.is_autohigh_update}
    etc.....
        then 1 = 1
        else 1=0;
    but I'm not certain how to construct the logic because at the end of all this, I need a THEN... which makes no sense...
    I've created Saved Data Selects before, but there were specific tests that were applied, for examplde....
    if hasvalue({?Parameter}) and {?Parameter}=1 then {field) in LastFullWeek
    These were discrete user selections, not multiple selections, and the 'test' was concrete - this in there!
    Any help you could provide would be welcome....

A: Saved Data Selection Formula

You don't actually have to have an If statement for this.  Your comparisons all evaluate to true or false anyways  So, what you can do is something like this:
(not hasvalue({?Indicator}) or {?Indicator}=0) or
({?Indicator} = 1 and {p_rpt_Customer_AutoHigh.is_314a} ) or
({?Indicator} = 2 and {p_rpt_Customer_AutoHigh.is_auto} ) or
({?Indicator} = 3 and {p_rpt_Customer_AutoHigh.is_autohigh_update}) or
Notice where I've put the parentheses - these are very important for getting this to work correctly.
Note also that you don't have to include "hasvalue()" in all of the lines.  This is because of the way Boolean expressions are processed.  Because of the "or", Crystal will only process until it hits the first "true" result.  If {?Indicator} doesn't have a value, it will be caught with the "not hasvalue({?Indicator})" in the first line and none of the rest of the formula will be processed.
-Dell

You don't actually have to have an If statement for this.  Your comparisons all evaluate to true or false anyways  So, what you can do is something like this:
(not hasvalue({?Indicator}) or {?Indicator}=0) or
({?Indicator} = 1 and {p_rpt_Customer_AutoHigh.is_314a} ) or
({?Indicator} = 2 and {p_rpt_Customer_AutoHigh.is_auto} ) or
({?Indicator} = 3 and {p_rpt_Customer_AutoHigh.is_autohigh_update}) or
Notice where I've put the parentheses - these are very important for getting this to work correctly.
Note also that you don't have to include "hasvalue()" in all of the lines.  This is because of the way Boolean expressions are processed.  Because of the "or", Crystal will only process until it hits the first "true" result.  If {?Indicator} doesn't have a value, it will be caught with the "not hasvalue({?Indicator})" in the first line and none of the rest of the formula will be processed.
-Dell

Maybe you are looking for