Crystal Reports on the web

Looking at the huge number of links, my code snippets and samples that I've accumulated during my journey with Crystal Reports and Report Server (RAS), I've realized that something should be done with all that. So, for all who are struggling with similar problems I've faced while pursuing that elusive goal of putting Crystal Reports on the web, I will put as much information here as I can ...

Friday, March 12, 2010

Targeted advertising

 Targeted advertising can be funny sometimes - I was looking for cookies detection in various browsers and got Cookie Diet :)

Thursday, October 22, 2009

New licenses for 2008

 I've got an email that Crystal Repoting Server 2008 will now allow 200 users - 100 concurrent and 100 named licenses at the same time. Sounds too little too late... also they didn't mention the price :(

Wednesday, August 22, 2007


One "interesting" problem with watermark is that will not go over certain objects - such as drawing box... fact that my boxes have background color don't help and I can't find any way to give watermark a priority.
That's really annoying...

Tuesday, August 21, 2007

Pictures in CR XI

I've already mentioned how Crystal handles pictures - poorly :( It does internal conversion of a picture (JPG for instance) into bitmap, increasing the size of the report many times :(
One good thing about Crystal XI is that you can have pictures on the file system instead of embedding them into the report. Put a blank placeholder picture (that has 1-2 Kb) and specify File Location for the real picture. It will shift the job of downloading a picture to the network, but if picture is conditional (think client logos) your report is not several MB long unnecessary ...

Conditional X position change

I had an interesting problem today - to move logo from upper left side to upper right side of the report, conditionally, only for certain companies...
Well, it got interesting when whatever I would enter into formula field next to X coordinate of my picture, got ignored. Nothing will happen, logo will stay at the same place... I've tried one inch, 5 inches, 20 inches... nothing
I've finally found a problem - coordinates on the screen are in inches, but formula is in twips. So great, really.
My changes were too small since one inch has 1440 twips, so I couldn't see any difference in position... As soon as I've entered 12000 logo jumped to the end of the page. Problem solved :)

Here is the text that helped me solved the problem (from Crystal Reports XI User Guide)

To conditionally change the X position of an object
1. Right-click the field that you want to move conditionally, and select Size
and Position.
2. Click the Conditional Formula button next to the X position value field.
3. In the Formula Workshop, enter your conditional X position formula text.
For example, to move orders that were shipped late to a second column,
enter formula text such as this:
If (Orders.Ship Date) < CDateTime (2004, 01, 01, 02, 10,
11) then 4320
Note: The number 4320 represents the new position that you want to
define as the second column. The position is measured in twips; there
are 1440 twips in an inch.
4. Click Save and close to return to your report.
5. Click OK to save your position setting.

Crystal Reports moves objects that meet your condition to a new position, but
leaves those objects that don’t meet the condition where you originally placed

Monday, April 23, 2007

Developer's zone

Developer's zone is now officially in the process of archiving - new site is Diamond Community

Thursday, September 14, 2006

Crystal articles site

This site is a list of various Crystal Reports articles...

Thursday, July 27, 2006

Picture function

Ever heard about picture function? No? Me neither until this very morning... No, it's at all not related to images. It's a STRING formating function...

Picture (string, picture)
Basic and Crystal syntax.

String is a text string to be formatted according to the picture format.
Picture is a text string representing the way you want the characters in the string to be printed.

Picture (string, picture) prints a string or values in a text string in a predetermined format.

Typical Uses
Picture can be used to print a string "2065555555" in a telephone number format "(206) 555-5555", or to print other strings in fixed formats. If you are using a database field as the string, it will only work if the field is of a fixed and known length.

Note: You cannot use an asterisk as a wildcard in the picture argument. If you put an asterisk in the argument, it will show up as an asterisk in the resulting string.

The following examples are applicable to both Basic and Crystal syntax:

Picture ({customer.FAX},"(xxx) xxx-xxxx" )

Prints the values in the Fax field in the format (805) 555-5555, (313) 555-2555, and so on.

Picture ({customer.REGION}, "[xx]")

Prints the values in the Region field in the format [AK], [CA], and so on.

The size of the string you specify in the picture parameter, that is the number of x's you use, must be greater than or equal to the largest value of the string. So, for example, if you want to print city names in square brackets, you would do the following:

Picture ({customer.CITY}, "[xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]")

This would print [Calgary],[Hamilton],[Toronto], and so on. The picture function trims to the size of the data in each row.

Note: The maximum number of x's that can be entered is 252.

Picture must be enclosed in quotes.
Use the character "x" in the mask to designate characters from the string.
If the database field includes brackets or other formatting, for example (xxx) xxx-xxxx, you will not be able to convert it to xxxxxxx. The parentheses and hyphen will still appear.

Thanks to Experts Exchange Sage called bdreed35 ( who pointed that one out...

Experts exchange is good site to find knowledgable people that can help with solving a problem ...