Date in crystal report

Hi sorry my english.
How can I do somting like that in Crystal Report
select * from INV1 where docdate = [parameter]
or
select * from INV1 where docdate BETWEEN [parameter1] and [parameter1]
regards
Edited by: johnnysolano on Mar 25, 2011 7:22 AM

Hai johnnysolano,
it is very simple,
File menu ---> View ---> Tool bars ---> Export Tools -
> select  from that bar to  SELECT EXPLORER -
>  Record -
> there is one window appear -
> Click on New --->chose you field  -
> OK ---> from drop down list   (Equal to,   Not Equal to,   Is Between) is there --> select Equal to -
> next drop down  -
> select your field value -
> ok
this is the select Query in your crestal report process.
Thank you,
Praveen

Similar Messages

  • Date data from Crystal Report one day less than Date from Source

    Hi,
    I am creating a Crystal Report 4.0 for Enterprise Users (Client Version only) based on a BEx query. I have a field called 'Date' that I am bringing over from the BEx query. It has a format of MM/DD/YYYY. When I view the 'Date' in Crystal Reports, it is displaying as 1 day less from the actual data. For example, in the BEx Query, 'Date' = 11/01/2011.  In Crystal Reports, it is showing up as 10/31/2011, which is one day behind.  I'm not sure what's going on.
    Please help!

    Well, this is as weird as it gets!
    Here are the observations on SP02:
    1) The Date Characteristic is a day off in the report while the 'Key' shows correct date
    2) It displays in the '30.01.2011' (DD.MM.YYYY)format
    3) When you right-click this field to change the date format, the date option is missing
    4) You create a formula to see if this is a date and it returns True. The formula you can try is :
    isdate(). It returns False for any other function like isnumeric() etc
    5) So, this is a date filed, or CR4E thinks this is a date field, however doesn't let us change the format
    6) You cannot use this field with date functions like cdate(); weird!
    7) The only way you can show it the way you want is to write this formula:
    *mid(,4,2)&"/"&left(,2)&"/"&Right(,4)*
    This is still a string field, however displays as MM/DD/YYYY.
    In Crystal Reports 2011, however, the following formula on the same date field returns a date value, meaning you can further right-click this formula field to change the date format like a normal date field:
    cdate(tonumber(Right(,4)),tonumber(mid(,4,2)),tonumber(left(,2)))*
    The same formula, however, throws a 'String is non-numeric error in CR4E and I found that it doesn't like this:
    *tonumber(Right(,4)) ; same error
    I've tried a lot of combinations to make this a date field in CR4E, however none works!
    So, the only option is to use the formula that I mentioned above.
    P.S: If you install Patch 2.10, you'll notice that the Characteristic value shows the correct date. For some reason though, it is in the same format as the 'Key' and if we wish to change the date format, the only possible workaround is to extract the numbers and join like I suggested above.
    Hope this helps!
    -Abhilash

  • Stored Procedure for displaying data in Crystal Reports

    Hi I am new to Oracle & Crystal Reports,so can any one please give me sample stored procedure to display data in Crystal report from Oracle by passing rwo input values.

    from site:-
    Crystal Reports will only support the return of a single refcursor from Oracle. Even the latest and greatest version 10 doesn't allow you to return more than one recordset at a time. You could add one more step to your procedure that would join up the output of the multiple refcursors into a PL/SQL table and then fetch the result set out through a single refcursor. That way you are using temporary space that will be cleaned up as soon as the connection is terminated and will only be returning a single refcursor

  • Step- by- Step on How to Load Excel data into Crystal Reports?

    Hi Friends,
                      Can anyone send me a Step- by- Step on How to Load Excel data into Crystal Reports? Pls help me. Thanks in Advance.
    Vijay

    It's also important to 'prep' the excel file prior to connecting to it.
    Give the data tab a meaningful name
    Make sure the column headers are unique and that every column has a header
    Delete any blank tabs
    If you have trouble with Excel changing the data type of a field (say, a social security number you want to be a string value rather than a number so you don't lose leading zero) an alternative would be to save the spreadsheet file as a CSV, create a schema.ini to specify the data types for each column (example below) and use the same steps to connect except instead of choosing Excel 8.0, scroll to the bottom and choose Text.  You have to make sure the CSV file is in the same folder as the schema.ini file that defines the columns.
    Schema.ini example:
    200912PUSD.csv
    ColNameHeader=True
    Format=CSVDelimited
    MaxScanRows=25
    CharacterSet=OEM
    Col1=SSN Char Width 9
    Col2=LAST_NM Char Width 25
    Col3=FIRST_NM Char Width 25
    Col4=DOB Date
    Col5=STDNT_ID Char Width 10
    Col6=SORTKEY Char Width 10
    Col7=SCHOOL_NM Char Width 30
    Col8=OTHER_ID Integer
    Col9=GRADE Char Width 2
    The filename in the first line needs to have the []  brackets around it, but I couldn't get it to display in this forum correctly.
    Edited by: Eric Petersen on Jan 27, 2010 9:40 AM

  • Find no of week in a month of particular date in crystal report

    dear sir
    i have to find out the *no of week in a particular month against the particular date in crystal report* . i am trying this formula but
    it will give me a no of week from january .but i want the week no of that date only in my report.pls assumes week ends on sunday .wheather month start from any day.below formula get me record :- no of week "6"
    but according to my query right result will be ,no of week is:-"2".
    datediff("ww" , date("01"&right(cstr(date(#15/02/2011#)),8)),#15/02/2011#,crsunday)
    if you have any solution to my problem .please respond me sir as soon as possible.
    thanks sir
    with warm regards:Anand Azad Sharma.

    you are on right derection but i cannot find the solution from this formula because i already try this technique. but now i
    found the result by own: the exact result  of my proble is this:
    dateVar myDate := cdate(#01/31/2010#); //replace with your date field
    numberVar DayNum := Day(myDate);
    numberVar Week1Saturday := (7 - DayofWeek(Date(Year(myDate), Month(myDate), 1))) + 1;
    stringVar WeekNum;
    if DayNum IN [1 to Week1Saturday] then
        WeekNum := "1"
    else if DayNum IN [(Week1Saturday + 1) to (Week1Saturday + 7)] then
        WeekNum := "2"
    else if DayNum IN [(Week1Saturday + 8) to (Week1Saturday + 14)] then
        WeekNum := "3"
    else if DayNum IN [(Week1Saturday + 15) to (Week1Saturday + 21)] then
        WeekNum := "4"
    else if DayNum IN [(Week1Saturday + 22) to (Week1Saturday + 28)] then
        WeekNum := "5"
    else
        WeekNum := "6";
    " Week " + WeekNum
    thanks  for your immediate response sir
    with warm regards :Anand Azad Sharma

  • Printing the datas through Crystal Report from Java

    How can I Print the datas through Crystal Report from java?

    How can I Print the datas through Crystal Report from
    java?
    What the hell are "the datas"?
    Jesus, I can understand this is a shrinking planet, Global community, and all that happy horse pucky. Typos or small grammar errors are no big deal, I make them all the time. But when I have to spend more time interpretting the question than figuring out the answer, it drives me crazy.

  • Previous Year Data in Crystal Reports

    Hi Experts,
                      I need to generate crystal report with current year sales data, and previous year sales data.
    How to get previous year sales data in crystal reports (Here am Using BEX Query as a Data source).
    Please do need ful

    Moved to BEX forum

  • Can not retrieve data in Crystal Report

    Hi,
    I have a problem to load data from <i><b>Crystal Report</b></i> in an SBO form with the ActiveX DI object : the Crystal Report Viewer message display : <b><i>'Failed to retrieve data from the database. Details [Database Vendor Code:208]'</i></b>
    It seems do not change the name of database in SQL Crystal Report query : My SQL query in Crystal Report file is a generic query : it must run with all custom database with the same datatable ; so the database name in FROM  clause must be change with the SetLogonInfo : but it do not run !
    Have you an idea ?
    Francis
    Here my code :
    Public Class frm_CRViewer
    ' Adding References of project : CRAXDRT and CrystalActiveXReportViewerLib11
    Private WithEvents MRO_CRV As
    CrystalActiveXReportViewerLib11.CrystalActiveXReportViewer
    Public Sub New()
    Dim msa_Form As SAPbouiCOM.Form
    Dim dsa_ActiveX As SAPbouiCOM.ActiveX ' Item <ActiveX> from form XML
    dsa_ActiveX = msa_Form.Items.Item("axCRV").Specific()
    dsa_ActiveX.ClassID = "CrystalReports11.ActiveXReportViewer.1"
    MRO_CRV = dsa_ActiveX.Object
    ' Create the crystal application
    Dim dob_ReportApp As New CRAXDRT.Application
    ' Open the report
    Dim dob_Report As New CRAXDRT.Report
    dob_Report = dob_ReportApp.OpenReport("c:MyTest.rpt")
    ' Defined to log on to the data source, and change the database name in FROM clause
    Dim dob_Table As CRAXDRT.DatabaseTable
    For Each dob_Table In dob_Report.Database.Tables
         dob_Table.SetLogOnInfo("192.168.2.10", "AeroOneDemo", "sa", "45dfrfg5")
    Next
    ' The report have a parameter in the sql query
    dob_Report.ParameterFields.Item(1).DiscreteOrRangeKind = CRAXDRT.CRDiscreteOrRangeKind.crDiscreteValue
    dob_Report.ParameterFields.Item(1).AddCurrentValue("15")
    ' Display the report in SBO form
    Title = pst_ReportName
    MRO_CRV.ReportSource = dob_Report
    MRO_CRV.ViewReport()
    End Sub
    End Class

    Try these ...
    <a href="http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2002650&sliceId=&dialogID=7002531&stateId=1%200%207004328">http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2002650&sliceId=&dialogID=7002531&stateId=1%200%207004328</a>
    or
    <a href="http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2000957&sliceId=&dialogID=7002728&stateId=1%200%207004460">http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2000957&sliceId=&dialogID=7002728&stateId=1%200%207004460</a>
    or
    <a href="http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2001075&sliceId=&dialogID=7002728&stateId=1%200%207004460">http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2001075&sliceId=&dialogID=7002728&stateId=1%200%207004460</a>
    or
    [url=http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2003637&sliceId=&dialogID=7002728&stateId=1%200%207004460]http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2003637&sliceId=&dialogID=7002728&stateId=1%200%207004460[/url]

  • No data in Crystal report from SProc

    Hi,
    I have a SProc with 10 temporary tables.
    The first temp table has a @StartDate and @EndDate as parameters. The data from each table flows to the next table and so on of the single SProc.
    The 10th table has the data which are required on Crystal Report (CR).
    I have chosen the SProc as the only data source on CR. When I refresh the CR, the CR is blank. However, when I execute the SProc in SQL with the parameters, I get all the rows in the results correctly.
    [SProc] '20101001', '20101031'
    What should I do to get the result data in CR too?
    Thanks,
    Ajay Audich

    Ajay,
    The only way I can see this working is to have the final SP populate a "Global" temp table, so that it's available to other processes.
    You could then write a Command that looks something like this...
    EXEC FirstSP ('{?BeginDate}', '{?EndDate}');
    SELECT * FROM ##Temp;
    This is just a theory, but it may be worth testing.
    To create a global temp table in SQL Server, simply use two #'s instead of 1 (CREATE TABLE ##Temp).
    If you aren't using SQL Server, a little Google searching should find you the equivalent for your database.
    Greg's idea will also work... If you are allowed to add an actual table to your database. If not the Global should work.
    HTH,
    Jason
    Edited by: Jason Long on Nov 22, 2010 9:37 AM

  • No data in Crystal report created on SAP BW BEx Query

    Hi Experts,
    I am trying to create a Crystal report on top of a BW query. I am able to login to the BW system and open the BEx query and the objects are coming into the crystal report.
    But when I drag and drop some objects into the details area and try to preview sample - it does not show any data (it shows accessing database but doesnt bring any data)
    I copied the generated SQL query in to the section in the BW system in transaction code 'MDXTEST' and it runs correctly and shows me the result below there.
    Just to try - I unchecked 'Use MDX..' check box by following the path SAP->Settings to check if that could bring back data ... and YES that worked which means data is not coming from the BW query with MDX connection but when MDX seems to be fine and retrieve result when I run the sql statement in tcode MDXTEST.
    Also when I do preview samples - I can see in SM50 in BW system that it is trying to run the report just that I am not able to see any data in my crystal report.
    Any help in this regards would be greatly appreciated.
    Thanks in advance.
    Regards,
    Sunny

    Hello
    The order of display of attributes in Webi and Crystal report would be different.
    Collapse the infoobject and skim through the attributes, you should be able to find them.
    Vishal

  • How to compare dates in Crystal Reports 2008

    Hello,
    I cannot figure out how to compare the dates in the Crystal reports.
    I need all dates that are in the future to be displayed with the green font.
    So in the formula for the font for this texbox I've tried to use different
    formulas like:
    If DateDiff("d", CurrentDate, {DevelopmentTracking_SELECT.Anticipated}) > 1
    Then
         crGreen
    or
    If {DevelopmentTracking_SELECT.Anticipated} > CurrentDate Then
         crGreen
    (where DevelopmentTracking_SELECT is the stored procedure, and Anticipated
    is a date field).
    None of them worked. All dates are treated like they were in the past
    comparing to the CurrentDate. If I reverse these formulas like:
    If {DevelopmentTracking_SELECT.Anticipated} < CurrentDate Then
         crGreen
    then all dates turn to green, otherwise they always stay black.
    What could be a problem here?
    I would appreciate your help.
    Thank you.

    OK, got it, thank you. It worked.
    However, I also need to use another field value which is not on the report, like this:
    If CurrentFieldValue < CurrentDate And {DevelopmentTracking_SELECT.Completed} = False Then
    crRed
    DevelopmentTracking_SELECT.Completed is not on the report.
    Is it possible to use it with the cross-tab?

  • How to feed data into crystal reporte with "SQLQuery" method in c#?

    Hi there,
    I've an old app that was written in VB with some crystal reports from Crystal Report 7.
    Now I need to upgrade this old app into c# with newer version of Crystal Report, so we decide to go for VS2010.
    I can open the report template in the VS2010 without any problems.
    But I'm running into some issue here:
    the old report has multiple tables from a SQL db as the connection. Each table has a PK to each other.
    and the VB code feed the data like below:
    MainForm.CrystalReport(1).SQLQuery = SQLString
    I couldn't find any reference for "SQLQuery" method in the C#, is there such command exist?
    Thank you in advanced,

    Thank you Ludek. Looking into the info you provided.

  • Problem in Fetching value from Employee Master Date in Crystal Report

    Hi All,
    I am using the SAP Standard report for Sales Quotation and now my client needs a new requirement.
    That is, for certain sales employee they need a manger and the manager name, email, mobile no from employee master data should be fetched.
    I tried this way,
    Assigned the Manager name in the OSLP, memo field and tried to equate the employee name in the OHEM table by using a parameter and tried to fetch the fields but i am not able to view any of the fields from the OHEM table.
    How to fetch the fields from the OHEM table?
    Help me solving this issue.
    Regards,
    Jananisuba S

    hi.
    Janani..
    Fetching means what .
    i am not able to understood...
    linking you are not able to understood or any other.
    in crystal report are u getting the problem.
    First in sql it slef are u able to get the problem..what just explain...

  • Errors when viewing data with Crystal Report Viewer.

    we receive the following errors when we try to merge a crystal report with data, we are using a crystal  report viewer to display the report.
    Can someone help us with where we might be going wrong?
    Thanks
    Rajesh
    General Information
    Additional Info:
    ExceptionManager.MachineName: CCS104
    ExceptionManager.TimeStamp: 02/10/2008 12:40:31
    ExceptionManager.FullName: Congestion.Framework.ExceptionManagement, Version=33.36.0.0, Culture=neutral, PublicKeyToken=null
    ExceptionManager.AppDomainName: /LM/W3SVC/1/ROOT/BackOfficeTR4-1-128674174088125000
    ExceptionManager.WindowsIdentity: NT AUTHORITY\SYSTEM
    Renewal charges Statement Id : 37171
    Unknown Database Connector Error
    Error in File C:\WINNT\TEMP\{AE9A7C1D-F11A-41CC-B2F7-BC1062DC3A5B}.rpt:
    Unknown Database Connector Error
    Stack Trace :    at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.  (Object 
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataSet dataSet)
       at Congestion.Core.PresentationTier.BackOffice.WF_NewReport_P.DownloadPDFStatement(Int64 lngCanId, Int64 lngFasId, String strChargeType)
       at Congestion.Core.PresentationTier.BackOffice.WF_NewReport_P.Page_Load(Object sender, EventArgs e)
    Source : CrystalDecisions.ReportAppServer.DataSetConversion

    Hi,
    Its a best practice to use the code given below in the unload event of the page or the code can also be written in a button press event so that the disposing is ensured manually(If sessions are in use).
    boReportDocument.Close();
    boReportDocument.Dispose();
    GC.Collect();
    Note: boReportDocument is the object of ReportDocument.
    This code disposes the report object after using it.
    Check the issue with [filemon|http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx] utility.
    Amit

  • Hyperlink on data field crystal report vs 2005

    Please help!!!!
    I can not set the hyperlink on a data field in *.rpt.
    I also set the hyperlink type was A website on internet and filled the website address. But when report display i can not see any link.
    Thanks in advanges,

    Hello,
    (from CR Help file)
    You can select a report object on the Design or Preview tab and create a hyperlink to another location.
    The hyperlink is saved with your report and is available to other users as a way of viewing additional information.
    Note:    Crystal Reports also lets you create hyperlinks with Relative URLs, so your web reports retain independence from their location on any particular server.
    To create a hyperlink field
    Select a report object on the Design or Preview tab.
    On the Format menu, click Hyperlink.
    The Format Editor dialog box appears with the Hyperlink tab active.
    Click the type of hyperlink you want to create.
    The available types in the upper area are:
    No Hyperlink
    This is the default option. There is no hyperlink associated with the selected report object.
    A Website on the Internet
    Select this option if you want your report object to be linked to a static web address. Use the formula button to create a URL based on a field value. For example, you might enter the following formula if your Customer Name field contained information that would create a series of meaningful URLs:
    "http://www." + {Customer.Customer Name} + ".com"
    Note:    You can also use this option to connect to Business Objects, Web Intelligence, and OLAP Intelligence documents (this is also known as report linking). Use the openDocument function to create these hyperlinks in Crystal Reports.
    Current Website Field Value
    Select this option if you want the program to create a hyperlink out of the field you selected. The field must be stored as a proper hyperlink in your data source.
    An E-mail Address
    Select this option if you want to create a "mailto" address from the field you selected. Use the formula button to create an address based on a field value.
    A File
    Select this option to create a hyperlink to a file on a specific computer or networked computer. Use the formula button to create a file path based on a field value.
    You can also use a hyperlink of this type to run an EXE with a command-line parameter. Enter the path and application name, and follow it by the parameter for the command.
    Current E-mail Field Value
    Select this option if you want the program to create an email hyperlink out of the field you selected. The field must be stored as a proper email address in your data source.
    The available types in the DHTML Viewer Only area are:
    Report Part Drilldown
    For information about how to use this option, see The Report Part Drilldown option.
    Another Report Object
    For information about how to use this option, see The Another Report Object option.
    Note:    Not all hyperlink types are available at all times. The object you select and its location on the report determine which types are available.
    After you have chosen a hyperlink type, enter the appropriate hyperlink information (the URL of a web site, for example).
    Click OK when you are finished.
    The hyperlink is inserted as appropriate. Click it on the report to go to the web site, to send an e-mail, and so on.

Maybe you are looking for

  • Any Ideas on a Comcast Issue that Only Effects Firefox?

    Some background.... For the last few years, Comcast has offered a "Domain Helper" service for Comcast users that use Comcast's DNS servers. When enabled and a DNS lookup fails, instead of seeing the browser's "can't connect" message, the browser gets

  • How to solve iPhone OS 3.1 problems by downgrading back to 3.0.1

    I had problems with my battery dying after 15 minutes of use, the phone not waking up from sleep mode, and cell signal problems after downloading OS 3.1 and iTunes 9. The problem couldn't be solved immediately because iTunes 9 deletes your previous i

  • Event for browse button for fileupload control

    I'm creating an application, where I need to check which file is choosen for the file-upload. Depending on the file upload, 2 other fields will be filled in because the filename is concerning a certain standard. Can I do this with javascript for exam

  • Putting photoshop extended on my second computer

    I have photoshop extended on my main computer. How do I put it on my laptop that is plugged in another room?

  • Sliceing a photo and then rotating it.Maybe with feather.

    I have an image 2.5 in wide and 3.5 in high (300 dpi). I want to convert this image into a playing card as in a face card. The image is a drawing of a king head to toe. I want to slice the photo in a diagonal. A diagonal that passes through the exact