Crystal reports convert number to time value

Hi,
I have a field which is stored in numeric format for time.
The field can be 3 or 4 digits field.
I want to display this fields as the time field.
For example,
900    9:00 AM
1000  10:00 AM
1600  16:00 AM
Please reply.Thanks.

Hi  Saurabh,
Try the below formula
StringVar sMyTime := ToText({your_numeric_column}, 0, "");
IF Len(sMyTime) = 3 Then
    cTime(sMyTime[1] & ":" & sMyTime[2 to 3] & " " & "AM"
else IF Len(sMyTime) = 4 Then
    cTime(sMyTime[1 to 2] & ":" & sMyTime[3 to 4] & " " & "AM"
--Naga

Similar Messages

  • Crystal Reports scheduling disregard the default values and requires prompts to be answered every time.

    Hi guys,
    When scheduling a Crystal report, the page to configure the prompt answers does not have any prompts answered by default - they all appear as "[EMPTY]". This means that any required prompts must be answered during configuration of the alert schedule. Since prompt is required and the default value (which is equivalent to not answering the prompt) is not available in the selection list.
    Is there any way around it?
    Ideally I would like the prompts to keep the default values, so I could schedule the report for all the prompt answers (Whole list of value) instead of having at least one prompt value.
    Is there any configuration in crystal reports or on database side that could help me resolve the issue.

    First off, Thank you for your replies!
    Rabeb SLIMANI, we can't use universes by user requirement. If we could, it would have to be through IDT (Information Design Tool) but, nonetheless, the users want a direct BICS connection between BEx and WebI.
    Victor Gabriel Saiz Castillo, we can't do that because the users want to choose between accessing the published instances or refreshing the reports on demand.
    The way i see it, it would take a second set of BEx query + WebI report to provide both functionalities (one for ready for input, another for not ready for input). Am I correct?
    @Sathish Kumar (sorry, i can't tag you right), i was checking with the BW team and we already have the logic for If left null, populate with Customer Exits.
    But they are currently mandatory, so we will change them to optional and test the behavior.
    If you have any other ideas, they are more than welcome! I will keep you posted on the outcome!
    Best regards,
    Francisco

  • Crystal Report Taking too much time to load

    Dear Support team,
    Every time I open an existing Crystal Report, it is taking me about 5 minutes to load (Even if its a new and Blank report). Also after one report has loaded for the first time, Loading further reports would take the same long time.
    Please note that I was not facing this problem earlier (Same Crystal Report version), this issue started occurring after I came back from a leave, and our IT guy have told me that he had uninstalled the Visual Studio in my absence (License issue), and no further relevant changes that he can think of.
    Appreciate your help on resolving this issue, I work with a large number of crystal reports on daily basis, and this problem is killing my time.
    Thank you for your time and support.
    Best Regards,
    Saadeddine Nahlous
    Systems Developer

    Hello again,
    I just found out more info about this problem that might help us troubleshoot it:
    My colleague and I were both using the Old Crystal Report version 10 (Before SAP) till about a month ago. Afterwards, I have installed the new SAP Crystal Reports 2013 Trial version to test it, and i faced no issues there and ordered to purchase the product. One week ago, my company bought for me and my colleague two licenses which arrived in two boxes containing two DVDs and we re installed the software using the DVDs. Since then we BOTH are facing this delay issue when opening any Crystal Report. (The delay is unbearable, it is truly about 3 min without exaggeration).
    For the record, we both have high spec PCs.
    Appreciate investigating this issue with us please.
    Thank you

  • Crystal Report 8.5 (Date/Time Tab Missing)

    Hi All,
    I have been using Crystal Reports Pro 8.5 (SP3) for a while now but I have come across one problem which I cannot understand.
    All Date and Time fields within our SQL database are showning in Crystal as only Date fields even though they are definately Date Time field. If I explore the field data within Crystal it only shows me the Date field.
    The interesting twist is my work colleague has got the same O/S Windows 7 and the exact same version of Crystal as me and he is able to see the Date/Time tab when formatting the field and Crystal identifies the field as a DateTime field.
    Any help would be much appericated.
    Thanks

    Hello,
    It's the ODBC driver you are using, or how ever you are connecting. They are likely using a newer version which CR see's the data/time field type and not convert it to a date field.
    Or it could be one of your Report Options. 8.5 is 10 years old not so I don't recall what the reason for this was now.
    Check your database driver and settings.
    Thank you
    Don

  • Crystal Report 10 take toomuch time to display report

    hi every one
    i have designed some reports  with crystal report 10. i am using classic ASP
    and windows 2003 Enterprise server as web server. The problem is that when i browse the report in Internet explorer, it takes too much time to display the report, and many times it does not display the report giving simply the message "the page cannot be displayed"  500 HTTP internal error. i am using SQL server 2000 SP4 as data source. when i use Access it disp[lay the report but take too much time to display the report.
    pls help me
    thanks

    All I can do is provide suggestions (CR 10 has been out of any support for over 4 years now...).
    Make sure you are using the latest updates - both on your dev and on the deployed server. Search for the updates here:
    http://service.sap.com/sap/bc/bsp/spn/bobj_download/main.htm
    You also need to consider "too much time to display the report". As compared to what? E.g.; how is the performance with the same database, dataset, etc, in the CR designer? The performance at runtime will never be better than the designer.
    You may also want to experiment with different database connections (OLE DB, ODBC, Native) and different DB clients.
    Finally, see the following for tips on how to improve performance:
    http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/d08468e2-a81d-2b10-faa9-9837f58ee1c2?quicklink=index&overridelayout=true
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/208edbbf-671e-2b10-d7b5-9b57a832e427
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8029cc96-6ff3-2b10-47a2-b30ea790ea5b
    The above is written for the CR SDK for .NET, but the same tips will apply to your solution
    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]

  • Crystal Report Prompt For Enter Parameter Values

    Hi,
    I did a report with 2 subreports embeded in VS2005 using VB and it worked fine but when I ported the whole application to VS2008 the above problem occurs. Here are some codes:
        Private Sub btnPreview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPreview.Click
            Dim viewer As New frmReportPreview
            Dim rpt As New ReportDocument
            Try
                rpt.Load("C:\Report\crptMain.rpt")
                rpt.SetParameterValue("Code", Me.cbxCode.Text)
                rpt.SetParameterValue("Code", Me.cbxCode.Text, "crptSubReport1.rpt")
                rpt.SetParameterValue("Code", Me.cbxCode.Text, "crptSubReport2.rpt")
                viewer.report = rpt
                viewer.WindowState = FormWindowState.Maximized
                viewer.ShowDialog()
            Catch crptEx As CrystalDecisions.CrystalReports.Engine.EngineException
                MessageBox.Show(crptEx.Message, "Crystal Report Errors...")
            Catch ex As Exception
                MessageBox.Show(ex.Message, "Crystal Report Errors...")
            End Try
        End Sub
    Private Sub frmReportPreview_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim rpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            Try
                Me.CrystalReportViewer.ReportSource = m_report
                Me.CrystalReportViewer.RefreshReport()
            Catch ex As Exception
                MessageBox.Show(ex.Message, "Error...")
            End Try
        End Sub

    Subreport Parameters are contained within the Main Report's ParameterFieldDefinitions collection. Passing Subreport Parameter values directly to the Subreport will result in the values not being applied and the user being prompted at runtime to provide new values.
    Ludek

  • Crystal reports 2008 Set optional parameter value

    Hi,
    I'm working with .net Visual Studio 2008 C# and Crystal reports 2008 (Crystal.Decisions) and when I try to set a parameter to optional and set its value to no value, it returns the error: "Invalid parameter name", here is my code:
    foreach (CrystalDecisions.Shared.ParameterField param in Report.ParameterFields)
                            if (!param.HasCurrentValue &&
                                !Report.DataDefinition.ParameterFields[param.Name].IsLinked())
                                switch (param.ParameterValueType)
                                    case ParameterValueKind.NumberParameter:                                  
                                        param.IsOptionalPrompt = true;
                                        param.CurrentValues.IsNoValue = true;                                  
                                        break;
    I'm doing this because some of the parameters can be left null, and in this case I don't want to show the parameter prompt.
    In past versions of Crystal (such as Crystal Reports 11.5) we had the chance to left the parameter value null and did not showed the parameter prompt dialog, and this behavior repeats in a lot of reports.
    thanks in advanced

    Please don't post the same question more than once. This is a public forum so be patient.
    Install SP4 and test again.
    Try these samples:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsSDKSampleApplications
    Don

  • Crystal Reports 2008 SP3 Additional parameter values are needed

    I recently upgraded to Crystal Reports 2008 SP3, and now when I try an export a report from the Crystal Reports Designer, I get the error "Additional parameter values are needed before this report can be saved or viewed with data.  Click 'Ok' to enter the missing values or 'Cancel' to proceed without data".  I am trying to export the report to Crystal Reports format.  The report is getting data from a MS SQL 2005 stored proc. I tried building a new simple report (just took all the fields in the result set and put them in the details section) using the same stored proc, and get the same error when I try to export.  
    FYI, before I try to export I always preview the data in the report, so the parameters are defiantly set correctly.
    This was working correctly in Crystal Reports 2008 SP2.

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • Crystal reports converting varchar 254 to memo data type

    Hi All,
    We are still using Seagate Crystal Reports 7.5 for some of our reporting. I have a problem that hopefully someone can help with. One of our connections is to ODBC- AR System ODBC Data Source.
    In that data source there are fields defined as varchar 254 (confirmed by DBA),
    But Seagate is calling them memo fields- which is causing problems since you canu2019t use memos in selection criteria or formulas.
    This happened after the field names were renamed. I noticed when the newly named fields were not showing as an option to map the old name fields to- because by default it looks for same data type, after unchecking same data type option the fields showed for mapping but wrong data type makes them useless. I canu2019t even convert them to string with formula field.
    Any input would be greatly appreciated.
    Thanks-

    Hi,
    Yup, this was a problem with versions prior to 10.  If a field was longer than 254 characters, Crystal handled them like Memos and you cannot use them in formulas.
    The only suggestion I can offer would be to upgrade.  Crystal can now use memos in formulas and no longer has a 254 character limit on strings.  So your charcter fields will remain as charater and not changed to Memos.
    Good luck,
    Brian

  • Crystal Report Takes very long time to display results

    Dear All,
    I am new to Crystal reports. We have installed Crystal report developer 2008 SP3 on Windows7 Service pack 1. We are creating reports from SAP ECC 6 EHP 4 Ready in Crystal Reports. The problem we are facing is that every report which we have developed in Crtystal reports is taking around 1 to 2 hours to display results. the reports are pertaining to only one day or one month data. we have also switch off "Verify On First Refresh", "Verify Stored Procedures On First Refresh", "Verify Database" and  we are also not saving data on report level as per the threads which are already posted in the forum pertaining to our problem.
    You are requested to kindly guide me how I can improve the performance of our crystal reports.
    Regards,
    Danish.

    You select expert formula says enough. It would appear that little or no data filtering is being carried out on the database server. Thus all records will be returned to Crystal and then filtered locally.
    You need to try and incorporate the logic of formula  {@Form_PeriodCvn} into the select expert. Or build a view/stored procedure which returns a value compatible with your filtering requirements.
    What is contents of formula  {@Form_PeriodCvn}
    Ian

  • Problem with Crystal Reports not displaying all parameter values

    Hello,
    A co-worker of mine is developing a report in Crystal version 11.5.8.826.  One of the requirements from his user is that they would like to select from a list of users for applicable criteria to appear in the report.  He created a parameter with a dynamic list of values, entered prompt group text, selected "existing" as the data source (and chose the corresponding field from the table).  This dropped the UserID field into the "value" field in the table and linked the table to the parameter.  We selected "allow multiple values" as "true" and "allow discrete values" as "true". 
    Here is the problem.  When Crystal prompts us to select the parameters, it doesn't show all of the applicable list of users (it shows 8 out of 12 users).  When we run the query in a standalone sql generating tool (Toad or Golden), we see the full list of users.  Crystal Reports appears to be filtering the selection list of users for some unknown reason.  We have tried changing most every option that we could find within the parameter, but no luck. 
    The problem definitely appears to lie within the parameter- if we run the report without the parameter, we see the full list of users.  Once we add the parameter and attempt to select one or many users, the problem appears.
    Any thoughts?  What am I missing?  Any help is appreciated.
    thanks,
    Noel

    I'll answer my own question in case somebody is curious or happens to find this message via google or another search engine.  See this link.  You need to set your upper threshold within your Registry Editor.
    http://www.crystalreportsbook.com/Forum/forum_posts.asp?TID=8029

  • Crystal Report "some parameters are missing values" while exporting/printin

    I am able to pass parameters from a JSP to a crystal report through CrystalReportViewer and view the report. (I tried doing it using the code provided on this help forum. I was getting a message: "Some Parameters are missing values". I had to add 1 line: pfield1.setReportName(""); for every parameter field. And It worked..)
    Now I can see the "Print" and "Export" buttons. But when I try to print or export the report, I get the same message "Some Parameters are missing values".

    see posting "parameter driven export to excel" on April 26th

  • Crystal Report looks the design time xml at run time

    Hi,
    I have a question about crystal report. I am using VS 2008. My PC is Windows XP SP2.
    The reporst was using xml datasource. At design time, I specifiy the datasource as a xml file (D:\Report\myReport.xml). At run time, on a different pc where the design time xml file does not exist, I prepare the datasource like:
    DataSet data = new DataSet();
    XmlTextReader reader = new XmlTextReader(xml, XmlNodeType.Document, context);
    data.ReadXml(reader);
    and then
    report.Load("myReport.rpt");
    report.SetDataSource(data);
    report.Refresh();
    Edited by: Don Williams on Aug 7, 2010 10:02 AM

    Hi Bhushan,
    No it's still not working.               
    Following is what my code looks like after applying your fix. Is it correct? Does the ConnectionInfo.ServerName have to be my report xml or any xml file will work?
    Please let me know if my code is correct or wrong and how to fix it if it's wrong.
    Thanks for your help.
    report.Load(reportFile);
    foreach (Table t in report.Database.Tables)
                        ConnectionInfo crConnectionInfo = t.LogOnInfo.ConnectionInfo;
                        crConnectionInfo.ServerName = "D:
    UpdateConfig.xml";
                        crConnectionInfo.DatabaseName = "D:
    UpdateConfig.xsd";
                        TableLogOnInfo crTableLogOnInfo = t.LogOnInfo;
                        crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
                        t.ApplyLogOnInfo(crTableLogOnInfo);
    report.SetDataSource(data);
    report.Refresh();

  • Displaying a user logo in a Crystal Report dynamically at run time

    Using Visual Studio 2010, CR for VS 2010 on a Win 7 64 bit dev machine.  The software app that I'm creating is a full Windows application (not for the web).  Compiling my app for .NET 4.0.
    Actually, in January, 2012, we purchased the CR 2011 full version and subsequently installed this version for use within the development environment (VS 2010).  References that I use show (for example) CrystalDecisions.CrystalReports.Engine version 13.0.2.
    I have hundreds of hours of experience using Crystal Reports within VB, dating back to VB 6 and CR 8.5.  In a software app that I am currently writing, (where I am using VB in VS 2010 and CR 13.0.2), the Graphic Location formula within a picture "placeholder" is not working.  I am using a parameter called pUserLogo to set the path to the graphic location at runtime, but to no avail.  The picture that I'm using as a placeholder is not changing at runtime.
    I have scoured the internet for solutions to this problem.  I have also attempted to upgrade both the CR for VS 2010 (a.k.a. CR developer version) as well as the CR runtimes (both the 32 bit and 64 bit versions), but this has not helped.  The picture is never replaced at runtime while working within the IDE (i.e. running the app from VS, nor after compiling and then running as a full-blown application).  I have also tested this on another development machine.
    I eventually gave up trying to use the Graphic Location formula method, and instead went with a method that uses a DataSet within a DataTable to set the image (of an image column) as posted online.  This method actually works within the IDE.  However, if I then install my app to another PC (Win 7 64 bit as well), the CR crashes the app.  After extensive searching online, I found that referencing a DataSet in VS 2010 inside a CR, led to many other issues, such as having to use the 'useLegacyV2RuntimeActivationPolicy=true' statement in app.config.
    Further, I read that using a DataSet within CR in VS 2010 meant that you had to compile for .NET 3.5, rather than 4.0.
    Eventually, I created restore points on both PC's and then upgraded everything to 13.0.6.  But this did not help either method.
    All I am trying to do is 1) let the user of my app select an image before the report is created, and then 2) display that image on the report.  This particular report doesn't even need to reference any database, as all of the numbers that I'm displaying in the report are simply parameters that I update during the report's creation.  It is a very simple, straight-forward report.
    I would be happy to setup a GotoMeeting so that someone at support could see what is happening and could also review the code.  There are many more details, such as what errors I've encountered along the way, and what web sites I've been to in researching these issues, but I will leave that for continued discussion.
    Regards,
    Dominic

    An older discussion on this issue can be found at:
    http://stackoverflow.com/questions/2548723/unable-to-programically-set-graphic-location-in-crystal-report
    Since I couldn't get this method to work, I then tried the method as described here:
    http://adf.ly/91637/banner/aspalliance.com/1097_Importing_Dynamic_Images_to_the_Crystal_Report_without_Database_Overhead_using_Visual_Studio_2005.all
    The second method, which uses a DataSet within a DataTable as described in the above link, does work, and it correctly displays the image, but only in the IDE.  When tested on a "client" machine, opening the report causes my app to crash, with no exception or error message except for the "...has caused the application to stop working".  Previously, before introducing said DataSet into the report, the report loads and displays fine on my client machine.
    Further research led me to these two threads concerning the usage of the crdb_adoplus.dll which is necessary when using a DataSet in VS 2010 with CR.  It seems that the folder dotnet1 is not accessible, and thus there are workarounds for this issue.  See these two threads, below:
    http://scn.sap.com/thread/1802638
    http://scn.sap.com/thread/1665437
    Again, I followed the recommendations that I needed to set the Startup flag 'useLegacyV2RuntimeActivationPolicy=true' in app.config.  However, the workaround where I should target .NET 3.5 instead of .NET 4.0 is not reallly an acceptable option to me (and I don't know if it will work, anyway).
    So my question remains; Can anyone please tell me if A) They have any issues using the "picture placeholder/formula" method for loading a picture at runtime, and/or B) If there is a fix for the DataSet issues apparently inherent in using VS 2010 with a Crystal Report?
    Thanks in advance, for your reply.
    Regards,
    Dominic

  • Crystal Reports 10, Want to pass values from subreports to main report

    Post Author: playmkr278
    CA Forum: General
    Is there a way to just share values out of subreports.
    The reason I ask is that I am having problems pulling the correct information in one subreport so I'd like to use 2 subreports to pull out Billable hours on one and Billed Hours on another and then add them together to display on the main report.

    Post Author: Jedit
    CA Forum: General
    Yep there is!
    In your sub report
    I the formula editor create a shared variable then create the same variable in your main report.
    EG
    IN your SUB
    Create new formular called tothrs etcu2026..
    whileprinting records;
    shared numbervar tothrs: sum({table.fieldname}]
    In Your Main Report
    whileprinting records;
    shared numbervar tothrs
    this passes the value from your sub to the main, check help for different types of format as the one above is only for a number there are others for time & date etc..
    hope this helps!
    I have been doing a similar exercise myself but got stuck summing the parameter values in my main report, if you solve this let me know?
    Please see http://technicalsupport.businessobjects.com/cs/forums/thread/6210.aspx

Maybe you are looking for

  • My IPhone does not ring into my voicemail from my land line which I have set up to forward to my IPhone. How do I fix this?

    HI, I bought my IPhone 4 in March of 2011. I use it for work purposes and I have my landlind from my desk forwarded to my IPhone. I am current on all of my updates but for some reason around AUgust 8th or the wek of I have not been able to get voice

  • Is this possible without PBR - Routing from Specific Host to Any

    Hi, I have an issue where I don't currently have PBR options on my core switch. Now I know I can amend the SDM template and enable the routing one then reboot (I'm also runing ipservices). At the moment though this is not an option. I have a host - 1

  • N97 does not charge. HELP!

    my n97 does not seem to charge! the handset recognises the charger is plugged in and the bars on the screen shows its charging but the charge doesnt seem to reach the battery, iv changed the battery for a new one and i get the same thing happen any i

  • Help with J2ME installation !

    Hi all, I am a complete newbie to J2ME. I need to start working small applications for Ericsson K750i as a part of my project. Can anyone let me know which package I will need to install to be able to write apps for k750i ? Is it the Java Wireless To

  • Extract rar files

    I am new to Mac World and need help with "how to extract RAR files?"  From what I can see, many people recommended UnRARX.  However, I can not get it to work on my MacBook Pro.  Any recommendation on a different program?