How to incorporate ratio in Crystal Report?

Hi,
I am new in Crystal report and had no technical background.
I would like to  know how to build ratio in crystal report? The draft layout as below:
                                              (RM)        %
Sales Revenue                        A           (A/A)*100
Cost of sales                           B            (B/A)*100
Where A and B are formula in crystal report.
Regards
Thomas

Hi Thomas,
Ratio is just a result by division.  If you take one field over another as a denominator, you got your ratio.
Thanks,
Gordon

Similar Messages

  • How to do this in Crystal Report

    I have table a and table b in two database.
    I made connections. Want to implement this kind of query in
    CR.
    How can i do this using add command?. Is it possible to type
    in below query in add command of one database and make it work?.
    table a and b are in two data database connection.
    select * from a
    where a.id not exist
    (select b.id from b where a.id = b.id)

    i need to set where condition in crystal report like count {table.support} where ({table.support} = "others")
    support
    others others myself parent others
    then the result should be : 3
    how to do this in crystal report ? i'm just a newbie in crystal report.
    You should go on a Crystal reports forum for your version of Visual Studio and Crystal reports probably.
    SAP Crystal Reports, version for Visual Studio
    Please BEWARE that I have NO EXPERIENCE and NO EXPERTISE and probably onset of DEMENTIA which may affect my answers! Also, I've been told by an expert, that when you post an image it clutters up the thread and mysteriously, over time, the link to the image
    will somehow become "unstable" or something to that effect. :) I can only surmise that is due to Global Warming of the threads.

  • How to create user editable Crystal Report with dynamic dataset

    What I would like to achieve:
    A program loads a report in runtime updates list of database fields (possibly includes sample data), open report in "Crystal Reports 2011" (or 2008) where user customizes report and saves it. Later on the program loads the report, fills actualized data and displays it in .net report viewer.
    What I do:
    CrReport = New CrystalDecisions.CrystalReports.Engine.ReportDocument
    CrReport.Load(TemplateFilename)
    Dim Results As DataTable
    DataTable is filled from a database
    CrReport.SetDataSource(mResults)
    CrReport.SaveAs(NewReportPath, True)
    The NewReportPath is opened in the default program.
    What are the problems
    The report is open in preview mode (not in design).
    When the field is added to the report the designer asks for XML datasource on preview.

    The short answer is that it is not possible. I broke the question to other two: How to save a report that it opens without preview? and How to create user editable Crystal Report with dynamic dataset, where it is possible to find details. Key answer is Re: How to create an editable previewable report?

  • How to connect to the Crystal Reports Server XI R2 installed in other machi

    Hi,
    we are 3 people here we have Crystal Reports Server XI R2 installed in one machine and Crystal Repoprts XI  DEsigner ( downloaded trial version) in all the machines ,
    in my machine only Crystal Repoprts XI  DEsigner ( downloaded trial version) is installed , how to connect to the Crystal Reports Server XI R2 which is installed in other machine
    Regards,
    kathyaini

    Hi,
    thankyou for your  response,
    my problem here is as soon as i open CR Designer , and if i  click on either New Report,Blank Report, or  standard report wizard  it is saying "failed to create database connection"
    on which ever thing i click it is telling the same "failed to create database connection" i created the user DSN properly , i could not create System DSN i dont know why.
    can u please guide me
    and one more thing on the machine where CR server is installed , on the same machine designer is also installed (i think u was telling the same) .  my question is how the server will know about the CR Designer installed in my machine.
    Regards,
    kathyaini

  • How to connect Java to crystal report

    How to connect java with crystal report ?
    Which are the API's for that

    In all this time you never considered searching?
    Cross post
    http://forum.java.sun.com/thread.jspa?threadID=791154

  • How do I deploy my Crystal Reports webapp???

    Post Author: figue
    CA Forum: .NET
    Hi, i've developed a web application using Visual Studio .Net and using the Crystal Reports for Visual Studio 2005. I've read almost all the "how-tos" that are available on the net to solve my situation, but i couldn't manage to deploy my application.
    I have no physical access to the web server, and i cannot execute a .exe or a .msi installer (i cannot use the "merge modules" solution).The only solution i think may help me is copying the Crystal Reports dll's to my BIN folder and using those dll's instead of using the GAC references.Here's what i've done:- I copied all the dll's that I found on Program Files/Common Files/Business Objects/2.7/Managed into my app's BIN folder.- I deleted all the references to the Crystal Reports' assemblies from my solution's property pages. FIRST PROBLEM: The references were deleted, but when I closed the solution, and opened it again, all the references returned.. After trying again and again, they finally dissapeared.- I tryied to add the references to the dll's that were into my app's BIN folder, but when I browse the file, select it, and accept the dialog box, nothing happens. No reference is added into the References window.- I tryied to add the GAC references again, to return to the previous state, but it's the same, i select the reference from the GAC and when i accept the dialog box, nothing happens.- I thought that maybe my pc has some troubles with the installed versions of crystal reports (i hace 8.5, XI and CR for VS 2005 installed), so i created a Virtual Machine, Installed VS 2005 and created a new web application with one .aspx and one .rpt and tryied to change the GAC's references for the BIN's DLLs. The same thing happend.
    Can somebody please help me? I'm gettin' really tired of trying and trying things and not gettin' in solved.
    Regards from Argentina

    Post Author: Ted Ueda
    CA Forum: .NET
    Unfortunately, xcopy deployments of Crystal Reports .NET assemblies won't work, since they rely on some dll's via COM-Interop.
    Those components have to be registered on the server - via merge modules install - and regretably, you're restricted from doing so.
    Sincerely,
    Ted Ueda

  • How to interpret or calculate Crystal Report Performance Timing?

    HI,
    I have been trying to interpret the Performance Information/Performance Timing of a Crystal Report. When I access this information from Crystal designer menu I see several fields but I don't know exactly which one gives you the total execution time in miliseconds or how do you calculate the total time using the fields.
    Help to interpret the following information will be appreciate. Example:
    MainReport.rpt
    Open Document:   0 ms  
    Run the Database Query:   703 ms  
    Read Database Records:   92 ms  
    Format First Page:   949 ms  
    Number of pages formatted:   2   
    Average time to format a page:   474 ms  
    Number of page starts generated:   13   
    Average time to generate a page start:   13 ms  
    Subreport.rpt
    Run the Database Query:   4 ms   For all instances
    Read Database Records:   2 ms   For all instances
    Number of page starts generated:   3   
    Average time to generate a page start:   0 ms   For all instances
    Number of subreport instances formatted:   1   
    Time to format all subreport instances:   38 ms
    Thanks!

    Have you seen this post:  [Needing to monitor the report run time and produce the dates/time on my rpt;

  • How to do this in Crystal Reports

    hi all,
    i want to fetch the text line from PO to my Crystal Report [Please see Image|http://i264.photobucket.com/albums/ii184/abing430/PLD-Crystal.jpg] i been able to do this in PLD but i cannot do it in Crystal report.
    regards,
    Fidel

    Have you tried reviewing the SAP standard crystal layouts to see how it is done there?

  • How do I open a Crystal Report from Microsoft Access?

    I'm looking for step-by-step instructions on how to launch a Crystal Report from a Microsoft Access application (for a dummy like me).
    My Crystal Report uses a connection to the Access database as the data.
    I have Microsoft Access 2002 with Microsoft Visual Basic 6.5.
    I have Crystal Reports 2008 CR Developer 12.
    I'll need to know where to find the Visual Basic code references, and/or ActiveX Controls, if applicable.
    Thanks
    Janeen

    I concur with Don. Just a bit of help - a sample VBA app is here;
    https://smpdl.sap-ag.de/~sapidp/012002523100006013432008E/rdc_vba.exe
    But as Don mentioned, you will have to downgrade to CR XI r2 (or lower) to implement the above solution.
    Ludek

  • How do I create a crystal report layout with a table and borders

    My crystal report is a signin sheet. The sign in sheet has an ID column, Name column, Institution column, Place to signin column, and Weekday columns with checkboxes in each column for the visitor to checkoff.
    How do I display the data that is being used int he crystal report in a table layout with borders around each cell? And is it possible to center vertical alignment of the data within eacvh cell like Excel?

    Blahahaha! Great answer Deb!
    Seriously though... There is no vertical alignment in CR. There have been several past threads related to this issue and all of them have various workarounds. None of them are very elegant.
    The best workaround I've found (especially if you are grid or borders) is to turn off the boarders for the field itself and drawl a rectangle around the field(s). Now you can place the field in the lower portion of the rectangle and adjust the rectangles height to place the field text in the center of the rectangle.
    This will give you more control over the height of your elements than using a carriage return before the text.
    Jason

  • How to set Formulas in crystal reports 2008

    Hi,
    I am generating crystal reports in vb6 using CR 8.5 and vb6 and below is the code snippet for the same
    CrystalReport1.Formulas(0) = "PrintTitle= '" & strMyTitle & "'"
    CrystalReport1.Formulas(1) = "FromDate= '" & MskFromDate.Text & "'"
    CrystalReport1.Formulas(2) = "ToDate= '" & MskToDate.Text & "'"
    Please let me know how the same functionality can be achieved in VB.Net using Crsytal reports 2008
    Any code snippet would be of great Help.
    Thanks in Adnvance.
    Ramnath

    Something like this:
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Public Class Form1
    Inherits System.Windows.Forms.Form
    Dim Report As New CrystalReport1()
    Dim FormulaFields As FormulaFieldDefinitions
    Dim FormulaField As FormulaFieldDefinition
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    FormulaFields = Report.DataDefinition.FormulaFields
    FormulaField = FormulaFields.Item(0)
    FormulaField.Text = "[formula text]"
    CrystalReportViewer1.ReportSource = Report
    End Sub
    Also, see the Developer help file:
    http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_dg_12_en.chm
    API reference:
    http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_apiRef_12_en.chm
    and [Crystal Reports for Visual Studio 2005 Walkthroughs|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23]
    And don't forget to use the search box at the top right of this page before posting to the forums...
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Edited by: Ludek Uher on Jul 26, 2010 8:57 AM

  • 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 write SQL in crystal report that can reuse SQL execution plan cache?

    I write the following SQL with crystal report parameter fields, and it is connecting to SQL 2005
    Select Name from Customer where CustID = '{?CustID}'
    The SQL profiler show that It is an ad-hoc query, how to write parameterized SQL which can reuse Execution Plan.
    Edited by: Chan Yue Wah on May 14, 2009 3:17 AM

    Since there are too many report, it is not possible rewrite all. Is that crystal report do not have option to change how it query the database ?

  • How do you set the Crystal Report Viewer Printer to Duplex

    Using the code below I can print in duplex mode, but this does not let me view a report before printing
    How do I set the Printer in the Viewer Control Bar of the Crystal Report Viewer to Duplex Printing programmatically rather than having to manually select Duplex through the preferences option?
    I have searched but the only example code I found produces errors in the code and will not run
    Private myReport As ReportDocument
    myReport = New ReportDocument()
    myReport.PrintOptions.PaperSize = PaperSize.PaperA4
    myReport.PrintOptions.PaperOrientation = PaperOrientation.Portrait
    myReport.PrintOptions.PrinterDuplex = PrinterDuplex. Vertical
    myReport.PrintToPrinter(3, False, 0, 0)
    In my VB6 Project that I am converting to VB.NET when I added Report.PrinterDuplex = crPRDPVertical, this allowed me to view the report and then print with Duplex without having to set the Print Preferences manualy
    I found 1386475 - How to set printer name and print job title at runtime using Report Application Server SDK for Visual Studio .NET
    But this causes errors
    Imports CrystalDecisions.ReportAppServer.ClientDoc
    Imports CrystalDecisions.ReportAppServer.Controllers
    Dim boReportClientDocument As ISCDReportClientDocument
    Dim boPrintOutputController As PrintOutputController
    Dim boPrintReportOptions As New PrintReportOptions
    Edited by: DavidMills on Feb 18, 2011 11:58 AM

    Hi David,
    You can mix both engines, just declare them both with different report object names. Here's all of my references:
    using System;
    using System.IO;
    using System.Xml;
    using System.Drawing;
    using System.Collections;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Data;
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    using CrystalDecisions.ReportAppServer.ClientDoc;
    using CrystalDecisions.ReportAppServer.Controllers;
    using CrystalDecisions.ReportAppServer.ReportDefModel;
    using CrystalDecisions.ReportAppServer.CommonControls;
    using CrystalDecisions.ReportAppServer.CommLayer;
    using CrystalDecisions.ReportAppServer.CommonObjectModel;
    using CrystalDecisions.ReportAppServer.ObjectFactory;
    using System.Data.OleDb;
    using CrystalDecisions.ReportAppServer.DataSetConversion;
    using CrystalDecisions.ReportAppServer.DataDefModel;
    using CrystalDecisions.ReportSource;
    using CrystalDecisions.Windows.Forms;
    using System.Data.SqlClient;
    using System.Runtime.InteropServices;
        public class frmMain : System.Windows.Forms.Form
            CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
            CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rptClientDoc;
    My file open dialog:
            private void btnOpenReport_Click(object sender, System.EventArgs e)
                rptClientDoc = new CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocument();
                openFileDialog.Filter = "Crystal Reports (*.rpt)|*.rpt|Crystal Reports Secure (*.rptr)|*.rptr";
                openFileDialog.FilterIndex = 1;
                 if (openFileDialog.ShowDialog() == DialogResult.OK)
                      btnOpenReport.Enabled = false;
                      btnSaveRptAs.Enabled = false;
                      object rptName = openFileDialog.FileName;
                    try
                        rpt.Load(rptName.ToString());
                        rptClientDoc = rpt.ReportClientDocument;
                    catch (Exception ex)
                        MessageBox.Show("ERROR: " + ex.Message);
                        return;
                    MessageBox.Show(rptClientDoc.MajorVersion.ToString() + "." + rptClientDoc.MinorVersion.ToString());
                        MessageBox.Show("Report opened.","RAS",MessageBoxButtons.OK,MessageBoxIcon.Information );
                        btnOpenReport.Enabled = true;
                        btnSaveRptAs.Enabled = true;
                    //MessageBox.Show(rpt.RecordSelectionFormula, "my record: ", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    MessageBox.Show(rpt.ReportRequestStatus.NumberOfPages.ToString(), "Number of Pages: ", MessageBoxButtons.OK, MessageBoxIcon.Information);
    As for the page number I use it off the Engine report object:
    MessageBox.Show(rpt.ReportRequestStatus.NumberOfPages.ToString(), "Number of Pages: ", MessageBoxButtons.OK, MessageBoxIcon.Information);
    And it works for me...
    Thank you
    Don

  • How do I connect from Crystal Report version XI to Oracle 10G express?

    I'm new to oracle 10G express and I'm developing an application that needs reports to preview some data from oracle tables.
    The oracle database is installed on the server and I installed the client on my machine. I need to use the crystal report 11 to report the output. Thus, I designed a crystal report that should simply read a table on oracle and though I need to be able to connect to the oracle 10G Express Edition database. I tried to create a connection from the crystal report using the Database Expert >> Create New Connection >> Oracle Server and I include the following parameters.:
    - Service: host:1521/XE
    - Username: username
    - Password: password
    Then when I tried to connect the crystal report crashes always.
    Is there any way to create a connection to the Oracle Database 10G express from Crystal Report 11?
    Please advise...

    Thank you bala,
    First, How I should start the Listener on the database server?
    Listener.ora content:
    SID_LIST_LISTENER =
    +(SID_LIST =+
    +(SID_DESC =+
    +(SID_NAME = PLSExtProc)+
    +(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)+
    +(PROGRAM = extproc)+
    +)+
    +(SID_DESC =+
    +(SID_NAME = CLRExtProc)+
    +(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)+
    +(PROGRAM = extproc)+
    +)+
    +)+
    LISTENER =
    +(DESCRIPTION_LIST =+
    +(DESCRIPTION =+
    +(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))+
    +(ADDRESS = (PROTOCOL = TCP)(HOST = Daoud-PC)(PORT = 1521))+
    +)+
    +)+
    DEFAULT_SERVICE_LISTENER = (XE)
    How to configure the tnsnames.ora on the client side?
    tnsnames.ora content:
    XE =
    +(DESCRIPTION =+
    +(ADDRESS = (PROTOCOL = TCP)(HOST = Daoud-PC)(PORT = 1521))+
    +(CONNECT_DATA =+
    +(SERVER = DEDICATED)+
    +(SERVICE_NAME = XE)+
    +)+
    +)+
    EXTPROC_CONNECTION_DATA =
    +(DESCRIPTION =+
    +(ADDRESS_LIST =+
    +(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))+
    +)+
    +(CONNECT_DATA =+
    +(SID = PLSExtProc)+
    +(PRESENTATION = RO)+
    +)+
    +)+
    ORACLR_CONNECTION_DATA =
    +(DESCRIPTION =+
    +(ADDRESS_LIST =+
    +(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))+
    +)+
    +(CONNECT_DATA =+
    +(SID = CLRExtProc)+
    +(PRESENTATION = RO)+
    +)+
    +)+
    Now I`m trying to initialize this on one machine (database & client) and so the crystal report will be on the same machine where the database exist; Additionally, this machine has OS Windows 7 Ultimate 64bit and include the Oracle 10g Express Database & Oracle 10g Express Client software.
    Please check the files content I included above and give me the way on how to establish a connection from the crystal report to the database where both are installed on the same machine.
    Thanks in advance...

Maybe you are looking for