Crystal Syntax "Like" Statment on date searches.

Post Author: smilbuta
CA Forum: Data Connectivity and SQL
Hello,
I am currently developing an application using VS2005 and Crystal Reports.
I wish to pass a Crystal Syntax statement to the report that searches for like dates in a date column in a SQL 2005 Database..
The statments as follows.
crystalsyntax = "{EQ_Equipment.equipment_warranty} like '2009'"
I get returned an error saying string expected??
so i tested diferent formats, and if i use this string i get only one record returned out of a known test group of 10 records.
"{EQ_Equipment.equipment_warranty} Like DateValue('2009')"
so im unsure what im doing wrong. Any advice would be apreciated.

Post Author: Jagan
CA Forum: Data Connectivity and SQL
LIKE is used to compare strings. You're trying to compare a date with a string. That's why it says "string expected".
I'm not sure what the result of DateValue('2009') is, but it's pretty certain that what you've then got is a date (warrenty) being 'liked' with a date, so both are being implicitely converted to strings first.
What you could do is explicitely convert the warrenty date to a string in a format of your choice (don't rely on the implicit format) and then LIKE that with '2009'.
Or change your statement to Year() = 2009  but this might result in Crystal doing the hard work instead of the database.
Best would be to test that the warrenty date is in the year range, so that you can still use any index that might exist on the warrenty date column. See the help on 'in range operator'. e.g.  in DateValue(<year>, 01, 01) to DateValue(<year>, 12, 31)

Similar Messages

  • What is the syntax to get last date of Quarter ?

    Hi ,
    We are planning to have Bom effective date functionality. Presently BOM Disable date is coming in between the Quarter. Is there any funtion or syntax to get last date of quarter for the bom disable date. similar to "$begin" to get the last date.
    Thanks

    Hi,
    To get this done you can do the following.
    1. Create the Result Source.
    2. Create the display template using the design manager and copy the existing template make the req. changes on the template and publish it to the document library and give the manage property that you req. for this concatenation functionality. Manage Property
    like the domain etc.
    3. Create search center and add the new page modified the core result web part and give the result source and custom template that created in step 2.
    4. Publish the page.
    5. Create the Search vertical and give the name and use the same page the created in step3. 
    http://sharepointfordeveloper.blogspot.in/2013/09/sharepoint-2013-result-source.html
    http://sharepointfordeveloper.blogspot.in/2013/09/sharepoint-2013-result-types.html
    http://sharepointfordeveloper.blogspot.in/2013/06/sharepoint-2013-design-manager.html

  • Payment Run Date Search

    Hi everyone,
    In the payment program F110 I would like to minimize the search of Run Date / Identification to the last 100 and not the last 5000.
    How can I do this?
    Kind Regards,
    Quintin Venter
    Edited by: Quintin Venter on Mar 27, 2008 10:12 AM

    Hi,
    Here you can filter date wise and check from which date you do want, hope understood..but system shows as many as you have irrespective comp code and date with different vendors...
    Thanks,
    Vasu..

  • I have a 1st genoration ipod and would like to up date how can i do this

    I have a 1st genoration ipod and would like to up date, how can i do this

    To more easily find compatible apps:
    iOSSearch - search the iTunes store for compatible apps.
    Vintapps 3.1.3 - paid app.
    Apple Club - filter apps by iOS version.

  • Certain Crystal reports don't show data - are there restrictions

    Hello,
    We created quite a few reports in Crystal Reports (like invoice, deliverynote, picklist etc.).
    When we connect some reports in SBO (layout- and design manager) they do not show any data. Only text fields are shown.
    In these reports we use tables, UDF and Views. We also have subreports.
    The reports are working fine in Crystal itself and also when using Crystal Wave (add-on). All parameters are set the right way, otherwise we would become a parameter error.
    We did a test with one of the reports to remove the subreport and then it did show data (not the data from the subreport of course).
    Another report with tables, UDF, views and a subreport doesn't give an error. It shows all the data.
    So I was wondering what could cause this. Are there any restrictions to a report when connecting a Crystal Report to SBO using the layout- and design manager.
    Tim

    Do you maybe have inner joins for all of your tables and views?
    Maybe it's a parameter issue causing no rows to be displayed.  Did you test the exact DocEntry@ for your layouts?
    No, from my experience I have not seen any limits when using SBO and CR inside the client.
    Mike

  • How export to csv work in safari browser? In my application export to csv open like a raw data in new tab. But other browsers working great!. Need to open in a csv file or save it as a csv file.

    How export to csv work in safari browser?
    In my application export to csv open like a raw data in new tab.
    But other browsers working great!.
    Need to open in a csv file or save it as a csv file.
    Please suggest me. Thank you in advance!.

    Hi Adrian,
    Why don't you try any another software for opening CSV files then Notepad ? According to my experience, you can use these softwares to open an CSV files and they are:-
    Microsoft Excel
    Open Office Calc
    Google Docs
    Also there is an additional tool available known as CSV viewer. You may try this, download it from here http://www.csvviewer.com/
    I've never used Notepad for opening CSV files, because sometimes it contains some symbols which are not not at all compatibile with Notepad.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Crystal Report with text(csv) data file, can we set it as input parameter?

    Hi,
    I am a new user of Crystal Reports 2008.
    I have created a report with charts in it. The input data comes from a csv text file.
    Can I set the name of this text file as an input parameter?
    as I need to generate 44 similar reports with different text filenames(and data)?
    Thank you.
    Regards

    Brian,
    Thanks much.
    I did exactly what you said.
    Just to see any change, I first gave a bad report file name just to see if I am accidentally pointing to a different file,
    but I got an error saying report not found.
    Then I renamed my original datafile name and generated a report and it still generated one without giving an error.
    Then I also gave a junk name to the logoninfo and printed that name, the new name was assigned to logoninfo, but the code did not error out.
    It ended up generating the report.
    Now here is what I think is happening,
    1) The save data in report option seems to be still on even though I have turned it off in 2 locations
    a) file -> Report Options
    b) file -> Options -> Reporting tab.
    2) For some reason the logoninfo is getting ignored as well.
    Since I did not see any answers yesterday I posted a link to this thread on the .Net forum
    Crystal Report with text(csv) data file, can we set it as input param? C#
    and Ludek Uher says that I am connecting to the text file via a DAO database engine and so need to use the same code for changing the text file as for changing an Access database.
    But the link he gave me tells me to try the same thing that we have been trying..
    Here is my plan,
    1) I will first try and find out why my save data with report option is still on ( but it shows off in Crystal ).
    2) why is LogonInfo getting ignored.
    Meanwhile any suggestions from anyone are welcome.

  • Crystal Report with text(csv) data file, can we set it as input param? C#

    Hi,
    I am new to the forums and posted a question which belonged to the .net - SAP Crystal reports group.
    Can someone help me with my problem? following is the thread that I have started.
    Crystal Report with text(csv) data file, can we set it as input parameter?
    Thank you in advance.

    Looking at the original thread, you are connecting to the text file via the DAO database engine:
    "I added the text file as follow, new connection -> Access/Excell (DAO) -> select the file and the database type as text"
    Thus I would use the same code for changing the text file as for changing an Access database. See Kbase [1218178 - Error: "Logon failed" when connecting to Access database in .NET application|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313338333133373338%7D.do] for more information. If that does not work, you may want to consider connecting via ODBC or feeding the data from the text file to and ADO .NET dataset and pointing the report at the dataset.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • HT4623 I have an iPod with iOS 4.2.1 and would like to up date version 5. The pc I normally sync with has XP operating system. So I can't up date to iTunes 10. And my iPod doesn't show the software update button shown in the article. What can I do?

    I have an iPod with iOS 4.2.1 and would like to up date to version 5. The pc I normally sync with has XP operating system. So I can't up date to iTunes 10. And my iPod doesn't show the software update button shown in the article. What can I do?

    You cannot update it if you can't get the latest version of iTunes. Actually, the latest version of iTunes will run in XP if you have Service Pack 2. Also, you posted in the iPad forum, and your profile shows you have an iPad, but in your post, you say it is an iPod. Is it an iPad or an iPod?

  • I would like to mark data on my iPhone / iPad as private or hide it. Is it possible? I could do it on my Palmpilot. Any data - addresses, calendar entries, files, anything could be hidden on the palm pilot. It'd be great to see this facility on apl pdts

    I would like to mark data on my iPhone / iPad as private or hide it and only unlock it with a different password. Is it possible? I could do it on my Palmpilot. Any data - addresses, calendar entries, files, anything could be hidden on the palm pilot. It'd be great to see this facility on apple products.

    I know what you meant. As I said, it's not possible to do so on the iPhone. Of course Apple could add such a feature to a future version of iOS, it's only software, but so far they haven't. You can suggest such a feature to Apple here: http://www.apple.com/feedback/iphone.html

  • After upgrading to Mavericks, all of my contacts disappeared. Did a "contacts archive" export and the file is 17mbs. Looks like there's data, but none of it at all displays. What gives? 20" iMac, early '09

    After upgrading to Mavericks, all of my contacts disappeared. Did a "contacts archive" export and the file is 17mbs. Looks like there's data, but none of it at all displays. What gives? 20" iMac, early '09

    After upgrading to Mavericks, all of my contacts disappeared. Did a "contacts archive" export and the file is 17mbs. Looks like there's data, but none of it at all displays. What gives? 20" iMac, early '09

  • Calculation of ''Total to Date'' like ''Year to date''

    Hello together,
    How would you calculate a Total to Date in Oracle BI.
    It should sum all values like Year to date up to a certain period inclusive all previous years.
    Example:
    Year Value
    2008 10
    2009 20
    2010 40
    If I select 2009 it shoul display 30. without the previous and the following row.
    Regards,
    Stefan
    Content Level Fiscal Period TOTAL (Do I have to calculate on a yearly level all the past years, - ago - 1, ago -2, ago - 3, ago - 4 up to - 20?)
    minus Year Value
    plus YTD
    Month and Total have to bes diplayed in on line.
    works for the current year but not when you back to last year.
    Edited by: stefanhess on Jun 14, 2010 1:54 PM

    an odd solution.
    In the physical layer you can duplicate the fact table and can join the time dim and duplicated fact with the complex join using the year column with the condition as
    time_dimension.year_column >= fact_table.year_column
    in your report when you bring the year and this measure you will get what you want.
    Edited by: kart on Jun 14, 2010 6:46 PM

  • BI 4.0 w/ Windows AD SSO, but Crystal Report (mdx) prompt login data

    Hi guru,
    We have been struggling for a while on the sso issue between BI 4.0, AD, BW, and CR.
    Our architecture is not complex:
    1. A BI 4.0 (BOE) on Tomcat (windows)
    2. Backend SAP BW as main data source
    3. AD, SAP Authentication are configured in CMC
    4. User can login to Windows Desktop (login to Win Domain) and then link to BI Launchpad w/o giving password (Windows SSO), it works.
    5. Crystal report can be published via BW to BI/2.0/.... folder on BI
    But one thing still not working:
    Our crystal report (using mdx for data accessing to BW) keep asking database login credential when a BI user login via Windows SSO. We want to get rid of this prompt and want to use a mapped R3 account for db access. each windows AD user has a corresponding mapped r3 account configured in CMC. We have tried, but not working.
    The only way we got to avoid the prompt is to remove bwmdx from Crystal Report SSO Config in CMC and manually change the published CR report to use "original data login" as well as assiging the r3 credential. But we have to do it for each CR report.
    Anyone have done this before ?
    Is it possible to Login via Windows SSO and then view CR report w/o giving pwd ?
    Or we have to do some special setting while making the report ?
    Or users have to login by R3 account to get such SSO ?
    Thanks for any help.

    Thanks for prompt reply, My answer is:
    No, SNC is not enabled.
    Since BO can get data via the following 3 method from BW, so I'm not sure whether SNC is a must (just for CR SSO)
    Universe(UNV) --> BW
    Universe(UNX) --> BW
    OLAP --> BW
    OK, if SNC is a must to link AD SSO to BW SSO, what kind of SNC (client vs server) should I configure ?
    Thanks
    Edited by: Wilson KU on Sep 7, 2011 11:04 AM

  • PLSQL - Like statment

    can i add parameter to like statment in PLSQL code :
    select * from abcd where any_value like '%input parameter %'
    thanks

    This should be asked in sql pl/sql forum PL/SQL
    Timo

  • Updation of Duplicate item taken by Parial-data search

    Hi all,
    i have written programm to retrieve the Data by Partial data search,by setting the Flag as DB_DUPSORT.I am retrieving the Data back but i can't update the Record by using cursor->put(),by setting th FLAG CURRENT.
    will it possible,if duplicates are present there...??

    Hello,
    Have you taken a look at:
    http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/db_set_flags.html#DB_DUPSORT
    http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/dbc_get.html#DB_CURRENT
    http://www.oracle.com/technology/documentation/berkeley-db/db/api_c/dbc_put.html#DB_CURRENT
    If these do not help answer your question, please post a small
    stand-alone test which reproduces the issue.
    Thanks,
    Sandra

Maybe you are looking for

  • IPad app store "unknown error" message when updating app

    iPad app store "unknown error" message appears when updating app

  • Upgrading 8 pro to 8.1

    Hi I am trying to upgrade windows 8 pro to 8.1 . First of all it is taking long time to download from Microsoft store and giving an error " "Something happened and the windows 8.1 couldn't be installed. Please try again Error. code : 0x80071a91"  The

  • IPhone stops getting email randomly, won't update???

    My iPhone 4 sometimes stops getting email, pushed or fetched.  This happens for all email accounts, 2 gmail and 1 mobileme/mac account.  I'll suddenly realize that I haven't gotten an email for a long while, and when I check the phone it won't be abl

  • Annoying sound settings...

    Hello people, I've been mostly using my speakers on my iBook, but I've been recently using headphones to listen to what ever I'm using my iBook for. It seems that everytime I reboot my computer or even when I don't sometimes, I always have to rebalan

  • FORTE AUSTRALIA USER MEETINGS IN HOBART NEXT WEEK

    Dear Forté User: The Inaugural Forté Australia User Meetings are next week and those of who are registered are in for an extremely valuable experience. EVERY SINGLE CUSTOMER and PARTNER from Australia will be sending representatives to these meetings