Articles in this section
Category / Section

How to Convert Crystal Reports to RDL in Bold Reports

Published:
Updated:

Converting Crystal Reports (.rpt) to RDL (Report Definition Language) can be challenging due to differences in architecture and features. Bold Reports provides support to help you seamlessly convert your reports to the RDL format. This guide outlines the steps and best practices for successfully converting Crystal Reports (.rpt) to RDL reports in Bold Reports. The process involves understanding the differences between Crystal Reports and Bold Reports, migrating data sources and logic, and redesigning report layouts to fit the Bold Reports platform.

Key Differences Between Crystal Reports and Bold Reports
Aspect Crystal Reports Bold Reports
Design Interface Section-based (Header, Footer, Detail) Tablix-based (Tables, Matrices, Lists)
Data Handling Direct connection to various data sources Uses datasets via SQL queries/stored procedures
Formulas/Expressions Pro prietary Crystal syntax Uses VB.NET expressions (=IIF(), =SUM(), etc.)
Sub-reports Commonly used for modular reports Less efficient; use nested datasets and data regions instead
Export Options Multiple custom export formats Focuses on Microsoft stack compatibility
Concatenate “FirstName” & " " & “LastName” Fields!FirstName.Value & " " & Fields!LastName.Value
Substring Mid({Field}, 2, 5) Mid(Fields!Field.Value, 2, 5)
Left Left({Field}, 4) Left(Fields!Field.Value, 4)
Right Right({Field}, 4) Right(Fields!Field.Value, 4)
Length Len({Field}) Len(Fields!Field.Value)
Replace Replace({Field}, “old”, “new”) Replace(Fields!Field.Value, “old”, “new”)
Uppercase UCase({Field}) UCase(Fields!Field.Value)
Lowercase LCase({Field}) LCase(Fields!Field.Value)
Trim Trim({Field}) Trim(Fields!Field.Value)
Current Date CurrentDate Today()
Current DateTime CurrentDateTime Now()
Date Part (Year) Year({DateField}) Year(Fields!DateField.Value)
Date Part (Month) Month({DateField}) Month(Fields!DateField.Value)
Date Part (Day) Day({DateField}) Day(Fields!DateField.Value)
Add Days DateAdd(“d”, 5, {DateField}) DateAdd(“d”, 5, Fields!DateField.Value)
Format Date ToText({DateField}, “MM/dd/yyyy”) Format(Fields!DateField.Value, “MM/dd/yyyy”)
Time Only Time({DateTimeField}) Format(Fields!DateField.Value, “hh:mm:ss tt”)
Absolute Abs({Field}) Abs(Fields!Field.Value)
Round Round({Field}, 2) Round(Fields!Field.Value, 2)
Ceiling Ceiling({Field}) Ceiling(Fields!Field.Value)
Floor Floor({Field}) Floor(Fields!Field.Value)
Remainder Remainder({Field1}, {Field2}) Fields!Field1.Value Mod Fields!Field2.Value
If / Else If {Field} > 10 Then “High” Else “Low” IIF(Fields!Field.Value > 10, “High”, “Low”)
Nested If If x > 10 Then “A” Else If x > 5 Then “B” Else “C” Switch(Fields!x.Value > 10, “A”, Fields!x.Value > 5, “B”, True, “C”)
Null Handling If IsNull({Field}) Then 0 Else {Field} IIF(IsNothing(Fields!Field.Value), 0, Fields!Field.Value)
Sum Sum({Field}) Sum(Fields!Field.Value)
Average Average({Field}) Avg(Fields!Field.Value)
Minimum Minimum({Field}) Min(Fields!Field.Value)
Maximum Maximum({Field}) Max(Fields!Field.Value)
Count Count({Field}) Count(Fields!Field.Value)
Page Number PageNumber Globals!PageNumber
Total Pages TotalPageCount Globals!TotalPages
Report Name ReportName Globals!ReportName
User Name UserName User!UserID
Difference b/w dates DateDiff(interval, date1, date2) DateDiff(“d”, Fields!date1.Value, Fields!date2.Value)
Finds Position Instr(string, substring) InStr(Fields!string.Value, “substring”)
Proper Case ProperCase (string) StrConv(Fields!YourField.Value, vbProperCase)
Reverse String StrReverse(string) StrReverse(Fields!YourField.Value)
Is Numeric IsNumeric (string) IsNumeric(Fields!YourField.Value)
String Compare StrCmp(“string1”, “string2”) StrComp(“string1”, “string2”)
Number to String ToText(number, decimals) FormatNumber(Fields!number.Value, “N2”)
String to Number ToNumber(string) CInt(Fields!string.Value)
String to Date ToDate(string) CDate(Fields!string.Value)
Sign of a number (+ / 0 / -) Sgn (number) Sign(Fields!number.Value)
Round down to the nearest integer Int (number) Int(Fields!number.Value)
Round Up RoundUp (number) Ceiling(Fields!number.Value)
Truncate Truncate (number) Fix(Fields!number.Value)
MRound MRound (number, multiple) Round(Fields!YourField.Value / multiple, 0) * multiple
Fix Fix (number) Fix(Fields!number.Value)
Sin Sin (number) Sin(Fields!number.Value)
Cos Cos (number) Cos(Fields!number.Value)
Tan Tan (number) Tan(Fields!number.Value)
Atn Atn (number) Atan (number)
Pi pi Math.PI
Square Sqr (number) Sqrt(Fields!number.Value)
Exponentiation Exp (number) Exp(Fields!number.Value)
natural logarithm of a number Log (number) Log(Fields!number.Value)
Standart Deviation StdDev({fields}) StDev(Fields!YourField.Value)
population standard deviation of a set of values PopulationStdDev({fields}) StDevP(Fields!YourField.Value)
variance of a set of values Variance({fields}) Var(Fields!YourField.Value)
population variance of a set of values PopulationVariance({fields}) VarP(Fields!YourField.Value)
get a distinct count of the values DistinctCount({fields}) CountDistinct(Fields!YourField.Value)
Percentage of Sum PercentOfSum ({field1}, {field2}) Supported
Percentage of Average PercentOfAverage ({field1}, {field2}) Supported
Percentage of Minimum PercentOfMinimum ({field1}, {field2}) Supported
Percentage of Maximum PercentOfMaximum ({field1}, {field2}) Supported
Percentage of Count PercentOfCount ({field1}, {field2}) Supported
Percentage of Distinct Count PercentOfDistinctCount ({field1}, {field2}) Supported
Replace Replace (inputString, findString, replaceString) Replace(Fields!inputString.Value, “findString”, “replaceString”)
Join (joining a number of substrins) Join (list of sub strings) Join([List of SubStrings], “,”)
Split Split (inputString) Split(“String”, “,”)
IsDate IsDate (string / number) Supported
WeekDay WeekDay (date) Weekday(Fields!YourDate.Value)
DayOfWeek DayOfWeek (date) Weekday(Fields!YourDate.Value)
Month Name MonthName ({month (from 1 - 12)}) MonthName(Month(Fields!YourDate.Value))
Week Day Name WeekdayName (weekday (as number)) WeekdayName(Weekday(Fields!YourDate.Value))
Print Date PrintDate Globals!ExecutionTime.ToShortDateString()
Print Time PrintTime Globals!ExecutionTime.ToShortTimeString()
Selection locale SelectionLocale User!Language

Steps to Convert Crystal Reports to RDL

Analyze the Crystal Report

Before starting the conversion, you need to understand the structure of the Crystal Report you want to convert, including:

Extract Data from the Crystal Reports
  • Identify all data sources and stored procedures used in the Crystal Report (e.g., SQL databases, XML files).
  • Document the data source configuration so it can be replicated in RDL.
  • Test database connections to ensure they are accessible and functioning correctly.
Recreate the Report in Bold Report Designer

Use Bold Reports Designer or Server to rebuild the report.

  • Create a new RDL project.
  • Import and configure connections to the database used in the Crystal Report.
  • Replicate the report layout from the original Crystal Report, using elements like tables, charts, and other RDL-supported report items.
  • Apply groupings and sorting logic in the Tablix or list elements.
  • Add parameters for user inputs as defined in the Crystal Report.
  • Rewrite any formulas or calculations using RDL’s expression language.
  • Apply formatting and ensure the new design matches the original report including font styles, colors, and alignment.
Test the Report

Compare the RDL report with the original Crystal Report to ensure:

  • Data is accurate and complete.
  • Layout and formatting are consistent.
  • Parameters and other functionalities like groupings work as expected.
Deploy the RDL

Preview the RDL report to ensure it renders correctly as it was in the Crystal.

Converting Crystal Reports to RDL for Bold Reports requires thorough planning and implementation. By adhering to the steps provided in this guide, you can facilitate a seamless migration to Bold Reports.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied