Date parameter problem

Dear All,
I have created a BO with a field using the Date as datatype. A set of AS and WS is generated to perform CRUD operation. The problem is the date format is not compatible when I pass the date from GP to the WS. The GP is using the java.util.Date while the WS using the java.sql.Date. Can anyone suggest how can I fix this incompatibility?  Since most code are being generated, I think it's not a good idea to override any generated code. I have also tried creating a WebDynPro to do the conversion. However, it seems to be overkill to perform such a simple operation.
Regards,
Alex

Hi Sudhir,
I actually generate my WS instead of create it manually. So, the WS is prepared by "Expose Service as Web Service" from my AS. If I change the interface signature of the WS manually, the NWDS will report error whenever I regenerate the application.
Moreover, as far as I know, the java.ulti.Date is represented using a long datatype while the dateTime is using the Gregorian Calendar as a string. I really doubt about their compatibility.
Regards,
Alex

Similar Messages

  • 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.

  • Stored Procedure w/ binary data parameter problems in Visual Basic

    Howdy all.
    I am having a problem calling stored procedures with a BLOB parameter. I have tried changing the paramater other data types to see if it would work, but with no success. I am calling the stored procedure from Visual Basic using ADO. I am using the Oracle ODBC Driver, Release 9.2.0.4.0. I have tried changing the setup of the ODBC a good bit because that has fixed several problems for me in the past; however, it did not fix my current problem.
    Here is what I am trying to do. I have a function like the folowing:
    <BEGIN --------------------------------------->
    CREATE OR REPLACE FUNCTION PAGEFORMATSINSERT(
    p_ObjectFormatCode_ID      IN RAW DEFAULT NULL,
    p_PA_ID      IN RAW DEFAULT NULL,
    p_Name      IN VARCHAR2 DEFAULT NULL,
    p_FormatData      IN BLOB DEFAULT NULL,
    p_PF_ID      IN OUT RAW )
    RETURN INTEGER
    AS
    BEGIN
    INSERT INTO PAGEFORMATS (PF_ID, ObjectFormatCode_ID, PA_ID, Name, FormatData) /* <---- this FormatData column is a BLOB column */
    VALUES     (p_PF_ID, p_ObjectFormatCode_ID, p_PA_ID, p_Name, p_FormatData)
    END PAGEFORMATSINSERT;
    <END ----------------------------------------->
    The FormatData parameter has a data type of BLOB. In my Visual Basic, I have my ADODB.Command object. I am setting the CommandText of the Command object to "{? = call PageFormatsInsert(?, ?, ?, ?, ?)}". In order to set the parameter value for the BLOB data type, I am calling the AppendChunk function of the Command object - passing it a Byte array.
    I am getting the folling error:
         ERROR: -2147467259 [Oracle][ODBC][Ora]ORA-06550: line 1, column 13:
         PLS-00306: wrong number or types of arguments in call to 'PAGEFORMATSINSERT'
         ORA-06550: line 1, column 7:
         PL/SQL: Statement ignored
    If I change the FormatData parameter to a LONG RAW parameter, I get the following error:
         ERROR: -2147467259 [Oracle][ODBC][Ora]ORA-06502: PL/SQL: numeric or value error: hex to raw conversion error
         ORA-06512: at line 1
    I am at a loss as to how to get binary data into by Oracle database. I need to do it using stored procedures. How can I set up my stored procedure or table to do what I want it to do? Should I change my table definition? Are there some settings in the ODBC connection I can tweak? How can I get the stored procedure to accept my call from VB ADO?
    Any help would be appreciated.
    wally

    Thanks for the idea, but I don't get how I am supposed to get my binary data to the stored procedure using the stream. I have a binary array that I want to pass to a stored procedure. I want to be able to use the same Visual Basic front end with out MSSQL database as with our Oracle database.
    I am using the ADODB Connection and Command and RecordSet objects. Currenlty our front end calls the ADODB.Command(ParamNumber).AppendChunk function passing it the binary array. Somehow, the SQL Server driver does the magic in order for the MSSQL stored procedure to work correctly. I need to know how to do one of the following:
    1. Get the Oracle driver to do the same magic.
    2. Set up the Oracle stored procedure so I don't have to change the VB front end.
    3. Change the VB front end so that it works with both MSSQL and Oracle.
    wally

  • 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

  • SSRS Dynamics Date Parameter

    Hi,
    I have an SSRS report with Dates Parameter. it is compsed of FROMDATE and TODATE. The default value of FROMDATE is the current date and TODATE i added plus 1. This reports will get the transaction for Shift 1 and Shift 2. the shift1 start at 6:00AM of the
    current date until 6:00PM, then the shift2 will start from 6:00PM of the current date until 6:00AM of the next day.
    Here is the code: I set this code in the expression parameter value
    FROMDATE :   =DATEADD("d",0,Today)  --the value is 6/11/2014 --current date
    TODATE: =DATEADD("d",+1,Today)  --the value is 6/12/2014 --next day
    My requirements:
    I wanted the date parameter to be dynamics. WHen the time of TODATE falls on 6:00AM, the FROMDATE will change to 6/12/2013 while the TODATE will change to 6/13/2014.
    For ex. tomorrow 6/12/2014 6:00AM the value of these two paramter will be change to
    FROMDATE: 6/12/2014 
    TODATE: 6/13/2014
     Thank you in advance.

    Hi Lenoj,
    Was the problem resolved after performing the Visakh’s suggestion? If you are satisfied with his solution, I’d like to mark this issue as "Answered". Please also feel free to unmark the issue, with any new findings or concerns you may have.
    For the issue related to Browser IE9, I would suggest opening a new thread with details information in a corresponding forum. It is more appropriate and more experts will assist you.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Date Parameter in XML Publisher Enterprise

    Hello,
    Can someone tell me how to set up a date parameter in XML Publisher Enterprise? I cannot seem to get the right format for a date parameter, so my report will run. This report requires a date to be entered before the report can run. I am trying to use the format 'YYYY-MM-DD'.
    Any help would be greatly appreciated...
    Thank you,
    Susan

    Hi Susan,
    I also had some problems but found out the spelling is the key, so letters for day and years has to be small letter, letter for month has to be capital - a sample date format looks like
    dd-MM-yyyy ( check the possible formats of fields in RTF-Templates! )
    But anyway using date parameters seems a little instable in 5.6.2 - I have to save the parameter all the time even if I didn't change anything otherwise there was runtime errors
    Dirk

  • Script error when using Data parameter.

    Post Author: despec
    CA Forum: General
    Hello,I'm not sure what's going on here, but when I try to use a data parameter and run the report, upon clicking on the calander icon, I get a JS error saying that an object was expected in line 80.  A referring URL to a prompting htrml is listed, but I'm just not sure what I need to do to straighten this out.  Service pack perhaps? David

    Post Author: V361
    CA Forum: General
    I have had a similar problem with CR XI,  if I put the date in manually no worries, if I use the calendar, I get some sort of error as well,  "a runtime error has occured, error line 742", this happens on my CR XI on one machine, it is running on product version 11.5.8.963,  I also have CR XI, on a test server, running 11.5.8.826 and I do not have an issue with this one.  So... Long story made short, it may well be the service patch.  When I debug the error it tells me there is a "Microsoft Jscript runtime error"  It is pointing to c:/program files/business objects/common/3.5/crystalreportveiwers115/prompting/js/promptengine_calendar.js

  • Pass a ViewObject as a data parameter into Oracle Reports

    Can I pass a ViewObject as a data parameter in an Oracle Reports jsp Report?

    you can use impliment this script to your query get data from file
    function AfterPForm return boolean is
    infile text_io.file_type;
    linebuf varchar2(3000) := '';
    filename varchar2(100);
    v_employee_id varchar2(2000);
    begin
    filename := :P_file_name; /* you can pass the file name like this c:\temp\test.txt */
    infile := text_io.fopen(filename,'r');
    loop
    text_io.get_line(infile,linebuf);
    v_employee_id := v_employee_id&#0124; &#0124;linebuf&#0124; &#0124;' ';
    end loop;
    if text_io.is_open(infile) then
    text_io.fclose(infile);
    end if;
    exception when no_data_found then
    text_io.fclose(infile);
    v_employee_id := replace(rtrim(v_employee_id),' ',',');
    :p_employee_param := 'and employee_id in ('&#0124; &#0124;v_employee_id&#0124; &#0124;')';
    /* you can use either 'where employee_id in ('&#0124; &#0124;v_employee_id&#0124; &#0124;')' or
    'and employee_id in ('&#0124; &#0124;v_employee_id&#0124; &#0124;')' */
    return (TRUE);
    end;
    I think it will help you to solve your problem. Do not forget to put &v_employee_param
    Good Luck
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by gvardhan:
    The file will have one EmployeeID per line as follows
    100
    200
    ...<HR></BLOCKQUOTE>
    null

  • 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

  • Run time Date parameter Issue

    hi,
    In my report i have 3 parameters, one is date and another parameters are string
    there is no problem with string parameters
    Problem in date parameter is if i given the date by using date picker the reports is running, never end
    if i hardcode the date in sql query itself, it give the output in seconds,
    Why it is behave like that, can any one please let me know the possible ways to pass the date parameter in runtime.
    Thanks,
    Mohan

    hi,
    We are selecting the date from date picker only, for the given records also available.
    The format which i hard coded into sql is equivalent to the format return from date picker.
    I given the date picker java date format is dd-MMM-yy so it takes the date like '28-Apr-11'
    still it is not working,
    Thanks,

  • Set start date parameter

    what is the navagation for setting the start date parameter for the Load Sales Forecast base Summary collection program

    This may be a bug. Can you log a bugzilla request to investigate?
    Jason
    On 12/12/2011 11:32 PM, birtforums7 wrote:
    > Thanks for the reply Jason. I looked at the link you posted, but I am
    > not sure if it will address the problem I have. That is, the logs show
    > the timezone as correct already, it just seems that BIRT is not passing
    > the parameter correctly.
    >
    > For instance, suppose I input a start and end date range of 10/10/11 to
    > 10/15/11. The header on the report displays correctly:
    >
    > Start Date: 10/10/11
    > End Date: 10/15/11
    >
    > The information for the start date in the header was retrieved as follows:
    >
    >
    > <structure>
    > <property name="name">startdate</property>
    > <expression name="expression">params["startdate"]</expression>
    > <property name="dataType">date-time</property>
    > </structure>
    >
    >
    > The header takes the time from startdate, which is from
    > params["startdate"]. However, when I output the contents of
    > params["startdate"] to a log, I receive this:
    >
    > Sun Oct 09 23:00:00 BRT 2011
    > Fri Oct 14 23:00:00 BRT 2011
    >
    > The code for outputting to the log was:
    >
    >
    > out = new PrintWriter(new FileWriter("c:/temp/out.txt", true));
    > out.println(params["startdate"]);
    > out.println(params["enddate"]);
    > out.close();
    >
    >
    > It is important for params["startdate"] to be exactly what the user
    > inputs, since the parameter will be formatted for use in an SQL query.
    > The same issue applies to params["enddate"] as well. It seems there is
    > some sort of date conversion from the range of 10/10/2011 to 10/16/2011.
    >
    > If I use any other time range that does not fall within these two dates,
    > I receive the expected output. For instance:
    >
    > Header:
    > Start Date: 10/5/11
    > End Date: 10/8/11
    >
    > Log output:
    > Wed Oct 05 00:00:00 BRT 2011
    > Sat Oct 08 00:00:00 BRT 2011
    >
    > Is it possible that this is a bug in BIRT?
    >
    >

  • 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

  • Format of Date parameter

    Does anyone know of a fix for the Date parameter issue. I have seen a number of posts regarding the same problem.
    When Crystal asks for a Date it is required in the format YYYY-MM-DD, now to a majority of database engines this would appear quite normal. To a regular user this is not normal. Here in Australia we use DD/MM/YYYY our 12 year old database was set up to reflect this and all our reports, created in Crystal 8.5, had no problem with this.
    However after spending 1000's of dollars on the latest version I find that it is basically useless because none of my 100's of reports will work, due to this 'Minor' problem.
    If anyone has experience with Crystal reports against an Informix database and has a workaround solution, or even someone not using Informix, please let us know.
    Thank you, Thank you, Thank you in advance.

    Hi,
    Create a string parameter (named eg. olPrint).
    The user will then input its normal way of date inputting. However it has to be in a format you specify in the caption (dd-mm-yyyy  thus 1 December 2007 = 01-12-2007 and not 1-12-2007)
    Then create a formula PrintDate with the syntax:
    DateTime(Date(
                ToNumber(Mid({?olPrint}, 7)),
                ToNumber(Mid({?olPrint}, 4, 2)),
                ToNumber(Mid({?olPrint}, 1, 2))))
    If you then select your report on = {@PrintDate} it should work.
    Hope this helps.
    Bye

  • Date Format issue while creating date parameter

    While creating date parameter in the crystal reports 2008 with SQL Server 2008 database connection, I want to change the date format according to the specified format in the database.
    For ex: YYYY/MM/DD and MM/DD/YYYY
    This paramter will be editable in the viewer i.e. I'm going to provide option to the user to change start date and end date for data selection.
    Please help!
    Thanks in Advance!

    i found this
    i am trying to get the Enter Values screen for parameters to allow entry in a specific format 'DD-MON-RRRR' connecting to an Oracle database. I found that a hack is possible yet I would prefer a clean solution that wont need files changing on client machines. The hack involved changing some javascript files within the Crystal Reports directory. The problem is I now have the date from the calendar in the correct format but it displays the following prompt: Please enter DateTime in format "dd/mm/yyyy hh:mm:ss".
    Is there a way to supress this or better yet a way to specify date format without changing the javascript files of Crystal Reports.
    I am using Crystal Reports 2008 SP1.
    answer---
    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:

  • Can we pass data-parameter in host

    Can we pass a data-parameter to a report using host command in the form.
    urgent please
    vishal

    Your answer is quite correct, but it is stupid behavior - how do you build backwards compatibility into a function if you have to specify the keyword 'default'?
    For example, I have an existing function that takes one parameter, but I need to alter it to take two parameters.   I work for a large bank that has a rigorous change management process, and this function resides in the data warehouse, so many
    people can use this function in their code, and I need to ensure that any changes I make are backwards compatible, and don't break any existing code that I don't know about.
    If this was a stored proc, I could call it without the optional parameter, and the default value would be applied, but a function needs me to specify the keyword 'default' or to provide a value.
    My only option seems to be to create a wrapper function that calls either the old function (if only one parameter is provided) or the new function (if both parameters are provided).   Sort of defeats the purpose of having default or optional values.

Maybe you are looking for