Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Special Characters in Crystal Reports 8.5

Status
Not open for further replies.

sgi97

Programmer
Mar 8, 2002
7
DO
Hi,

I have the following item's code: SMAN5x11½.

I used it on my vb6 app and it works perfectly so when i print it via crystal reports if i filter the report comes in blank and if i print i get SMAN5x11.

How can i solve this problem.

Thanks,

Richard
 
I'm using Times New Roman (Western)

and yes the font is on the target machine.
 
Let's try a little more technical information:

You say you used it in your VB app, does that mean that you displayeed the fieeld on a form in VB?

and this "so when i print it via crystal reports if i filter the report comes in blank and if i print i get SMAN5x11." means that nothing is displayed, the report shows NO pages but if you select the print icon it prints data?

Doesn't make any sense to me.

If the report has no data, there is nothing to print, perhaps you need to rephrase this.

I would still guess that there's some oddball character involved, or a font issue.

You might try a formula of asc(right(trim({table.field}),1)) to learn what the ASCII character is for the 1/2.

If it is not what it should be, use the REPLACE function against it.

-k
 
Yes, i used it in a vb form and it work fine.

Yes, when i print it via crystal reports if i filter the report by this code with the special characters it comes in blank.

Yes, if i print i get SMAN5x11 and that means that nothing is displayed, the report shows NO pages but if you select the print icon it prints data?

no data is printed

====================================
1. i have an invoice with in it detail print SMAN5x11
2. i have a list reports that print inventory movements. When i filter with SMAN5x11½ no data is printed.


Thanks and sorry for my english.

 
Show what you used to filter it.

Palce this formula on the report and see what it shows for the 1/2 part of the SMAN5x11½, I think that is probably the culprit.

asc(right(trim({table.field}),1))

I had posted this before, and it's the key, but you ignored it...

-k
 
hi,

i use this to filter the record:

dim str as string
str = "{tbl_detailtrans.articulo} = 'SMAN5x11½'
report.selectionformula = str

...

The result of asc(right(trim({table.field}),1)) is:
189

I have other items that is 'SMAN5x11½C
it's work fine. the different is the letter c in right,1

Thanks
 
That is bizarre since it contains the same character...

It would seem that there isn't any data that matches that, since adding a C works.

What does the following return:

dim str as string
str = "{tbl_detailtrans.articulo} like 'SMAN5x11½*'
report.selectionformula = str

Thi should return everything, and I would copy and paste what in the the Database->Show SQl Query and run it to see what is being returned and to make sure it's coming across to crystal correctly.

-k
 
sorry but i don't understand what you mean.

str = ... is the selection formula i send to crystal.

I get no record when i filter table.item = '....'

I think the problem is that crystal don't understand ascii 189 at the end of the field.
 
Well I don't understand what table.item = '....' has to do with anything, I didn';t suggest doing that

One more time, I suggested trying a LIKE predicate, asi in:

str = "{tbl_detailtrans.articulo} like 'SMAN5x11½*'

I'm not using an EQUALS sign, copy the above if need be, all I did was add an asterisk and use the LIKE.

I also suggested that you check what is in the Database->Show SQL Query within the report afterwards.

-k
 
If the 1/2 isn't getting read, then maybe the following would work:

str = "{tbl_detailtrans.articulo} = 'SMAN5x11' + chr(189)

Not sure if that syntax is correct, but you see what I mean.

-LB
 
Well,

Thanks

I can't use like 'SMAN5X11½*' because i have other items with ½ not exactly at the end and i only want to filter SMAN5X11½.

i Appreciate your effort.

I Realy want to know why crystal don't accept those special character y also has items with other specials characters like ½.

Thanks anyway.
 
The point was to see what it returned, not to use it permanently.

The other point was to test what the report is then constructing as the SQL.

For someone with an unresolved problem, and a potential bug, you don't seem open to testing/discovery.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top