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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

German umlaut

Status
Not open for further replies.

ron9999

Programmer
Feb 14, 2003
89
AT
Hi,
can any one tell me please, how to pull from a fox2 db with CR9 the German umlaut in a report.
TIA
Ronald
 
use the chr() finction to get any non-English characters. Here are the ones with unlats:

196 capital A with umlat
203 capital E with umlat
207 capital I with umlat
214 capital O with umlat
220 capital U with umlat
228 lowercase a with umlat
235 lowercase e with umlat
239 lowercase i with umlat
246 lowercase o with umlat
252 lowercase u with umlat

This function can also be used for a spanish N with a tilde, british pound sign, etc., etc.

I can email you a list if you are interested.

dgilsdorf@trianglepartners.com




Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Hi dgillz,
thank you, I would be glad if you send me the German chr(#)
but could you tell me where I have to put the function?
thank's again
Ronald Weinrich
ron@weronet.com

 
In crystal version 8.5, click on insert, field object, formula field, right click, select new, name your formula and enter chr(<enter your number here>) which will return the charater specified in my previous post.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Hi dgillz,
I'm sorry but I’m rather new to CR
don't know what I'm doing wrong? it is not working.
I thought the function should work something like:

function umlaut (parStr)
pars the parStr for a asc('Ä') ??
if found
translate chr(196 )
endif
return parStr

and in report I have to use it like
umlaut(db.field)


I also try to install a new unicows.dll on win98 box with no success

If I check the field in db on my develop-box win2000 I can see Ölheizung
on the win98 the report shows the field like ‘Ilheizung.

thank's
Ronald


 
I'm not sure this meets your needs, but you might try the replace function. To return an &quot;A&quot; with umlaut for every instance of &quot;A&quot; in the field, you would create a formula:

replace({table.field},&quot;A&quot;,chr(196))

You can also nest these, as in the following which adds an umlaut to every &quot;A&quot; and &quot;E&quot;:

replace(replace({table.field},&quot;A&quot;,chr(196)),&quot;E&quot;,chr(203))

-LB
 
thank you lbass,
I'm realy confused now.
The my.dbf has a field mytxt that contents the word &quot;Ölheizung&quot;
if I browse the dbf with VFP it show's me correct &quot;Ölheizung&quot;
if I run my app on a win98-box and browse my.dbf with the report.rpt in the field mytxt is &quot;Ílheizung&quot;
the &quot;Í&quot; is asc(205) &quot;Ö&quot; is asc(214)
why does the server convert Ö to Í ?
Ronald




 
As a general observation, American software almost always makes a hash of accents. The basic alphanumeric code is ASCII, which was originally a 7-hole paper-tape code. On computers this was expanded to 8-bit and accents were added, but not consistently. Most accented letters and some punctuations undergo strange shifts because different bits of software use a different 'dialect' of ASCII.

Madawc Williams
East Anglia, Great Britain
 
What type of field is storing the data?
What code page are you using?
What coelation sequence?

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports&quot;
 
thank you for your answer

the type is C(40)
codepage 1252

What coelation sequence?
I'm sorry I don't know what you mean?

this is how I connect and print or preview

unusal is, if I pass a parfield with &quot;Österreich&quot;
the &quot;Ö&quot; apears correct ???
only the data from fp2dbf is incorrect


********
....
....
PUBLIC oCR AS CRAXDRT.Application
PUBLIC oRpt AS CRAXDRT.Report
PUBLIC oDB AS CRAXDRT.Database
PUBLIC ocDBT AS CRAXDRT.DatabaseTables
PUBLIC oDBT AS CRAXDRT.DatabaseTable
PUBLIC ocParm AS CRAXDRT.ParameterFieldDefinitions
PUBLIC oParm AS CRAXDRT.ParameterFieldDefinition

lbnewpage =.f.
lbmitArb =.f.


oCR = CREATEOBJECT(&quot;CrystalRuntime.Application&quot;)
oRpt = CREATEOBJECT(&quot;CrystalRuntime.Report&quot;)
oRpt = oCR.OpenReport(&quot;.\reports\Report.rpt&quot;)
oDB = oRpt.Database()
ocDBT = oDB.Tables()
oDBT = ocDBT.Item(1)
oDBT.Name = LlparFileName
Llocation=&quot;.\temp\&quot;+LlparFileName+&quot;.dbf&quot;
oDBT.SetTableLocation(Llocation,LlparFileName,&quot;&quot;)
ocParm = oRpt.ParameterFields()
For Each parfield In ocParm
DO CASE
CASE parfield.ParameterFieldname=&quot;panrede&quot;
parfield.SetCurrentValue(oDruckerLayout.pageFrame.page4.txAnrede.Value)
...
...
...
ENDCASE
NEXT

IF oDruckerLayout.pageframe.page1.opgOutput.OptPrinter.Value =1
oRpt.PrintOut()
ENDIF
IF oDruckerLayout.pageframe.page1.opgOutput.optScreen.Value =1
This.oleCRPreview.oCrystal=oCR
This.oleCRPreview.ReportSource=oRpt
This.oleCRPreview.DisplayBorder=.f.
This.oleCRPreview.DisplayBackgroundEdge=.F.
This.oleCRPreview.Resize()
This.oleCRPreview.ViewReport()
ENDIF

thank you for the email
Ronald Weinrich
 
There is another field type called Character (Binary). It won't be translated from one codepage to another.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports&quot;
 
if I chage the field type to C(Binary), there is no
difference.
I called CR-Support and they advice me to try odbc because, may be the crdb_p2bxbse.dll has a problem with umlaut
and see it works! So I decide to use odbc until there is a hotfix for umlaut with crdb_p2bxbse.dll

Now I have a new problem, I don't know how to use odbc in VFP.
I create a DSN
named VFPdbf
path f:\developmet\fox\myapp\temp
(where the free dbf will be dynamically created)

***parameter I pass to init()
LlparFileName=&quot;_13D0I5x&quot;

***I changed the code to connect to
....
oRpt = oCR.OpenReport(&quot;.\reports\Repodbc.rpt&quot;)
oDB = oRpt.Database()
ocDBT = oDB.Tables()
oDBT = ocDBT.Item(1)
....

*********** odbc
oDBT.SetLogOnInfo(&quot;VFPdbf&quot;,,&quot;&quot;,&quot;&quot;)
Llocation=&quot;.\temp\&quot;+LlparFileName+&quot;.dbf&quot;
oDBT.SetTableLocation(Llocation,&quot;&quot;,&quot;&quot;)
********** odbc

the error I get (in German) is
logon error
DSN was not found in logoninfo

could you please tell me what I'm doing wrong?
Ron
 
Yes, I am aware that VFP is not supported by Crystal Decisions. They have also given you some bad advice. Don't use ODBC, use the OLE DB provider. It will be faster than ODBC and is more up to date. The ODBC driver has not been updated since VFP 6.0. The OLE DB provider was updated earlier this year.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports&quot;
 
I spend all day to figure out how odbc is working :(
now I follow you succession and change to ODBC DB
could you please tell me how to change path and filename on runtime?
the properties looks like that:

f:\shared\development\fox\myapp\temp
datab.: OLE DB (ADO)
provider: VPOLEDB
datasource:
user-id:
locale Id.:1033
OLE DB Services: -5
Cooating sequ.: Machine
DSN:VFPdbf

Table
Tablename:_13d0ksx
tbtype:tabelle
..

thank you
ron
 
try to change the path and filename like:

LlparFileName=&quot;_13D0I5x&quot;
oDBT.Location=LlparFileName
oDBT.SetTableLocation(&quot;.\temp\&quot;+oDBT.Name+&quot;.dbf&quot;,&quot;&quot;,oDBT.connectbufferstring)

it works on my development box
if I run this on the win98 box I get the error
...logon failed.
Source: Microsoft OLE DB Provider for Visual FoxPro
Description: Invalid path or file name.
Native Error: 295
Methode: init
line:0
thank
ron
 
The Crystal Reports articles on my web site show you how to do that.

Craig Berntson
MCSD, Visual FoxPro MVP, Author, CrysDev: A Developer's Guide to Integrating Crystal Reports&quot;
 
could not find a solution on your web site but may be that's because I'm not so familar with CR.
I try:
oDBT.Location = &quot;f:\shared\development\wplumber\temp\&quot;+LlparFileName+&quot;.dbf&quot;
if I do so the whole connectbufferstring will be changed to this string.

odbt.SetDataSource('f:\shared\development\wplumber\temp\')
this is not possible error &quot;..no member..&quot;

what I'm doing now is:
clean the connectbufferstring
oDBT.connectbufferstring=&quot;&quot;

make a new Data Source string
lcPath=&quot;.\temp&quot;

and pass the new connectbufferstring
oDBT.connectbufferstring=&quot;Provider=VFPOLEDB;;Data Source=&quot;+lcPath+&quot;;;User ID=;;Password=;;Locale Identifier=1033;;OLE DB Services=-5;;Collating Sequence=Machine;;DSN=&quot;
that works

If you know a better solution please let me know.
TIA
Ron



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top