‘Crystal Reports functions’ Archives
Use of Array function in Crystal Reports for producing comma delimited list of related orders
This example will demonstrate the very practical use of Array function in Crystal Reports. A client wants see the customer orders list in the comma delimited format in crystal report view used in a custom application. Customer name and related orders are stored in 2 different tables. Please figure 1 below report can be created by placing [...]
Using Day of week Function
Day of week function is available in crystal report but we have to little code as below for obtaining the names of days. Begining day can be selected by changing the day name in this example CrMonday. Select DayOfWeek ({Table.Field}, crMonday) Case 1: "Monday" Case 2: "Tuesday" Case 3: "Wednesday" Case 4: "Thursday" Case [...]
Using Hour function for Hourly Time Brackets of the day for Date Ranges or selected dates
Hour Function is very useful if we want to, for example analyzing sales data for during certain times of the day. Use of hour function is given below; if hour({Table.field}) >= 00.00 and hour({Table.field}) = 4.01 and hour({Table.field}) = 8.01 and hour({Table.field}) = 12.01 and hour({Table.field}) = 16.01 and hour({Table.field}) = [...]
ToWords is resulting in as one hundred twenty three and 10 / 100
The subject query was posted by one of our visitor and he wants to write as $123 and 10 cents. Following is the solution to that; local stringvar isNumber := cstr({SalesOrderDetail.UnitPrice}); local numbervar iswhole := ToNumber ({SalesOrderDetail.UnitPrice}); local numbervar ispos := instrrev(isNumber, ‘.’); local numbervar isdecimal [...]
Writing Indian Ruppees and Crore using towords
This formula has been contributed by one of our valued visitor in response to querie posed by other users of Crystal Report numbervar RmVal:=0; numbervar Amt:=0; numbervar pAmt:=0; stringvar InWords :="Rupees "; Amt := tonumber({@Amount}); if Amt = 10000000 then RmVal := truncate(Amt/10000000); if Amt = 10000000 then RmVal := 1; if RmVal [...]
ToText formula example
Totext is a formula in Crystal reports used to convert numeric value to text for example you want to write Your Salary is {StoredProcedure3_1;1.Salary} you will receive an error stating that string missing. So to write the same you need to use totext function as follows; "your salary is RS" + Totext({StoredProcedure3_1;1.Salary})
how many else if statements can crystal report have
This post is in response to recent query - how many else if statements can crystal report have? We are re-referencing our previous post as follows; This example is based on customer table in Northwind database The “if then else works well when condition leads to one of two settings”. Although it can handle multiple potential settings [...]
Changing a Traditional information system to adapt new technologies for effective decision making
This is about an experience of an anonymous writer of this post describing his/her hands on experience in upgrading company’s information to adapt to new technologies for effective decision making and resultantly growth of the company. This post also reveals that how the hands on experience sets the foundations of understanding new [...]
Change in business rule and its impact on Data model.
This post explains the extension in data model resulting from change in business rule. A Prime Group is a steel rolling mills and Export Company having its offices in Dubai and Pakistan. This project was to create /upgrade database and creating Crystal Reports to facilitate changes in business rules and expansion in manufacturing [...]
Business Intelligence – Layout-led and Data-led discovery
Layout-led discovery When we know the questions we want answered and have a good idea where that answer is going to be found, we can use the printed reports to deliver our business intelligence. This is the most common form of business intelligence. For example we want to know employee productivity for bonus calculations we know where to [...]







