Defining Date Parameter In Crystal XI R2

Hi,
I have a simple Crystal report using basic select query from Oracle DB. I have added date prompts start date and end date for users to provide date range.
Date parameters are defined as : Type - Date, Static LOV
Allow custom values - true
Allow multile values - false
Allow discrete values - true
My problem is when I run the report
1) the date prompt asks the user to enter the format in which they want to enter date.. which appears as drop down box with only one option  mm/dd/yyyy  --- I dont want this to appear at all
To enter value Calendar appears which is ok with me.
2) If I change
Allow custom values - false
the prompt to enter format of date doesnot appear, however the prompt to enter date value has drop down list..with no calendar to it.
Please help!

Hi,
The 'Allow Custom Values' option for a date parameter is set to true by default and cannot be changed unless a 'Value Field' has been set to load the date values from the database.
You've also mentioned that the date prompt has an associated List of Values? If this is true, then this is how Crystal behaves!
Once the 'Allow Custom Values' option has been set to false, it means the only option the user is left with, is to select one or more values from the drop-down. Another important thing is that, you cannot set the 'Allow Custom Values' to true and have the date prompt (With an associated LOV) appear ONLY with the Calendar button.
If all that you want is the Calendar button with no drop-down containing date values, just select 'None' in the 'Value Field' of the date parameter.
Have a great day!
-Abhilash

Similar Messages

  • Date parameter in Crystal

    Hi Experts,
    I have a client who wants to add a from and to date in the parameter of a Invoice Crystal report.
    Here is the Parameters I have:
    {OINV.DocStatus} = "O" and
    {OCRD.CardName} = {?Customers@SELECT DISTINCT T0.[CardName] FROM OINV T0 WHERE T0.DocStatus = 'O' ORDER BY T0.[CardName]} and
    {OINV.DocNum} >= {?BeginDate@Select T0.[DocNum] FROM OINV} and
    {OINV.DocNum} <= {?EndDate@Select T0.[DocNum] FROM OINV}
    I added the OINV.DocNum, but get errors with this.
    How can I get a from and to date on the OINV.DocNum field in this crystal report?
    Thanks,
    Marli

    Gordon,
    Thanks.
    When I enter this in the Formula workshop I get the error 'There is an error in this formula. Do you want to save it anyway?', then another error 'This field name is not known.'
    Here is the full query: (I only add the OINV.DocDate part)
    {OINV.DocStatus} = "O" and
    {OCRD.CardName} = {?Customers@SELECT DISTINCT T0.[CardName] FROM OINV T0 WHERE T0.DocStatus = 'O' ORDER BY T0.[CardName]} and
    {OINV.DocDate} >= {?BeginDate@Select T0.[DocDate] FROM OINV T0} and
    {OINV.DocDate} <= {?EndDate@Select T0.[DocDate] FROM OINV T0}
    Thanks for your help.
    Marli

  • Select Date Parameter in Crystal Report

    Select fields Customer number ,Part code, transaction date, and sales amount from a table by month for a report . Report to run LastFullMonth.
    However, need to include a date that lists the first time a customer bought the part previous to and including the LastFullMonth.
    The date field in the table includes all transaction dates.
    Can this be done on the same report?

    Add an SQL Command something like (MS SQL):
    select customer, part, min(salesdate) as FirstSale
    from invoice_detail
    group by customer, part
    and link it to the other tables in your query.
    HTH,
    Carl

  • Date Parameter in BIP

    Hi
    I have compiled a report in BI publisher. As part of reports i have also configured LoVs and Parameter (Date). Whenever i open the report from Excel Analyzer and going to define date parameter for filtering. I get the following error:
    Runtime error '1004' : The name that you entered is not valid
    I have set the Date string as: yyyy-mm-date and i am entring the string as: 2009-08-26
    Even the calendar attached with Date field in BI publisher does not work properly, if i select 1 jan, 2009 from calendar then what i get in the field is 2009-14-01
    Thanks in advance for your prompt response
    Regards
    Perhiya

    Try using date format as yyyy-MM-dd and resave your report . It should work.

  • Crystal Reports Date Parameter Problem

    Hello Experts,
    I have this query in crystal, I need it to be suming the Quantity and Totals but because of the date optional its not doing that, How  I put the date parameter and remove it from her so that I can achieve my results.
    SELECT T0.[DocDate],T1.[Dscription] as 'BRANDS /SKU', Sum(T1.[Quantity]) as 'QTY', Sum(T1.[LineTotal]) as 'VALUE' FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OCRD T2 ON T0.CardCode = T2.CardCode WHERE T2.[GroupCode] = '100' GROUP BY T1.[Dscription],T0.[DocDate]
    Thanks,
    Titi

    Hi Titi,
    I don't really get what your question is but I can suggest to add the date parameter on WHERE clause. In case it's optional, you can put validation checking before entering query. When it's null you set a period of time which is relevant to current date. And as replied by GordonDu, the parameter is compare to T0.DocDate
    Hope it helps.

  • Optional Prompt for Date type parameter in Crystal Report.

    Hi Every One,
    I have a date type parameter in crystal report.When I am convert it to optional prompt it is showing following message.
    But the Type field is gray out when I was selecting list of values Dynamic.
    Please suggest.
    Thanks and Regards
    DEV

    Hi,
    Please check SAP note:
    1710595 - CR_Defining "Optional Prompt" as True for SAP Crystal
    Reports Does Not Work
    Thanks & Regards,
    Nagarajan

  • How to call user define data type as data type for concurrent parameter

    Hi All,
    i find some difficulty while creating the concurrent program.
    i.e.
    i have one of the parameter of table type i.e. user define data type at PLSql program
    now i need to register same PLSQL program into oracle applications as concurrent program
    but while i am creating Parameters for concurrent program
    How could i define that user define data type at database level in oracle applications using 'Value set' ?
    any one save me from this Problem
    thanks and Regards,
    sai krishna@cavaya.

    Don't think this can be done..
    One way I can think of is to wrap your PL/SQL program under another procedure/package that can accept "normal" parameter,and use/register this wrapper instead of your original pl/sql program.
    HTH

  • Crystal Reports Date Parameter Default Value OPtion Empty

    Is there a way to set a default date value for a Date Parameter? It is shown empty, it only allows to set a fixed date, i.e. 10/10/2013. But it doesn´t allow me to use a formula (which has a CurrentDate inside), so I can set, for example, today's date as default.
    How can I achieve this? I´m not using Crystal for Enterprise. I'm using Crystal Reports, the normal version.

    Hi Erika,
    The feature is only available in CR for Enterprise at the moment.
    If you're OK with selecting the currentdate from the dropdown, here's a workaround:
    1) Go to the Database Expert > Click the Connection Name > Select 'Add Command' > Type in a simple sql query that returns today's date. Example for oracle would be:
    Select SYSDATE from DUAL
    2) Don't link this Command Object with other tables on the report
    3) Create a new Parameter > Select 'Dynamic' under 'List of Values' > Under the 'Value' column choose 'SYSDATE' from the command object > Click create parameter > OK
    -Abhilash

  • How to make Start Date as optional parameter in Crystal reports 2011

    Hi All,
    I have existing Start Date and End Date parameter how to make them as optional parameters.
    Thanks for your help in advance!!.

    Hi Mnnica,
    There is an option 'Optional Prompt' under value options, make that as true.  Do the same for both startdate and enddate then go in Record Selection Formula and write below formula :
    If Not (hasvalue({?Startdate}) then True else {?Startdate} >= {databasedatefield}
    and
    If Not (hasvalue({?Enddate}) then True else {?Enddate} <= {databasedatefield}
    Check below screen capture for Optional Prompt options :
    -Sastry

  • Adding date as runtime parameter in crystal report

    Post Author: priyanair
    CA Forum: General
    Hi,
    I have a report in which iam passing four runtime parameters. One of the parameter is date. my report is taking the date parameter as mandatory and if i leave it blank it doesn't show any output. If i fill in the date parameter it gives me the output corresponding to date. It ignores the other 3 parameter values. What could be the reason and what could be the possible solution for the same?
    Please help.
    Thanks
    Priya

    Post Author: priyanair
    CA Forum: General
    Hi,
    This is the statement that iam using for assigning the parameter values to the database fields.
    {Account.Name} = {?Name} or  {Account.BillingCity} = {?City} or{Account.Type} = {?Type of customer} or{Account.LastModifiedDate} = {?Last Modified Date}
    the last statement is my date parameter.
    Thanks
    Priya

  • Sap function used in crystal- date parameter issue

    have a function developed in sap and it is using date parameters in the function
    i can run the function in sap and retrieve records
    when i create a report from the function and create my date parameter to use in the record selection
    and i enter my parameter values to run the report, it doenst retrieve any records
    i have hardcoded dates
    i am using this in the record selection
    if hasvalue({?Run Date}) then {?Run Date} else currentdate
    any ideas?

    Actually, what are you returning?  In your record selection, what date are you trying to filter?  Set your formula equal to whatever you want to return in the report:
    if (not hasvalue({?Run Date})) then REPORT FIELD = currentdate  else REPORT FIELD = {?Run Date}

  • Passing input Dates in a Crystal Report

    Post Author: Preethig
    CA Forum: Older Products
    Hi all,
    I am using Crystal reports 8.5 to develop my report. I use the the Crystal report Enterprise Version 8.0 to view my reports in the IE 6.0 Web browser.I communicate to the Crystal Enterprise through my Active Server Pages.(ASP 3.0)
    From my asp page redirect to the urlI use response.redirect
    Here is an example URL:
    http://Domain/Directory/Report.rpt?&prompt0=Valuemy url request is
    Response.Redirect("report.rpt?&prompt0=" & some random value & "&prompt1=" & DateField & "&prompt2 =" & DateField  )
    and I use "sf " query string parameter for passing new selection criteria
    There are three parametes defined in the Crystal report
    Prompt0 - To accept a Number
    Prompt1 - To accept a Date
    Prompt2 - To accept a Date
    Problem: Even after passing the input date parameters as the parameter values for the parameter "Prompt1" and "Prompt2" in my Active Server Page, on launch of the Crystal report in the Crystal enterprise Viewer, the Crystal reports' Dialog still prompts the user to give input dates.
    Need Solution for: I should be able to pass the date parameter values from the ASP page and susequently, the crystal dialog should not be prompted to get the input dates.Kindly suggest a solution.
    Thanks in advance!!Preethi

    Well, can you please post the details about your stored proc?
    <quote> I've checked that when calling one stored-procedure within a crystal report, one sequence will be selected for 2 times. Thus 2 will be added to the corr. sequence No.</quote>
    Question: What do you mean by that? How many times did you run the report?
    More details please.
    -Raj Suchak
    [email protected]

  • Date parameter values cleared when dynamically populating string parameter

    Software: Crystal Reports XI Release 1 with SP4, with MS SQL Server 2008
    I've created a report that asks for three parameters, 2 dates, and a string which is dynamically populated. The report has two tables added in the database expert.
    The first table in the database expert is a command object which passes the two date parameters to a stored procedure:
    exec sp_MyStoredProcedure {?startdate},{?enddate}
    The second table in the database expert is a stored procedure object used to populate the string parameter {?_users}. The criteria for the string parameter are:
    Prompt with Description only: False
    Allow multiple values: True
    Allow discrete values: True
    Allow range values: False
    This stored procedure object requires nothing to be passed, it was originally a view in the database, but the same problem occurs whether i dynamically populate the string parameter options from either a view or a stored procedure.
    The string parameter is used for defining the record selection formula:
    IF {Command.user_name} in {?_users} THEN true ELSE false.
    The two table objects are not linked in the database expert, but linking them does not seem to solve the problem I am having with this report, the problem being this:
    No matter which order I set the parameters, it always first displays a form showing only the prompts for the date values. After entering these, it then shows a form prompting for the date values again (the previously selected date information now cleared), along with the list of users from which to select. On this 2nd form, the parameters are displayed in the order I set using the field explorer option presented when I right click on the Paramter Fields heading. After entering the date parameter values a 2nd time, and selecting the users from the dynamically generated list, the report performs as intended. After subsequently running the report  (prompting for new parameter values by pressing F5),  it does not clear the date parameters on the 2nd form's appearance.
    What I need is to be able to enter in these values the first time around, without having the date parameters cleared. Am i going about this incorrectly, or is this a bug?

    What you are experiencing is not a bug... Passing a multi-valued parameter to a Command or SP is not supported in any version of CR prior to CR 2008.
    Your options are #1) Upgrade to CR 2008 or #2) Jump through the necessary hoops to make it work in CR XI
    Check out this link...[SQL Command Parameter - Multiple Value|Re: SQL Command Parameter - Multiple Value]
    It has some good examples a good step by step.
    HTH,
    Jason

  • Unit Testing: Supplying SYSDATE on a DATE parameter

    hi all,
    I have a procedure that I'm unit testing and one of the parameter is date, I want to supply a dynamic value to it relative to sysdate but SQL Developer only accepts hard coded date values. Does anyone know how I can supply SYSDATE or SYSDATE-50 to a date parameter directly. I can already solve this by using a wrapper procedure, just wondering if there's a solution to directly supply the value.
    Thanks,
    Alfredo

    Hi Kranthi.
    1. Assuming you are with Plus you can make the parameters optional in the parameters screen (tools -> parameters)
    so that if they get NULL as value they will return all data.
    2. the second way is if you like to keep it mandatory is to define a default value for the parameter and then take care of the situation in the condition.
    for example you'll define the 1-Jan-1900 as your default date for the from_date.
    Then in the condition change if you'll define it just as from_date > :P_from_date then you got what you wanted.
    BTW In similar situations when you are dealing with varchar you can do a manipulation such as:
    from_date > :P_from_date
    Or
    :P_from_date = '1-Jan-1900'
    Tamir

  • How to pass a date parameter from report builder query designer to oracle database

    i'm using report builder 3.0 connected to oracle database. i'm trying to pass a date parameter in the query with no success, i don't
    know the exact syntax. I've tried :
    SELECT * FROM igeneral.GCL_CLAIMS where CREATED_BY IN (:CREATED_BY) AND CLAIM_YEAR IN(:UW_YEAR) AND (LOSS_DATE) >To_Date('01/01/2014','mm/dd/yyyy')
    it worked perfectly.
    However if i try to put a date parameter "From" instead of 01/01/2014 it will not work, a Define Query Parameter popup window appear and error occurred after i fill
    the values (usually i shouldnt get this popup i should enter the value when i run the report)
    SELECT * FROM igeneral.GCL_CLAIMS where CREATED_BY IN (:CREATED_BY) AND CLAIM_YEAR IN(:UW_YEAR) AND (LOSS_DATE) >To_Date(:From,'mm/dd/yyyy')
    appreciate your assistance

    Hi Gorgo,
    According to your description, you have problem when in passing a parameter for running a Oracle Query. Right?
    Based on my knowledge, it use "&" as synax for parameter in Oracle, like we use "@" in SQL Server. In this scenario, maybe you can try '01/01/2014' when inputing in "From". We are not sure if there's any limitation for To_Date()
    function. For your self-testing, you can try the query in sqlplus/sql delveloper. Since your issue is related to Oracle query, we suggest you post this thread onto Oracle forum.
    Best Regards,
    Simon Hou

Maybe you are looking for

  • Error 1907 after automatic update

    I am using Office 2010 Home and Student Edition on Windows 7 Home Premium.  After a recent automatic update, I now have problems.  When I start Office, I get the "installing updates, please wait" splash screen.  When the green progress bar is almost

  • Can I add a second Airport Express?

    I have an Extreme Base Station connected to my Time Warner Cable Modem. It comes into my house in my office, which is over my garage, a separate structure in my backyard. The iMacs there are connected via Ethernet to the Apple Base Station. In my hou

  • Dual display problems when using keynote, powerpoint etc..

    I can run my macbook in mirroring mode and extended desktop no probs but as soon as I run programs such as powerpoint, keynote or presenter software it will run the slides on the MacBook screen and put the control/operators screen on the projected sc

  • [svn:fx-trunk] 7796: get the correct locales of batik and xerces jars into the build

    Revision: 7796 Author:   [email protected] Date:     2009-06-12 13:01:48 -0700 (Fri, 12 Jun 2009) Log Message: get the correct locales of batik and xerces jars into the build bug: https://bugs.adobe.com/jira/browse/SDK-21565 qa: i18n team (make sure

  • [Solved] KDE 4.5.1 constant disk i/o from /jbd2/sda4-8

    I recently switched from Gnome to KDE 4.5, and have noticed one small problem, that this machine never had with Gnome.   I put conky on it (and have a disk io graph on my config) and last night I noticed that /dev/sda was being accessed every couple