Crystal report remove white space between two words - crystal-reports

I am using Crystal Report 10.5 in my desktop application. When i run application, it will show the crystal report with proper data. In some words, it put proper white space between two words. But in some case it will remove white space between the words.
i.e. This is the sentence: "Name with 03/02/1978 and 4 days".
Now when it will print in Crystal report, it shows "Name with 03/02/1978 and4 days". Crystal report removes space before "4 days".
I dont know why crystal report is behaving like this. In some place it will print correctly and in some place it creates problem.
So can any one tell me how to solve this issue?
Thanks in advance.

Related

Crystal Report is automatically (randomly) adding white space after a sequence of text X's before a number in a field. Want to prevent the whitespace

I have a field that I'm sure does not have white space in it at a certain location, but for some reason Crystal Reports is automatically adding space to the field but only after X's in certain scenarios. This is a text field which I'm sure is pulling down from a text field in the db as well.
This is hard to explain without a pictured example, so here's what I mean:
Random Spaces
As you can see, there is whitespace after the X's. it should not be there, as this is not what is coming from the db. And strangely, when copy/pasted from the report, there is no white space either! Here it is when copy/pasted straight from the report:
"Test 15dig w spaces XXXXXXXXXXX2345"
Why is this occurring, and how can it be corrected? Currently there is no real formula for the field, it is just taking whatever it coming from the db straight into that field. The whitespace is being added automatically somehow, and I'm not sure at all why.
Here is what I've tried: Have tried calling ToText on the field (even though it is already a text field). Have also tried formatting the field in various different ways. Tried asking on SAP forum but no help as of yet.
Copy & Paste the text "Test 15dig w spaces XXXXXXXXXXX2345" into a text object in Crystal. Apply the same font and formatting (use the brush toolbar button to clone the formatting).
If you don't see the same strange space, the problem is due to non-printable characters in the database field. In that case, you can strip away such characters using a formula and the Replace() function.

Crystal Report export issues

I have a crystal report with 45 fields, i was added fields in single text field because i want to export crystal report in to plain text format, but whenever i export to plain text it show only 197 character in single line but i want all 350 characters in same line. So i was use Crystal Report 10 to run report and it gives correct output. I have DNN portal and i was put that rpt on portal that uses crystal report (version 10.2) dll, but whenever i trying to run that report again it show only 197 characters in single line but i want all 350 characters in same line. So what should i need to do, plz help
I did a lot of testing in this area a few years ago and found that v10 allowed the widest exports, but v11 can go up to 600 characters if you do it just right. The two main factors are the width of the object and the "Characters Per Inch" setting used during export. Try making the text object 20 inches wide, and when you export set the CPI to 26. If you can do those you should get all of your characters. The only part of this I don't have experience with is the DNN portal, which might introduce some other unknown issues.

How can one tell if a field has wrapped in Crystal Reports 2008?

In Crystal Reports 2008, I need to have an accurate count of all of the lines that have been displayed in a sub report.
I'm using a shared variable and incrementing as needed when lines display. The only problem I'm having now is when a field wraps. We are not using a fixed width font, so going by field length does not solve the issue, as 'i' is not as wide as 'w' and so on.
Is there a way to find out if the data in a field will be wrapped, and if so how many lines it wraps to, or is there a way to find out what the height of the section that the field is in (or the field itself) has grown too?
Or, is there an even better way to count how many lines have actually displayed on the sub report?
No, there is no way to do what you describe.
If you used a fixed-width font, you could then do some math based based on "it wraps at X characters" do if length of string is 100, then it went 2 lines, etc.

How to force a string to sort to bottom in Crystal Reports?

I could have sworn that Crystal Reports used to sort strings beginning with a space to the bottom. For example, the strings " Amsterdam", "Belfast", and "Cancun" would be sorted as:
Belfast
Cancun
Amsterdam
This thread seems to confirm that.
However, now I'm using CR 2008 SP3 and it's being sorted to the top, as:
Amsterdam
Belfast
Cancun
I have tried all sorts of special and control characters and everything is sorting to the top. What am I missing?
How about inserting another sorting level, using a formula CitySort:
If {City} = " Amsterdam" Then 1 Else 0

Height issues in iReport

I've got a report that needs to print as landscape letter size. This report uses a detailed header for the 1st page, and a more concise header for every other page. The problem I'm running into is that having both headers defined in iReport has made the report too large to fit the letter size constraints (in terms of height).
When I print the report, the correct headers display on their correct pages, but the report is too large and contains massive amounts of whitespace. The printer then tries to center the report and ends up clipping portions of the header and footer so I only get the midsection of the report.
Is there some way to configure my report to have 2 versions of 1 report band (in this case the pageHeader band) and then just provide an expression to determine when each version should print? Or can I group bands together somehow so that iReport knows they occupy the same space?
Any help is appreciated.
I couldn't ever find any sort of fancy way of doing this, so I just made the 2 headers into subreports and included both in the same location on the pageHeader band. Problem solved.