Archive for September, 2009
One of my customers recently needed to change a date into text for contract wording. That meant changing 9/1/2009 into “this 1st day of September, 2009”. Most of it was simple but the tricky part was adding the “ordinal suffix” (as in 1st, 2nd, 3rd, etc). So I did a bit of playing around and came up with this:
WhileReadingRecords;
NumberVar DayIn := Day (PrintDate);
"This "
& Totext (DayIn , 0 )
& (if DayIn in 4 to 20 then 'th' else
if remainder (DayIn , 10) = 1 then 'st' else
if remainder (DayIn , 10) = 2 then 'nd' else
if remainder (DayIn , 10) = 3 then 'rd' else 'th')
& " day of "
& Totext (PrintDate , "MMMM, yyyy")
Note that there are several formulas that can do ordinal calculations for larger numbers, but this simple one works for dates, since day numbers are never bigger than 31.
If the chart feature in Crystal Reports don’t quite do what you want, you might want to upgrade your charting engine to CR Chart. CR Chart is sold by Three D Graphics. And since Three D Graphics makes the current Crystal Reports charting engine, you know that the upgrade is fully compatible. You just replace one DLL with an upgraded DLL.
So what does CR Chart allow you to do? You get to use new chart types that aren’t currently in CR, like BoxPlots, Pareto Charts and Waterfall Charts. You can change chart properties dynamically at runtime and even add programmable reference lines and labels to your charts.
And as a special offer to my readers, you can save 25% on your purchase Continue Reading »
Exclusive discount on CR Chart
One of my readers who uses Clarion as a development platform has been struggling with an upgrade to CR 2008 for several weeks. He was upgrading from v8.5 to CR 2008 (v12) and we found that some reports that would run fine in CR 8.5 would not run in CR 2008. We narrowed it down to reports that had more than 2 tables so I figured it was a problem with the SQL syntax and sure enough, v8.5 uses a different syntax for these reports. We tried downloading the latest TPS ODBC driver and it didn’t help.
So I contacted a colleague Continue Reading »
Clarion/Topspeed ODBC fails in CR 2008 and CR XI (solved)
When I started my newsletter in 2001 one of my first issues focused on Crystal Reports viewer programs. And because I think this topic is important, I launched this blog 3 years ago with a first post about viewers. I write about them regularly and yet I still find people who don’t know about viewers, or who think that all viewers are as useless as the ‘official’ viewer put out by SAP. Some of these viewers do really cool things and most are inexpensive (or free). So if you have users who need to preview, refresh, print or export reports without having CR installed, you should check out the “viewers” section of my LINKS page.
This LINKS page also contains other Crystal-related utilities, 50 products in all. It is one of the most popular pages on my site. Here are some of the other things you can do using these tools:
Email each page of a report to a different person.
Automatically run reports at 2am every morning and Email the output. Continue Reading »
3rd Party Utilities
In the Library on my site I have two guides for developers who need to integrate Crystal Reports into Applications:
Quick Reference to Crystal Reports in VB
Quick Reference to Crystal Reports in VB.NET
These show developers the basics of getting an application to launch and interact with a report. I have had several developers ask me why the steps wouldn’t work in their applications. Both were using the “Express” edition of VB.NET. According to Microsoft, the Express edition doesn’t support Crystal Reports integration (all the other editions do). So, I have now noted this on the product page for VB.NET and hope this saves a bit of grief for developers who struggle and wonder why their apps don’t work.