[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More


Crystal Reports





Crystal Reports is a business intelligence application from SAP SE. It is used to graphically design data connections and report layouts from a wide range of data sources including Excel spreadsheets, Oracle, SQL Server databases and Access databases, BusinessObjects Enterprise business views, and local file-system information. Report designers can place fields from these sources on the report design surface, and can also deploy them in custom formulas (using either BASIC or Crystal's own syntax), which are then placed on the design surface. Crystal Reports also supports subreports, graphing, and a limited amount of GIS functionality.

Share tech news, updates, or what's on your mind.

Sign up to Post

Crystal Reports 2016

The problem I have is a formula that produces blank results along with the appropriate value.  You can see the blank spaces as  highlighted blue lines.  See image 1
Image 1  

In this example I am looking at a specific record.  In the finalized report I will be looking at records based on dates.  But to simplify this example I am using a specific test record.

Record Selection Formula:
{CivilPMaster.CivilPYear} = 2018 AND {CivilPMaster.CivilPID} = 241

The formula I used to display the Plaintiff's Name.  

Formula: Plaintiff
IF {CivilPPersons.Involvement} = 'PLAINTIFF'
THEN {CivilPPersons.Name} & ', ' & {CivilPPersons.Given1} & ' ' & {CivilPPersons.Given2}

Table: CivilPPersons

CivilPYear int
CivilPID int
Sequence int ( Not Really Needed just using for reference.)
PersonID int ( Not Really Needed just using for reference.)
Business char ( Not Really Needed just using for reference.)
Name varchar
Given1 varchar
Given2 varchar
Given2 varchar
Involvement varchar

Here is a view of the sql results in manager.

Sample CivilPPersons Table
The number of lines both with data and blank corresponds with the number of lines shown in the sql results.  Is this coincidence?
Fundamentals of JavaScript
LVL 12
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

BarCodes in Crystal reports:
I am trying to make my barcodes wider when using Crystal to print them.   I tried messing with the Character Spacing Exactly but anything other than 0 makes them smaller.  
My Font is an IDAutomationC128M

I am not a Crystal person and have been looking around on how to make them wider?
Any ideas would be appreciated.
I have a sales report that in addition to supplying the sales numbers it also:
Calculates and Displays how many Business Days are Remaining in the current month.
This is accomplished by:

In December we have two holidays 12/24 and 12/25.

If I run this report today (12/03) these values are as follows:
(@REMAINING DAYS = 20 - @HOLIDAY_REMAIN = 2) = 18 business days left in the month.  This is correct (Today doesn't count).

If I run this report on 12/26:
(@REMAINING DAYS = 3 - @HOLIDAY_REMAIN = 2) = 1 business day left in the month.  This is incorrect it should show 3 days remaining... @HOLIDAY_REMAIN should = 0

//Main formula
Local DateVar Start := {@FirstDay};
Local DateVar End := date(dateadd("m", 1, {@FirstDay})-1);
Local NumberVar Weeks;
Local NumberVar Days;
Local Numbervar Hol;
DateVar Array Holidays;

Weeks:= (Truncate (End - dayofWeek(End) + 1
- (Start - dayofWeek(Start) + 1)) /7 ) * 5;
Days := DayOfWeek(End) - DayOfWeek(Start) + 1 +
(if DayOfWeek(Start) = 1 then -1 else 0)  +
(if DayOfWeek(End) = 7 then -1 else 0);  

Local NumberVar i;
For i := 1 to Count (Holidays)
do (if DayOfWeek ( Holidays[i] ) in 2 to 6 and
     Holidays[i] in start to end then Hol:=Hol+1 );


How might I adjust this formula to account for the holiday as it occurs and after it occurs?
I have a report with 3 layers of grouping, I have instances where the GH2 only has one totaled rate with a group total below it (GF2). This makes the report look redundant having the GH3 and GF2 with the same values below each other. I'm trying to suppress GH3 if GH3 only has 1 row. Grouping as follow: GH1 - Facility (does not concern me), GF2 - totals of GH3 (I'm suppressing some GH's to avoid cluttering the report), GF1 - Grand Totals

Please see attached screenshot:

      I have a field on a Crystal Report that I would like to show text if the field returns a certain entry. What I mean is I want the report to to have the field read NO COMMIT if the data in that field is 12/31/1899. I used this formula but got errors.

if {tcspodet.ppromtxt}  = 12/31/1899 then "NO COMMIT" else {tcspodet.ppromtxt}

It says a string is required here.
I have an issue with the link between VB.net and Crystal reports.

I want to produce an invoice for a customer.  I have produced the invoice on crystal reports and I have produced all data needed on VB.net but how do I send information from VB.net to Crystal reports.  Obviously I need to pass data per invoice number and client using the software. example companycode ="XC029" invref = "1500"

       Dim directory As String = My.Application.Info.DirectoryPath.Replace("\bin\Debug", "").TrimEnd()
        Dim cryRpt As ReportDocument = New ReportDocument()
        Dim InvRef As String
        Dim showMsg As Boolean

        cryRpt.Load(directory & "\rptSalesInv.rpt")
        InvRef = txtSIInvRef.Text
        cryRpt.RecordSelectionFormula = "{vwSalesInvDistinct.InvRef} = '" & invRef & "'"

        Dim crtableLogoninfos As New TableLogOnInfos
        Dim crtableLogoninfo As New TableLogOnInfo

        Dim CrTables As Tables
        Dim CrTable As Table
        Dim s As String = ConnstringSQL

        Dim parts As String() = s.Split(New Char() {";"c})

        Dim crConnectionInfo As New ConnectionInfo()
        With crConnectionInfo
            .ServerName = parts(1).Split(New Char() {"="c})(1)
            .DatabaseName = parts(2).Split(New Char() {"="c})(1)
            .UserID = parts(3).Split(New Char() {"="c})(1)
            .Password = parts(4).Split(New Char() {"="c})(1)
            .IntegratedSecurity = False
        End With

        CrTables = …
Hi there,
I have a parameter where the use chooses a numerical range and if the report, I want to suppress the group base on whether or not the number falls within the range.

My suppression formula is
Not (sum({@# Courses}) in {?Select Range for Number of Courses Taken})

But when I run the report, it suppresses every record regardless of what I enter - do you have any ideas on why it isn't doing this or, if it's possible?

thanks in advance - CS
I have a crystal report that has a field 'placement area" .  When I browse it I can see data.  But when I added it to a report it does not show data?
I have a report with the number field {QUARTWAGE.PAYROLL_YEAR}.  I need a formula so that whenever the report runs it picks up only data for the CURRENT Year.  I would appreciate your assistance.
I'm trying to create a new report using Crystal Reports 2008.
The issue I'm having is that the main link in an oracle db is string format and the other db has the field I need as a number.
Is there a way I can use the cast command to link the 2 fields?
If there is a different way, I'm open to suggestions.
Starting with Angular 5
LVL 12
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

I am creating a report in Oracle Developer and usually do not like to add my Schema name to each line in my From Clause for each Join. HCCLSC.Pat_enc so in Oracle Developer I can use ALTER SESSION SET CURRENT_SCHEMA=HCCLSC

and this defines the schema so I do not have to add it to each line of my From Clause.

My question is, how do I use this code in Crystal Reports? Is there a way to setup the SCHEMA without having to add it to each line?  We have switched from Teradata to ExaData.

 FROM HCCLSC.pat_enc pat_enc
        LEFT OUTER JOIN HCCLSC.patient
                ON pat_enc.pat_id  = patient.pat_id
We have created a cross-tab report in Crystal Reports 14.1 pulling sales data from our Epicor P21 data, summarized annual sales by customer.  It currently sorts by total overall sales after displaying columns of annual data.  This results in a report which looks like this:

                        Year      Year     Total
Customer      Data      Data     Greatest
Customer      Data      Data     ...
Customer      Data      Data     Least

We would like to sort on the current year rather than the total.  We can't seem to find a way to do that.
Have a report that I would like to put the totals into a cross tab sheet
Need some help

I have to prepare a report, in which it contains nested subreports...i know that nested subreports is not possible in Crystal Reports. can some body tell me how to proceed with this issue.
I have Main Report which contains a subreports, which internally contains a subreport in it.
please help me with this!!
Hi All,

I have a crystal report designed in XI version. It is connected to ADO.Net source data . The data set is based on the DB from MS SQL Server. This data-set has the tables with different fields, along with table having blob field. The crystal report previews data for all the other fields properly, other than Blob field . When I try to preview the crystal report, the blob field shows the image (.jpeg) one time. if we close and open the same report once again, the blob field is showing blank.
Please refer the example from the attachment. On the right side is the preview of CR with the image and on the left side is CR without image when i closed and opened the preview.

Can anyone suggest , the possible reason and a solution for the issue ?
Many thanks in advance.

does anyone know where I can get a copy of Crystal reports 8.5 or how I can change the font on an old crystal report.

I have a REALLY old application that only works with 8.5, and after this version the file format changed, I need to edit the reports but editing in a later version means the reports are no longer compatible with my application.  I have no option to upgrade the app.
I have a crystal report, in which there are many sub-reports.

Based on the Report selected on the screen, the corresponding reports only should open and the others which are not selected shouldn't be visible.

please help me with this.
Crystal Reports - Cross Tab total for Credit Rebills.  I can't get the formula right to get the total % to work out.  

I need the total columns to take the total credits divided by total Invoices.  Right now the field is adding the total percentage across and the amount is not correct.  Example attached. Picture with example
See example attached.  I have also attached the .rpt saved with data.

Thank you.
Group Sum not working
Please see attached report
The sum of the BD should be 10 not 8391
Not sure what is going wrong
CompTIA Network+
LVL 12
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

Crystal Reports 2016

I am trying to generate a report to display stock which has been received more than one - all will be unique items which have a "receipt" and a "despatch"

what I'm after is reporting those which have been received despatched then received again (those with simply a receipt despatch can be ignored.

the result being a small list of items

the actual history database is huge so I am only looking to search a smaller amount but do need to consider if items have been received prior to my date range (ie 90 days)

any suggestions appreciated

I have a report that is using  calculated member in a cross tab.  The "insertion formula" is making it show up after a specific column
"GetRowGroupIndexOf(CurrentRowIndex) = 1 and GridRowColumnValue("glaccnttype.glaccnttype_id") = "Overhead Taxes - Income""

Problem is this Row of Data  "Overhead Taxes - Income"" is not in all reports depending on date range ran.
This is an income statement and depending on the date ranges there are variable numbers of Rows of data.

How do I write the insertion formula to simply have it display at the end of the report?  
My three calculated members are below and each has the exact same insertion formula and show up when the account "Overhead Taxes - Income"" displays

Total Revenue
Total Expense
Net Revenue
I had this question after viewing Append all database values in Parameter not bringing in all data..

I have been trying to append values for site (customer site names) and it is bringing in (on estimate) the first 1000 sites in the database.  If I create an "ALL" selection and run the report it does bring in all sites.  Basically when appending I can see up to values beginning with 'H', but running "ALL" bring up to 'Z'.

It is a standard parameter
Crystal report version is SAP Crystal Reports 2016 Support Pack 5 Version
I am currently in Evaluation to see if we can make use of the system before purchasing!  Not sure if this has an effect.

I have so far attempted:
Creating the parameter in a fresh report but same result
Setting the parameter to dynamic has the same limited number of selections
I have gone into registry and created a new key - LOV, with the string MaxRowsetRecords and set as 1000000.

I have come to the end of any other solutions?

Any help is much appreciated!
This is in Crystal Reports 11.0
Group2(sp_code) - CRN53345XL
      Group3(Fee_type) -Tuition Fees
               TVS123      tuition Fees      90.00
               TVS356      tuition Fees      75.00
               TVS255      tuition Fees      55.00
               TVS285      tuition Fees      65.00
        Group3(Fee_type)- Other Fees
               L342 extras fees      2.00
               L852 extras fees      7.00
Group-2 NULL
      Admin Fee      100.00

In the above scenario, I have created, Group 2(sp_code) and Group 3(Fee_type).  My Group-3 is in specified order.  Group-2 is in ascending order.  
My issue here is, I want to display Admin Fee in “Other Fees” group like  below.  When Group-2 became NULL, it is displaying Admin Fee as a different Group-2 section, I don’t want to display Admin Fee as different group section.  I want to display as below.
Group2(sp_code) - CRN53345XL
      Group3(Fee_type) -Tuition Fees
                   TVS123      tuition Fees      90.00
                   TVS356      tuition Fees      75.00
                   TVS255      tuition Fees      55.00
                   TVS285      tuition Fees      65.00
        Group3(Fee_type) - Other Fees
                     L342 extras fees      2.00
                     L852 extras fees      7.00
                   Admin Fee              100.00

Is that possible at all to display Admin Fee under Other Fees? Can anyone please help me?
Thanks in Advance.
Crystal Reports 2016

I am using the standard grouping by field in my report.  However I would like to actually combined several fields to fall under one specific group.  How would I go about doing that.

Field to group by.  A, B, C, D, E, F

                       Group: A
                           Detail A
                       Group B
                            Detail B
                       Group C
                            Detail C
                       Group (Contains D, E & F)
                            Detail D,E,f
I added five new formulas to a report (Daily_Dosage3b) and the results of the original three formulas on the new
report are different than on the original report (Daily_Dosage3a) that has only the original three formulas. Please
help me resolve the error. Why do the original formulas have a different result on the new report (Daily_Dosage3b)?

New formulas:
LowerTestResult = global numbervar LowerTestResult;
if {Test_Date.TestDate} = {?From Date} then
LowerTestResult := LowerTestResult + {Aspirin_Test.Reading};

UpperTestResult = global numbervar UpperTestResult;
if {Test_Date.TestDate} = {@ToDatePlusDay} then
UpperTestResult := UpperTestResult + {Aspirin_Test.Reading};

ToDatePlusDay = DateAdd (“D”,1,{?To Date})

TestResultDiff = {@UpperTestResult} - {@LowerTestResult}

Original formulas:
testAverageDosage = if not({@testDosageCount}=0) then {@testDosageAmount}/{@testDosageCount}
else 0

testDosageAmount = global numbervar dosageAmount;
if {Test_Date.TestDate} >={?From Date} and {Test_Date.TestDate} <= {?To Date} then
dosageAmount := dosageAmount + {Aspirin_Dosage.Dosage};

testDosageCount = global numbervar dosageCount;
if {Test_Date.TestDate} >={?From Date} and {Test_Date.TestDate} <= {?To Date} then
dosageCount := dosageCount + 1;

Crystal Reports





Crystal Reports is a business intelligence application from SAP SE. It is used to graphically design data connections and report layouts from a wide range of data sources including Excel spreadsheets, Oracle, SQL Server databases and Access databases, BusinessObjects Enterprise business views, and local file-system information. Report designers can place fields from these sources on the report design surface, and can also deploy them in custom formulas (using either BASIC or Crystal's own syntax), which are then placed on the design surface. Crystal Reports also supports subreports, graphing, and a limited amount of GIS functionality.

Top Experts In
Crystal Reports