Crystal Reports 2008 - help with formula to retrieve lastfullmonth

Hi, I'm new to this forum.  First post.  I have a SQL query where
:month(CAST(a.LAST_MOD_DT / 86400 AS datetime) + CAST('01/ 01/1970' AS datetime)) = (MONTH(getdate())- 1)
I need to create a CR formula that will pull in data from last month as this report will be run on a monthly basis.  If I use 'getdate() -31' there will be a problem with the months that don't have 31 days.
I'm also very new with creating formulas so including an explaination would be helpful.  Thanks,
Joyce

Sorry for the slow repsonse in getting back to you.
I wasn't able to get the SQL query to work.  I did find one that does work except I need to find out how to pull in the minimum date and the maximum date of the records into the report.
Here's the SQL query:
--to query for the prior month,  if January then month = 12 else month = (current month - 1 month).
and
month(CAST(a.LAST_MOD_DT / 86400 AS datetime) + CAST('01/ 01/1970' AS datetime)) =
CASE WHEN cast(DATEPART(Month,GETDATE()) as datetime) = 01
                      THEN month(cast((str(12)+'/'+ str(01) +'/'+STR(YEAR(Getdate())-1)) as datetime))
                      ELSE MONTH(cast((str(DATEPART(Month,GETDATE())-1)+'/'+ str(01) +'/'+STR(YEAR(Getdate()))) as datetime)) END
--to query for the proper year, if January then year = (current year - 1 year) else year = current year.
and
year(CAST(a.LAST_MOD_DT / 86400 AS datetime) + CAST('01/ 01/1970' AS datetime)) =
CASE WHEN cast(DATEPART(Month,GETDATE()) as datetime) = 01
                      THEN year(cast((str(12)+'/'+ str(01) +'/'+STR(YEAR(Getdate())-1)) as datetime))
                      ELSE year(cast((str(DATEPART(Month,GETDATE())-1)+'/'+ str(01) +'/'+STR(YEAR(Getdate()))) as datetime)) END

Similar Messages

  • Crystal Report 2008 included with SAP integration Kit

    Hi
    We want to know the crystal report 2008  come with SAP integration Kit

    Take a look into the following document:
    http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/004aacbb-4983-2b10-8da7-cdff5dcbb948
    It might help.

  • Integrating Crystal Report 2008 Developer with Visual Studio 2008 Standard

    I have Crystal Reports 2008 Developer version 12.0.0.683 on my computer. I also have Visual Studio 2008 Standard. I know the standard edition of VS 2008 does not have the bundled crystal reports, but since I bought the full version of CR 2008 separately, I figure I should be able to use CR within VS 2008. The problem I am facing is integrating Crystal Reports with Visual Studio, so I can create reports from within visual studio.
    Crystal Reports was installed first and then Visual Studio. As per suggestions on this and other forums, I repaired my installation of Crystal Reports, but that did not help. I then ran Visual Studio integration manager, but when I run it, it only detects Visual Studio as the currently installed IDE, but does not detect CR 2008. I downloaded service pack 2 for CR, but have not installed it yet. I do not want to install it if it is not going to help. I would also like to avoid uninstalling my copy of CR if at all possible.
    I am a newbie at development in visual studio. Any help will be highly appreciated.
    Thanks,
    Rajib

    Don't want to go against what Jason said as it may be correct - if we go strictly by the documentation provided (sorry Jason, Dan says...). However, here is something to try;
    Uninstall CR. Look for any left overs; c:\program files\business objects\... and delete all of that.
    Look in the registry for HKLM\software\business objects and remove the business objects entry.
    Download CR 2008 from here:
    http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx
    That is a trial version and I believe it is already at SP 1. Use your keycode to install. Once this is done, you should have the ability to use CR in .NET. I'd recommend you do apply sp 2 now also.
    Ludek
    Follow us on Twitter
    http://twitter.com/SAPCRNetSup

  • Crystal Report 2008 / JavaScript hyperlink formula/ Issue

    Hi,
    We've developed the Crystal Report using the Crystal Reports 2008 software & integrated it in asp.net web page and also deployed in IIS web server. We have a requirement like opening the sub report in a new window. We have integrated the sub report also in a asp.net web page & passing the parameters in URL & acheived it..
    For the above, we have used JavaScript code like "javascript:window.open('SubReport.aspx','...','..' ...)" in the hyperlink formula field of main report. It works fine while running using VS 2005 in the development box.
    But in production serer (Windows 2003 server), the JS URL in the formula field is not working properly. Instead , it is rendered as a drill down JS url. Like javascript:bobj.event.publish('drilldown',........)
    Can you please help us to resolve this issue?
    (OR) Do we have any other approach to open the web page in new window from CR (same like a popup window)
    Thanks
    Jeyakumar
    Edited by: Jeyakumar Seenivasagam on Nov 21, 2008 12:02 PM

    I understand that the point of this is to allow the URL link to open the Subreport.aspx page in a new window. This can be problematic due to cross-site scripting restrictions. A few years ago we found that it was possible for report writers to add JavaScript to reports. This isn't a problem if the report writers are honest and nice. However, it is possible for JavaScript to be malicious so that ability to include JavaScript was turned off when the app uses our webform viewers. There may be a way to turn it off in the registry though. This is documented for CR XI r2 [here|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do].
    I am not sure if this reg key works for the .NET viewer, though the note specifies DHTML and .NET InfoView, so CR should work also. As you are using CR 2008, I suspect the key would be:
    HKLMSoftwareBusiness ObjectsSuite 12.0Crystal Reports
    You will most likely have to add the Export folder, then add the HTML folder, then add the EncodeHTMLForSingleLineFieldObjects and set it to "no".
    Please note that this is a hack / workaround found for CR XI r2. The functionality you are looking to exploit was removed for a reason. As such if the above does not work for CR 2008, it will not be considered to be a "bug" and we will not be able to send this to R&D for a resolution.
    Ludek

  • Integrate the Crystal Reports 2008 SP1 with SAP R/3

    Hi Experts,
    I have a requirement to integrate  Crystal Reports with the SAP R/3 . I'm new with this kind of integration and need help because I need to create a report based on the R/3 data.
    I have read some posts from this forum especially on the integration kits - SAP forum but still don't have any idea on how to do it?
    I already installed the BusinessObjects Enterprise XI 3.1 and also Crystal Reports 2008 SP1. I also download the Integration Kits -SAP installer from the SAP Marketplace but when I tried to installed it, I get stuck because it need information for BW publisher.
    As for your information, we don't use any BW server because we only use R/3.
    Can anyone help me where to start on this integration?
    Thanks,
    -Syahida-

    Hi Stratos,
    You're right regarding the transport files. My basis team able to transport that file but when I try again to connect from Crystal Report to R/3, it come out with other error like " Connect to SAP gateway failed" and " partner 202.171.46.161 :3300 not reached"
    What I did were :
    a) Click on blank report
    b) Create New Connection
    c) SAP Tables, Cluster
    Did I do any wrong here because the error cameout after I did all the step above ? When I look out on the error, it seems like it need to use port 3300.  Is there any specific port required for the integration? This is because if the integration through SAPGui, it should used port 3200 and if go direct using SAPRouter, it will use port 3299.
    Really need your expertise here or any document that I can refer because the standard document for integration kit for SAP did not mention anything about the port.
    Thanks and Regards,
    -Syahida-

  • Crystal Reports 2008 crashes with blanked out areas when downloading data

    We have a pc installed with Crystal Reports 2008 v1 SP2, which is used for report creation, but after a few minutes of downloading data from the server to populate the report, the report crashes with black areas instead of data in the report.  Please can anyone offer possible solutions?
    Pc: workstation
    Os: Microsoft Windows XP Professional 32 bit
    Processors: 1 Intel Core(TM) i5 CPU 650 @ 3.20 Ghz
    Total Memory: 3264 Mb
    Total Hard Drive: 298 Gb
    Display 1680 x 1050 pixels 65536 colours]
    Display Adapters: Microsoft 4.0.5733.0
    driver date: 2-28-2007
    Crystal Reports version: 12.1.0.883
    Crystal Reports 2008 SP2
    Oracle in OraHome111
    file version: 11.1.0.6.0
    driver_ODBC_Version: 03.51
    connects to remote server on site with Oracle 11g database, via above ODBC driver.
    Many thanks, any ideas would be appreciated!
    David

    Hi David,
    I've seen this before, your Video driver is out dated and you need to update it. Typically the makers of the mother board or video card, which ever one you are using, will have updates for your specific OS. Appears you are using the default Window generic video driver which may not support what CR requires or you have an older usp10.dll. You will likely get a new one if you install Windows XP Service Pack 3.
    Also, Crystal Reports version: 12.1.0.883 is SP 1 and not SP 2., second number is the Service Pack, 12.x.x.x.
    Download SP 4 and see if that may help:
    https://smpdl.sap-ag.de/~sapidp/012002523100009989492010E/cr2008_sp3_fullbuild.zip
    https://smpdl.sap-ag.de/~sapidp/012002523100008782452011E/cr2008sp4.exe
    Or incrementally:
    https://smpdl.sap-ag.de/~sapidp/012002523100009038092009E/cr2008win_sp2.exe
    https://smpdl.sap-ag.de/~sapidp/012002523100007123572010E/cr2008_sp3.exe
    https://smpdl.sap-ag.de/~sapidp/012002523100008782452011E/cr2008sp4.exe
    And you may need SP 3 or if you want to start off clean download the full build of SP 3 and then SP 4. Requires the keycode so make sure you have it, we can't give you a new one.
    Don

  • How to connect Crystal Report 2008 server with SAP BI/BW server

    Hi ,
    I have downloaded the 60 Days trial version of  "Crystal Report 2008 Server' from sap site to my machine. Now i would like to connect this Crystal server with SAP BI and want to use the data of BI Bex queries and Infoproviders.
    Can you please guide me how to connect them?
    Aslo how can i get the free trial version of Intergration kit ..here please provide me the entire full path of site(to download the Integration Kit).....
    Any inputs would be appreciated!!
    Regards,
    Naween

    Hi Michelle,
    Older versions of CR would allow you to run CR from a network share point but you still had to have a license for each user. Current versions of CR do not allow you to do this any more, possibly using a Citrix or Terminal Server would allow this but you still need a license for each user. Older versions had a Network install option.
    And as suggested exporting to PDF or some other format is fine for end users viewing your output. They are not using CR but Adobe Reader or Word etc. to view the reports, they just can't use the Designer to view the reports.
    Hope this is clear now?
    Thank you
    Don

  • Using Crystal Reports 2008 SP3 with the Brother 9500PC, 9700PC, and P9800PC

    We have using Crystal Reports with the Brother Label printers for years until we were forced to use Crystal 2008.  The label printers have worked in the past and we usually create a label template in the printer driver and this configuration is stored in the Crystal Report.  These label printers can use several different size cartridges.  When creating a report using the Editor, the report displays and prints correctly using the template embedded into the report.  This is using the updated SP3.3 service pack.  The problem is in the Run Time application that is embedded in another application to run the reports.  When printing a label from the application, the report previews just fine with the correct size and format.  However, when you try to print the label, the run time driver ignores the template embedded in the report and instead uses the default settings for the printer driver.  So, if I have a 1 inch cartridge in the printer, and the default settings for the printer is a 1 1/2 inch cartridge, then the report will try to print assuming there is a 1 1/2 inch cartridge which will cause the application to fail.  This is a problem with Crystal 2008 (12) and we would like to find a solution to this.  Thanks, Doug

    Hi Cameron, 
    You can setup custom label sizes in Crystal.  In the folder where you installed Crystal Reports is a text file called Labels_en.txt.  This contains the label definition Crystal uses.  You can add a new label in here. 
    Now when you open Crystal and create a new report by selecting the Mailing Label Repotr Wizard, you will see your new label when you get to that step. 
    When save a report, the report will do two things.  If you have set the report to a specific printer, Crystal saves the printer and paper settings inside the RPT.  When the print engine runs the report, if it can't find the printer saved in the report it will default to the default printer. 
    What I believe is happening is the application is loading the report and because it can't find the label printer it was designed with it's going to the default printer.  So you do have to set the PrintReportOptions in your application to redirect the report to the correct printer, driver and papersize. 
    This has pretty much been the way since version 4 that I can remember.  The positive side is you don't have to set all the parameters yourself.  You can get the PrintReportOptions from the report when you open it.  Then you just need to pass the printer name, driver and port.  The rest of the options (papersize) will already be populated from the Get. 
    Good luck,
    Brian

  • Crystal Reports 2008 SP3 with Visual Studio 2005 help !!

    Have application that uses reports developed using CR2008. The reports in question are created from an XML datasource and are populated at runtime with a dataset.
    The reports work fine on developement machine but the client machines keep displaying the database login prompt.
    What do I need to do to fix this

    Something is not right here. If you are looking at assembly versions, then there are versions 12.0.200.0 and 12.0.1100.0 - framework 2 and framework 1.1 respectively. These do not change from SP to SP.
    File versions do change. So, the assemblies for CR 2008, SP 3 would be 12.3.2000.601. Version 12.3.1100.601 is not familiar to me...
    So, what libraries are you refering to? What is the version of the crpe32.dll?
    BTW., sharing of log files is typically reserved for [phone|http://store.businessobjects.com/store/bobjamer/en_US/pd/productID.98078100?resid=S6I@hgoHAkEAAGsiyVkAAAAR&rests=1282226845369] cases.
    - Ludek

  • For PrintControl.cab in crystal reports 2008 How can i configure Web.config in VS2005

    hi,  Now i am using crystal report 2008 evalution  with VS2005. In my ASP.net Application Viewiing reports using Crystalreportviewer PrintMode=ActiveX (not in PDF).If i am trying to print using Printcontrol.cab..in the client machine the activeX control is not installing in client. Its works good with crystal report bundle with 2005. with crystal report 2008 its not working. I want to know how i configuer web.config and others. Help me Pls.
    Instead of these code
    <configSections>
      <sectionGroup name="businessObjects">
        <sectionGroup name="crystalReports">
          <section name="printControl" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, Custom=null" />
        </sectionGroup>
      </sectionGroup>
    </configSections>
    <businessObjects>
      <crystalReports>
        <printControl>
          <add key="url" value="http://myserver/PrintControl.cab" />
        </printControl>
      </crystalReports>
    </businessObjects>
    new version=??? Publictokenkey=?????
    Thank u in advance

    The workstation machine needs to be logged in as someone with administrative access.

  • Unable to Connect Crystal Reports 2008

    Hii  All,
       Plz help...I am unable to connect to my Crystal Reports 2008 software with SAP Buiseness one.
    When i create new connection from the Database Exoert ->Selected SAP Buiseness One->After Selecting ->Asking Creditintials like License server Server Type,  But when it comes to Company Databae>Drop down the company i am not getting the company list??
    Please let me know the Problem and Solution
    Thanks & Regards
    Cherry

    Good days,
    Because you enter invalid SQL Server authentication.
    Please enter your :
    License Server : localhost
    Database Server Type : (your sql server version)
    Database Server : (your database connection) eg : localhost\SQLEXPRESS
    Click the DOT( . ) button.
    Database User ID : (your sql ID) eg : sa
    Database Password : (your sql Password) eg: p@ssw0rd
    Then click connect server.
    If Successful then
    Company Database : eg : SBODemoUs
    Username : manager
    Password : manager
    Else
    Goto  (Please enter your
    End If

  • Printing Extremely Slow Using Crystal Reports 2008 ActiveX Print Control

    Problem:
    We are trying to upgrade our existing Crystal Reports 10.0 ActiveX Viewer ASP based reports to the new Crystal Reports 2008 ASPX Report Viewer but are having print performance issues that have prohibited us from moving forward.
    Environment:
    Windows 2003 Server Standard Edition 32-bit with SP1
    IIS 6.0 running ASP .NET version 2.0.50727
    Crystal Reports 2008 SP0 with FP1
    Crystal PrintControl.dll version 12.0.0.796 (verified on server and client)
    Details:
    Crystal Reports 2008 ASPX Report Viewer Object & ActiveX Print Control Report Printing Scenario
    From a typical 27 page report, the user clicks the Print icon from the ASPX Report Viewer Object.
    The Print window with the message Crystal Reports Print Control immediately appears on the screen.  This window is on the screen for approx 30 seconds.
    The Print Setup window finally appears on the screen.  The user verifies the printer, chooses to print pages 1-5, and clicks the Print button from the window.
    The Retrieving page 1 message appears in the Print window.  The message remains in the window for approx 30 seconds.
    The Printing page 1 message appears in the Print window.  The message remains in the window for approx 30 seconds.
    The Printing page 2 message appears in the Print window.  The message remains in the window for approx 30 seconds.
    The Printing page 3 message appears in the Print window.  The message remains in the window for approx 30 seconds.
    The Printing page 4 message appears in the Print window.  The message remains in the window for approx 30 seconds.
    The Printing page 5 message appears in the Print window.  The message is in the window for less than 1 second.
    After 3 MINUTES of waiting the report finally starts printing.
    Crystal Reports 10 ASP ActiveX Report Viewer Report Printing Scenario
    From the same typical 27 page report that was used in the Crystal Reports 2008 scenario, the user clicks the Print icon from the ASP ActiveX Report Viewer.
    The Print window Immediately appears on the screen.  The user verifies the printer, chooses to print pages 1-5, and clicks the Print button from the window.
    The Print window Immediately disappears from the screen and the report Immediately starts printing.
    The entire print process takes only 3 u2013 4 SECONDS.
    Even  though we are trying to get the users to decrease the amount of paper used in report printing.  They still do a significant amount of printing.  The difference between the print performance using Crystal Reports 10 (3-4 seconds) and Crystal Reports 2008 (3 minutes) is totally unacceptable to our users.
    Has anyone else experienced this problem and is there a known fix for it?  This is the only thing holding us back from our upgrade and it has become very frustrating to us.
    Much thanks to anyone that can shed some light on this.

    Hi Brian,
    Please have a look at [this|Crystal 11.5 Activex control for viewer; post.
    However, have you tried with the No Printer options available in Print Options window from designer?
    Regards,
    Atanu.

  • Crystal Report 2008 compability

    Hi,
    I am not sure if this is the right place to post this but is Crystal Report 2008 compatible with Windows 7 on both 32bit and 64bit versions?
    I went to the SAP link below but not quiet sure about the specs details.
    Technical Specs tab include:
    Operating systems: Microsoft Windows XP with Service Pack (SP) 2, Windows Server 2003 with SP1, or later
    *** http://store.businessobjects.com/DRHM/store?Action=DisplayProductDetailsPage&SiteID=bobjemea&Locale=en_GB&ThemeID=28229900&Env=BASE&parentCategoryID=57903600&categoryID=57904900&productID=100546100
    Thanks,
    DT

    HI DT,
    Check below document for supported platforms for Crystal Reports 2008 sp4.  Go in crystal reports help, about crystal reports and check crystal version first then check this document.
    SAP Crystal Reports 2008 SP4 for Windows - Supported Platforms
    Thanks,
    Sastry

  • BO-CRYSTAL REPORT  2008--" FUNTION MODULE   /CRYSTAL/MDX_GET_STREAM_INFO"

    I'm working with BO Edge series , when I execute the query in Crystal Report 2008 ,  integrating with SAP BI 7.0 im getting the error as follows "Database connector error : 'function module'  /CRYSTAL/MDX_GET_STREAM_INFO" not found . if any one come across and solved the above error. Kindly let me proceed with the above issue.

    Hi,
    take a look here:
    Install Part #1
    /people/ingo.hilgefort/blog/2008/09/17/businessobjects-and-sap--installation-and-configuration-part-1-of-4
    Install Part #2
    /people/ingo.hilgefort/blog/2008/09/17/businessobjects-and-sap--installation-and-configuration-part-2-of-4
    Install Part #3
    /people/ingo.hilgefort/blog/2008/09/17/businessobjects-and-sap--installation-and-configuration-part-3-of-4
    Install Part #4
    /people/ingo.hilgefort/blog/2008/09/17/businessobjects-and-sap--installation-and-configuration-part-4-of-4
    Crystal Reports connectivity for SAP requires ABAP Transports to be imported to your system.
    Ingo

  • Crystal Report 2008 and SAP B1 8.8 Cannot import as report

    Dear Friends,
    I has a problem a bout crystal report 2008 SAP with SAP B1 8.8 cannot imported as "Report", if imported as "layout" crystal report working fine, any solution for this, i'am using SAP 8.8 PL 10 if any bug with crystal report in this page level?
    did any body now the solution?

    Hi,
    Try in other way, Open rpt file.
    In Add-in menu > SAP > Save
    provide necessary detail (Company Name,License Server,SQL User/Password)
    "save as per your need"
    Try to generate by this way...
    Thanks
    Shamseer

Maybe you are looking for