Search This Blog

Mar 25, 2014

How to Display the Actual Number with Decimal

When you configure how numbers display, you select the number of decimal places to show. Crystal Reports then rounds the display value to that decimal position and that is what you see. 

But what if you want to display the actual number? If the original number has no decimal places, you want to see that. If the original has three decimal places, you want to see all three.

You can do this using conditional formatting.

Mar 21, 2014

ToText Function in Crystal Report

ToText Function


The ToText function can be used to convert number, date, boolean, or time values to a string (text). It provides you with controls that let you control how the resulting string looks.
It’s mostly used for concatenation (for example, you can create a title for your report that shows the records covered, or a group name that shows the date range included.)
  • Add parameters to a Report title
  • Control how group names appear (you can force your dates to appear in the format 3/7/10 or 20100901.

List of FUNCTIONS in Crystal Report

Crystal Reports provides many FUNCTIONS for extracting information from the files. 

List of Functions

  • Abs(x)
  • Average([array])
  • Average(field, condField)
  • Average(field, condField, "condition")
  • Average(field)
  • BeforeReadingRecords
  • Count([array])
  • Count(field, condField)
  • Count(field, condField, "condition")
  • Count(field)
  • Date (yyyy, mm, dd)
  • Day (x)
  • DayOfWeek (x)
  • GroupNumber
  • IsNull
  • Length(x)
  • LowerCase (x)
  • Maximum([array]) Maximum(field, condField)
  • Maximum(field, condField, "condition")
  • Maximum(field)
  • Minimum([array])
  • Minimum(field, condField)
  • Minimum(field, condField, "condition")
  • Minimum(field)
  • Month (x)
  • Next
  • NextIsNull
  • NumericText(fieldname)
  • PageNumber
  • PopulationStdDev([array])
  • PopulationStdDev(field, condField)
  • PopulationStdDev(field, condField, "condition")
  • PopulationStdDev(field)
  • PopulationVariance([array])
  • PopulationVariance(field, condField)
  • PopulationVariance(field, condField, "condition")
  • PopulationVariance(field)
  • Previous
  • PreviousIsNull
  • PrintDate
  • RecordNumber
  • Remainder(numerator, denominator)
  • ReplicateString(x,n)
  • Round(x, # places)
  • Round(x)
  • StdDev([array])
  • StdDev(field, condField)
  • StdDev(field, condField, "condition")
  • StdDev(field)
  • Sum([array])
  • Sum(field, condField)
  • Sum(field, condField, "condition")
  • Sum(field)
  • Today
  • ToNumber (x)
  • ToText (x, # places)
  • ToText (x)
  • ToWords(x, # places)
  • ToWords(x)
  • TrimLeft (x)
  • TrimRight (x)
  • Truncate (x)
  • UpperCase (x)
  • Variance([array])
  • Variance(field, condField)
  • Variance(field, condField, "condition")
  • Variance(field)
  • WhilePrintingRecords
  • WhileReadingRecords
  • Year (x)

Mar 19, 2014

Date field in the format of D D M M Y Y Y Y in Crystal Report

The default format gives me the date as ddmmyyyy I need to figure out a way to print the date in the format of D D M M Y Y Y Y.


To achieve this i need create a new formula field.

Now lets look at the formula.

totext({YourDateFieldHere}, "ddmmyyyy")

Then create a new formula and paste the following

mid({@formulaDate},1,1)&" "&mid({@formulaDate},2,1)&"
"&mid({@formulaDate},3,1)&" "&mid({@formulaDate},4,1)&"
"&mid({@formulaDate},5,1)&" "&mid({@formulaDate},6,1)&"
"&mid({@formulaDate},7,1)&" "&mid({@formulaDate},8,1)

explanation for mid function

Local StringVar x :=totext(Currentdate, "
Local StringVar y;

//Start at position 2, go to the end of the string

y := Mid (x, 2); //y is now "9032014"

//Start at position 2, extract 1 character

y := Mid (x, 2, 1) //y is now "9"

Mar 7, 2014

Table with fixed header on scroll

Column 1 Column 2 Column 3
Row A-1 Row A-2 Row A-3
Row B-1 Row B-2 Row B-3
Row C-1 Row C-2 Row C-3
Row D-1 Row D-2 Row D-3
Row E-1 Row E-2 Row E-3
Row F-1 Row F-2 Row F-3
Row G-1 Row G-2 Row G-3

Related Posts Plugin for WordPress, Blogger...