Regarding Date Range parameter

hello,
in purchase order, i want to pass date range parameter. For eg .
I want to fetch data from 21/11/2011 to 25/11/2011
how to pass parameter for this?? or do i need to create any formula??
if yes then how/???????
awaiting for soonest reply.

hi,
you need to do this in the Formula workshop.
this formula {OPOR.DocDate} = {?DateRange}
{OPOR.DocDate} - this is the PO DocDate
{?DateRange} - this is what you have done in step #4 in my 1st post. in this example "DateRange" is the name of my Parameter.
Quote from you post
{OPOR.DocDate} = {?25/11/2011 to 30/11/2011} In this way should i write a formula??????
change this {?25/11/2011 to 30/11/2011} to the name of your Parameter. refer to step #4.
regards
Fidel

Similar Messages

  • Date Range Parameter's Restriction

    Could you someone please tell me how BO restricts date range parameter when the users tries to run a query?  Often times, users simultaneously try to get several years of data dumped into a single query.  Some users even forget to enforce the date range, which causes the query to try to get the data from the beginning of time. 
    How do we as a BO developer create some sort of date range restriction so that it can prevent users from overloading a query?  If the users want to get several years of data, he/she has to run a query in batches instead of doing it all at once.
    I hope there is a way that we can create a custom informational error message for each report to prevent users from trying to query too many months or years of data.  Some reports may hit small and well-indexed tables that allow large date range queries.  But, some reports query against large and poorly indexed tables, which can potentially cause adverse effect on performance without date range restriction. 
    Any thoughts or advices on how to implement such things (if possible).  I am also afraid that the answer will be "currently not doable".  If so, any ideas if the next version of BO will allow such functionality, or if it is at least in the plan at all?  Thank you so much for your insight and sharing.  Have a great day!

    Dear Amr,
    Thanks so much for your quick reply!  The field I want to create a restriction on is called RESULT_DT_TM.  When I saw the "where" section of the field, I just don't see how I can apply my START_DT_TM and END_DT_TM parameters on this field so that START_DT_TM and END_DT_TM cannot be more than 365 days apart.  If my query does not use parameters called START_DT_TM and END_DT_TM, this "where" section will not be valid? 
    I don't think the solution has to be on the field itself but rather on the parameter START_DT_TM and END_DT_TM.  What I want is that as long as START_DT_TM and END_DT_TM are more than 365 days apart, it does not matter what field these parameters are running against. The screen would then display something saying "your date range parameters for this report must be within 365 days.  Please revise your date range on query".
    Sorry, I am PL/SQL report programmer, and not familiar with what BO can do.  So, is there anyway that can make my dream come true?  Thanks a bunch again, Amr.

  • Pass date range parameter  to SQL stored procedure.

    Hi,
    I'd like to pass a date range parameter from Crystal Reports to a sql stored procedure. Does anyone know if this is possible?
    I've had no problem passing standard datetime (single value) paramaters to and from but am struggling with getting a range value parameter to work.
    Environment: Crystal Reports 10/XI and SQL 2000 MSDE version or SQL 2005 Express Edition.
    Any help would be appreciated.

    C5112736 wrote:>
    > And then these 2 formulas 'Formula # 1' and 'Formula # 2' can be used to pass on to the stored procedure.
    Can someone please demonstrate exactly how to use formula results as date parameters to a SQL stored procedure?  Keep in mind, there are two parameters to the stored procedure.
    I have gleaned this much: Use Add Command and insert the procedure with
    EXEC ServerName.dbo.usp_sprocName;1 '{?StringParameter}'
    but if I try to do
    {CALL ServerName.dbo.usp_SprocName({@Formula1},{@Formula2})}
    then it gives the error "No value given for one or more required parameters". 
    Both of the parameters are VARCHAR(50).
    I have finally found this link: [http://msdn.microsoft.com/en-us/library/ms710248(VS.85).aspx|http://msdn.microsoft.com/en-us/library/ms710248(VS.85).aspx]
    This Microsoft site defines the format of the ODBC escape sequences, but I still do not know how to convince Crystal to insert it's parameter results or formula results.
    Pulling what's left of my hair out . . .
    ~ Shaun

  • CR 2008: Setting currrentdate as default begin date in a date range paramet

    I have a Crystal Report with a date range parameter.
    How do I set the Begin Date to be todays date ?
    I am using a Universe as the data source.
    Thanks,

    Hi Rajesh,
    1) Is the prompt a constant value?
        If yes then type "1900/01/01" in the from value as default value. And in the report selection formula should look similar to this :
    DateVar DateParamValue:-
    If   = Date(1900,1,1)  Then
        DateParamValue := CurrentDate
    Else
        DateParamValue := {?DateParam};
        {Table.DateField} = DateParamValue;

  • Using Date Range parameter in Subreport Selection Formula

    I have a subreport which includes this line in the selection formula:
    {Production.Date} = {?Pm-?DateRange}
    {?Pm-?DateRange} appears in the Subreport Links window, so it seems like it should work.
    The DateRange parameter is set by the user in the Main report.
    But the subreport returns no records.
    I tried this:
    In the Main report I created a StartDate and a StopDate field from {?Pm-?DateRange} .
    Then in the subreport selection formula I used these two formula fields like this:
    {Production.Date} >= @StartDate
    and
    {Production.Date} <= @StopDate
    This works!
    So I have found a workaround, but still, I don't understand why the original code {Production.Date} = {?Pm-?DateRange} returns no records.
    Thanks,
    Art

    Hi Art,
    You cannot use a date range parameter directly in the subreport's record selection formula.
    You'll need to create a formula in the Main report like this:
    Minimum(?DateRange) //This gives the start date
    Maximum(?DateRange) //This gives the end date
    Then send these formulas as parameters to subreport for use in the record selection formula.
    I think you've already got this figured out anyway!
    -Abhilash

  • How would you send a date-range parameter to a SQL sproc?

    Team,
    MY ENVIRONMENT
    SQL 2005, Crystal Reports for Visual Studio 2005
    MY PROBLEM
    I am authoring both a sproc and a report, so I have full control over the design. I am a SQL expert and also a Crystal 8.5 expert.
    I have done the Sproc-Report connection dozens of times.
    Please consider along with me the sequence of creating a report based on a parameterized stored procedure.
    My sproc header is shown here:
    CREATE Procedure dbo.usp_DocumentActivityReport(
         @Department NVARCHAR(50)      
       , @DateRange  NVARCHAR(50)
    ) AS
    SELECT Col1, Col2, Col3 FROM #TEMP
    MY THOUGHT PROCESS
    @DEPARTMENT is a string. That's easy.
    @DATERANGE is a DATE RANGE and I don't know how to get Crystal Reports to prompt for a date range, so I used a String parameter knowing I can parse a specially formatted string, and knowing that I can use a formula to compute the string.
    Step 1. Create the blank report, the {?Department} parameter, the {?CreationDateRange} report parameter, and the {@DateRangeText} conversion formula that converts {?CreationDateRange} to the specially formatted string.
    Step 2. Test the stored procedure.
    Tests pass; It returns data when I run it with values, with zero-length string values, and with NULL values.
    Step 3. Tie the report to the stored procedure.
    Adding the sproc directly creates two hard-wired, undeletable parameters, and returns data columns. That's no good because the user must supply the specially formatted string for the date range. So, I try using Add Command instead, with this syntax:
    {call "EXP_TEST"."dbo"."usp_CorroDocumentActivityReport" (N'{?Department}', N'{@DateRangeText}')}
    This code is accepted, but Add Command did not create any undeletable parameters at all. I guess that's OK.
    But the worst part is that it does not show any output columns with data either! AAARGH!
    Please assist with showing me the proper order to do these steps.
    BTW, here's the VB Syntax formula for {@DateRangeText}:
    Dim min As String
    dim max as String
    if HasLowerBound ({?CreationDateRange}) then
      min = ToText(Minimum({?CreationDateRange}),"MM/dd/yyyy")
    else
      max = ""
    end if
    if HasUpperBound ({?CreationDateRange}) then
      max = ToText(Maximum({?CreationDateRange}),"MM/dd/yyyy")
    else
      max = ""
    end if
    if IncludesLowerBound ({?CreationDateRange}) then
      min = "[" & min
    else
       if HasLowerBound ({?CreationDateRange}) then min = "(" & min
    end if
    if IncludesUpperBound ({?CreationDateRange}) then
        max = max & "]"
    else
       if HasUpperBound ({?CreationDateRange}) then max = max & ")"
    end if
    'formula = min & "..." & max
    formula = "(1/1/2009...3/1/2009)"
    sorry ... cross-posted per Amit

    Ludek,
    It sounds like you and The specified item was not found. think along the same lines! I have cross-posted for both of you now!
    Please see Simple Sproc Parameters question
    ~ Shaun

  • Date Range parameter

    Hello Everyone,
    I want to create a parameter for date range (From , thru) where the user can put the dates he want to to get the information of the project.
    Pls suggest me.
    Suhana

    Thanks Sathish and Abdul,
    But I forgot to mention one thing.
    I have a subrepor with in this report and I want the date parameter to display so that the user can select the dates and get the information in the subreport.
    For this i think i will have to create a parameter in the main report and then link the subreport.
    But my only concern is where to write which formula. In the record selection of main report or the record selection of subreport.
    Thanks a lot
    Edited by: Suhana01 on Apr 26, 2009 10:38 PM

  • Date range parameter in heading

    Post Author: hstevens
    CA Forum: Formula
    Given that I've successfully set up a parameter to prompt for a date range, can I now somehow use that in a heading?  Is there someway to extract the dates from that? Or do I have have to set up two parameters - one for the beginning and one for the end date?
    Thanks.

    Post Author: Jean Antoine
    CA Forum: Formula
    To see all values entered, you would need to read and display every element in the array (multivalue).  Something like this:
    StringVar MVpos;
    NumberVar nMaxLen := UBound(multivalue parameter); // sets the upper limits for the values the user entered
    FOR i:=1 to nMaxLen Do
    If i=1 Then
          MVpos := multivalue parameter&#91;i&#93;
    Else
          MVpos := MVPos ', ' multivalue parameter&#91;i&#93;;
    Here, multivalue parameter represents the parameter you've created.  You can place this formula in your header and see every entery entered.
    Best of luck!

  • Dynamic Date Value for Date Range Parameter - Scheduling in BI

    Hi,
    I am New to BO Enterprise XI R3. I want to schedule the Crystal report which takes Date Range as parameter. Is any option available to calculate From Date automatically based on Current Date based on the range required?
    Currently, Parameter option accepts parameters and enterprise process the report for configured parameters. In this case, report always prints only for configured date range eventhough report generated after one month. I am expecting report has to print data for date range (eg. 1 weeks, 4 days, or any range) based on system current date.
    Thanks in Advance,
    Venkateswaran.P

    I'm am in the same situation.  I need to be able to have the date parameter dynamically change based on the current day's date when I schedule a report.  However, because this parameter comes from a Stored Procedure from the database, it cannot be modified in the Report Designer (as far as I know).  I've tried to set a default for it to use "currentdate" but it doesn't seem to take.  Anyone know if this can be accomplished in the scheduler?
    Thanks
    -Tom

  • Disbaling No upper/lower bound value in a date range parameter

    Hi folks,
    When i added a new parameter with a date range , i can see two check boxes 'No lower value' and 'No upper value' along with 'include value' checkbox in the parameter dialog.
    Is there any way to disable these check boxes?? If i cannot disable check boxes and when i select no lower value check box some random date value get returns to the query and the SQL query is giving no results and also i cannot set to a default lower and upper date range too.
    Please help me in resolving this.
    Thanks in advance.

    These features are respective to the range component. If you do not need them, I would suggest that you use two date parameters. One date parameter can act as your low date parameter, and can have it's own default date. The other parameter can act as your high date parameter, and can have it's own default value.
    The only change essentially, in the way the report runs, should be some minor changes to formulas, for example instead of having a selection criteria formula that says in {?DateRange}, you would now say >= {?StartDate} and <=
    Edited by: Kyle McAdam on Aug 15, 2008 6:31 PM

  • Regarding date ranges in search criteria in oracle forms

    I am using employee number,name, person type, and date ranges as search criteria in custom form.
    when I enter employee number, hit the find button, I am getting the exact info in the result block.
    Result block contains
    employee name,personid,emp numb,org,start_date.
    Similarly when I enter employee number,dept, I am getting correct values.
    My question here is, when I enter date range. Iam unable to filter data.
    When i enter START_DATE between nvl(:BLOCKNAME.START_DATE,'01-JAN-1901') and nvl(:BLOCKNAME.END_DATE,'31-DEC-4712') at where clause in the result block. I got data for the date range also.
    if I give condition in the where clause, results are taking so much time when i search with employee name,number,dept,person type.
    If i query with date, persormance is good.
    Do u any know,how to prevent START_DATE between nvl(:BLOCKNAME.START_DATE,'01-JAN-1901') and nvl(:BLOCKNAME.END_DATE,'31-DEC-4712') when we search with employee name,number,dept,person type.

    Initailly Ididnt given any code in the where clause of the result block. I got data in the result block when i search with employee name,number,person type,dept etc except date range.
    If i give date range, irrespective of the date, getting all the data.
    after that i added code to the where clause of the result block. Now i am getting data for everything.
    like, when i query with employee name,number,even date range also.
    My question here, performance.
    when I query with date range, data is coming in expected time in the result block.
    when i query with dept, taking much time since date range logic exist in the where clause of the result block.
    I need to restrict the where clause only to the data ranges. Where clause should not necessary for employee number,name,person type dept search criteria
    Tahnks for your reply

  • Query regarding date range

    Hi I am using below query
    select count(*) from
    select M.Login_name
    , P.IND_PROD_LOGIN_ID
    , count(P.IND_PROD_LOGIN_ID) over (partition by P.IND_PROD_LOGIN_ID) cnt
    from CITI_USER_2.CCS_CUSTOMER_MAST M
    , CITI_USER_2.CCS_CUSTOMER_PROD P
    WHERE M.CUSTOMER_ID = P.CUSTOMER_ID and P.IND_PROD_LOGIN_ID not like '508127%'
    and to_char( M.CREATE_DATE , 'DD/MM/YYYY') = '16/10/2009'
    ) where cnt = 1
    and translate(Login_name,'x0123456789','x') is null
    and i got the result as 10 records but if i try to put in the date range as below
    select count(*) from
    select M.Login_name
    , P.IND_PROD_LOGIN_ID
    , count(P.IND_PROD_LOGIN_ID) over (partition by P.IND_PROD_LOGIN_ID) cnt
    from CITI_USER_2.CCS_CUSTOMER_MAST M
    , CITI_USER_2.CCS_CUSTOMER_PROD P
    WHERE M.CUSTOMER_ID = P.CUSTOMER_ID and P.IND_PROD_LOGIN_ID not like '508127%'
    and to_char( M.CREATE_DATE , 'DD/MM/YYYY') between '16/10/2009' and '17/10/2009'
    ) where cnt = 1
    and translate(Login_name,'x0123456789','x') is null
    i got the result as 653 records
    But it should be 10 only and when i check the records it is giving me wrong result.
    Can someone highlight how to use the range between the date, i need to check the number of records between the date range from 01/05/2009 to 01/10/2009

    this is all happening because of
    to_char( M.CREATE_DATE , 'DD/MM/YYYY') between '16/10/2009' and '17/10/2009'in your second query...
    that is doing a string comparision not date comparision...
    in string comparision
    check this example...
    select * from dual where '17/10/2009' > '16/10/2010'which will result a record but you might also observe that 17 th in 2009 is less than 16th of 2010. this is because here string comparision is ocurring.
    you need to change it as....
    M.CREATE_DATE between to_date('16/10/2009','DD/MM/YYYY') and to_date('17/10/2009','DD/MM/YYYY')so your query becomes...
    select count(*) from
    select M.Login_name
    , P.IND_PROD_LOGIN_ID
    , count(P.IND_PROD_LOGIN_ID) over (partition by P.IND_PROD_LOGIN_ID) cnt
    from CITI_USER_2.CCS_CUSTOMER_MAST M
    , CITI_USER_2.CCS_CUSTOMER_PROD P
    WHERE M.CUSTOMER_ID = P.CUSTOMER_ID and P.IND_PROD_LOGIN_ID not like '508127%'
    and M.CREATE_DATE between to_date('16/10/2009','DD/MM/YYYY') and to_date('17/10/2009','DD/MM/YYYY')
    ) where cnt = 1
    and translate(Login_name,'x0123456789','x') is null check your answer and get back.
    Ravi Kumar
    Edited by: ravikumar.sv on Oct 16, 2009 3:12 PM

  • Date range to be displayed  & Displaying multiple values on the report

    Hi,
    I have date range parameters, but I also need it to be displayed it on the report. Is there any way I can display it. E.G If a parameter is created one can drag and drop it on the report if it needs to be displayed on the report, I tried to do the same for the date range parameter but it does not work.
    Also If a parameter is created by selecting the option 'Allow Multiple Values', and if you drag and drop it on the report only the first value is displayed and the rest does not show. Has anyone tried this before and been successful in displaying multiple values in the report.
    Thanks in advance.

    Hi,
    A multi-value parameter is actually treated as an array in Crystal Reports.
    To display the values selected in the parameter, create a formula from the Field Explorer and type this code:
    Join({?ParameterName},",");
    Place this formula on the header or the footer sections of the report.
    Regarding the date range issue, please follow Sastry's advice and it should work fine.
    Make sure you're using the parameter in the Minimum and Maximum functions. For eg: If I was to create a date range parameter called OrderDate, my formula to show the start date would look like this:
    Minimum({?OrderDate})
    -Abhilash

  • Data between Date Range with Business Days only

    Hi All,
    We have a requirement that we need to retrieve data between a data range, providing From date and To date as input.
    We also have the option to Include Business Days Only through a check box which will be passed to CR 2008 through a report frame work.
    Can some one help me how to display the report data within the Date Range entered and that includes only Business Days.
    Thanks in advance for the help.
    Regards,
    Naresh.

    try this formula. Lets if your date range parameter is {?date} then try this formula
    @startdate:
    if datepart('w',minimum({?date}))=7 then
    minimum({?date})+2
    else if datepart('w',minimum({?date}))=1 then
    minimum({?date})+1
    else
    minimum({?date})
    @enddate
    if datepart('w',maximum({?date}))=7 then
    maximum({?date})+2
    else if datepart('w',maximum({?date}))=1 then
    maximum({?date})+1
    else
    maximum({?date})
    regards,
    Raghavendra

  • Date Range  - Delete ZERO Values

    Hi All,
         Few days back I had posted Query  Regarding  Date range  where in I enter Proj# from_month, from_year, To_month and To_year.
    The output data for the project must be within this year range.
    suppose I enter proj no. 13381 and
    from_month - 05
    from_year - 2004
    To_month - 04
    from_year - 2005
    This is the Desired Output:
    yearmonth                            plan14
    200406 -
    13381 -
    100
    200407 -
    13381 -
    100
    200409 -
    13381 -
    678
    Right Now the Output what Iam getting is:
    yearmonth                            plan14
    200405 -
    13381 -
    0
    200406 -
    13381 -
    100
    200407 -
    13381 -
    100
    200408 -
    13381 -
    0
    200409 -
    13381 -
    678
    I  Just  want the NON ZERO  PLan14 values.  The PLan14 values  with '0'  should  be deleted .
    Below  is the Jist of the code.
    RANGES: S_GJAHR FOR COSP-GJAHR,
            R_YEAR  FOR COSP-GJAHR,
            R_DATE  FOR PROJ-ERDAT,
            R_MONTH FOR CKML1-POPER,
            S_OBJNR FOR COSP-OBJNR,
            S_KSTAR FOR COSP-KSTAR.
    DATA: MNT_INDX(20)     TYPE C,
          HLD_INDX(3)      TYPE N.
    DATA:  W_MTH(2) TYPE N,
           W_DATE  LIKE PROJ-ERDAT.
    DATA: BEGIN OF ITAB_OUT_TYPE,
            PERIOD(10)       TYPE C,
            PROJDEF(20)          TYPE C,
            PROJ_TITLE(20)        TYPE C,
            STATUS(20)            TYPE C,
            PROJECT_TYPE(20)      TYPE C,
            START_DATE(20)        TYPE C,
            FINISH_DATE(20)      TYPE C,
            CONTRACT(20)          TYPE C,
            CLIENT(20)            TYPE C,
            PLAN14(25)       TYPE  C,
            END OF ITAB_OUT_TYPE.
    DATA ITAB_OUT LIKE ITAB_OUT_TYPE OCCURS 10 WITH HEADER LINE.
    FIELD-SYMBOLS <FS>.
    PARAMETERS FR_MONTH(2) TYPE N OBLIGATORY.
    PARAMETERS FR_YEAR(4) TYPE N OBLIGATORY.
    PARAMETERS TO_MONTH(2) TYPE N .
    PARAMETERS TO_YEAR(4) TYPE N .
    DATA: W_TXT(20)     TYPE C.
      R_YEAR-LOW = FR_YEAR.
      R_YEAR-HIGH = TO_YEAR .
      R_YEAR-OPTION = 'BT'.
      R_YEAR-SIGN = 'I'.
    APPEND R_YEAR.
    concatenate FR_YEAR FR_MONTH  INTO R_DATE-LOW .
      concatenate TO_YEAR TO_MONTH  INTO R_DATE-HIGH.
      R_DATE-OPTION = 'BT'.
      R_DATE-SIGN = 'I'.
      APPEND R_DATE.
    SELECT * FROM COSP
                 WHERE OBJNR = PRPS-OBJNR    AND
                  GJAHR IN R_YEAR     AND
         KSTAR BETWEEN '0000400996'    AND '0000400999' AND
          VERSN = '014'                               AND
          WRTTP = '01' .
          DO 12 TIMES.
            W_MTH = SY-INDEX.
            CONCATENATE COSP-GJAHR W_MTH  INTO W_DATE.
            CHECK W_DATE IN R_DATE.
            PERFORM CONVERT-DATE1 USING W_DATE.
            MOVE HOLDDATE1  TO ITAB_OUT-PERIOD.
            HLD_INDX = SY-INDEX.
            CONCATENATE 'COSP-WKG' HLD_INDX INTO W_TXT.
           ASSIGN (W_TXT) TO <FS>.
        CLEAR ITAB_OUT-PLAN14.
        ITAB_OUT-PLAN14 = ITAB_OUT-PLAN14 + <FS>.
    APPEND ITAB_OUT.
    enddo.
    ENDSELECT.
    I need  all positive values  of  the month  that are in the range.   The Zero values  must be deleted .  How  can i do that.  PLease  do let me  know.
    Thanks in advance
    Dan

    You can do this easily just by deleting all records in one shot.
    delete ITAB_OUT where plan14 = 0.
    You can put that statement after the SELECT...ENDSELECT.
    Or you can not even add them to the internal table at all.  You can check before you APPEND to the table.
    CLEAR ITAB_OUT-PLAN14.
    ITAB_OUT-PLAN14 = ITAB_OUT-PLAN14 + <FS>.
    <b>If itab_out-plan14 > 0.
    APPEND ITAB_OUT.
    endif.</b>
    enddo.
    ENDSELECT.
    Regards,
    Rich Heilman

Maybe you are looking for

  • TS3694 Problem in update OS 5 to OS 6 after update to Itunes 10.7 and Mac OS 10.8.2

    I updated the Mac OS to the 8.2 and now when I tried to update the OS 5 to the OS 6 I'm without my 2 devices the Iphone and the iPad. ITunes is asking me to restore the devices... Is anybody with the same problem?

  • How to install ODBC Drivers in Oracle

    Hello All, I want to install ODBC Drivers (from Oracle vender, Not from the DataDirect ). I have downloaded the ODBC Drivers for Sparc( from official Oracle website) but while installation it is asking for DriverManagers Installtion.. Where Can I get

  • Cannot ping ibook with multiple admin accounts

    i am trying to set up remote control across a LAN, and have had success with two iMac G5's controlled from my dual G5. the problem is that i can't connect to an iBook with exactly the same settings and firewall config. in trying to troubleshoot, i ha

  • Withholding Tax on Net Amount

    Dear All, What are the configuration required for calculation of wtax on net amt. Normal Scenario The system calculates wtax as below Professional Exp 100/-   To Vendor 90/-   To TDS  10/- But the Required Scenario as below Professional Exp 110/-    

  • Can't install new release - Error 2753 Ref pxsetup.exe ?

    I ran into problems trying to uninstall Lightroom Beta. In the end, I did a manual delete, followed up by a "regedit" search for anything 'Lightroom' had left behind in the registry. Then I swept the machine using Ccleaner (great free utility at www.