From: Paulo Oliveira on 8 Mar 2010 06:32 Hi all, This is a old problem without solution, in my reports i need portuguese style: DecimalSep=',' and ThousandsSep='.' i solve the problem using pic "@E 99,999.99", but is ahard work, i need change my 1000's reports to this solution in numeric fields, any idea or solution to this problem. TIA Paulo Oliveira
From: Willie Moore on 8 Mar 2010 07:08 Paulo, What version of ReportPro? Regards, Willie "Paulo Oliveira" <paulo(a)clipinfor.com> wrote in message news:ba48f1dd-1dd9-4437-8a0b-e3865469fabf(a)d27g2000yqf.googlegroups.com: > Hi all, > > This is a old problem without solution, in my reports i need > portuguese style: > DecimalSep=',' and ThousandsSep='.' > i solve the problem using pic "@E 99,999.99", but is ahard work, i > need change my 1000's reports to this solution in numeric fields, any > idea or solution to this problem. > > TIA > Paulo Oliveira __________ Information from ESET NOD32 Antivirus, version of virus signature database 4924 (20100308) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
From: Paulo Oliveira on 8 Mar 2010 09:00 Willie, Sorry, 2.12 Paulo On Mar 8, 12:08 pm, "Willie Moore" <will...(a)wmconsulting.com> wrote: > Paulo, > > What version of ReportPro? > > Regards, > Willie > > "Paulo Oliveira" <pa...(a)clipinfor.com> wrote in message > > news:ba48f1dd-1dd9-4437-8a0b-e3865469fabf(a)d27g2000yqf.googlegroups.com: > > > Hi all, > > > This is a old problem without solution, in my reports i need > > portuguese style: > > DecimalSep=',' and ThousandsSep='.' > > i solve the problem using pic "@E 99,999.99", but is ahard work, i > > need change my 1000's reports to this solution in numeric fields, any > > idea or solution to this problem. > > > TIA > > Paulo Oliveira > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4924 (20100308) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com
From: Mathias on 9 Mar 2010 01:34 Hi Paulo, The decimal separator should follow the national settings in windows. You can also set something different in your own code with SetDecimalSep and SetThousandSep, but then it will not be correct in other languages. Setting a picture on each field in your reports will take some time. There is a way to do this programmatically, but it will require som work as well. The code below opens a report, iterates through the report controls and determines if a field has to be added or not, if not it adds it. You could definately do something similar where you set a picture for all numeric fields instead. I think you should use a minimalistic picture. This is beqause all 9's and "," in the picure will generate a space in the resulting string value. This can make your figures in need of more space... And by the way, this code is not mine from the beginning. Its something that I originally got throug this forum and adapted for my own purposes... Mathias This code will look better if you copy it to VO... method AddVATList() class TabControl2_Fakt local oR as RpReport local oRapport as Rapport local oLVI as ListViewItem local s2,pathFTG,sFontName as string local aTables,xVars,aBands,aObj,aDBS as array local nSec,isec,nVars,iVars,nBands,iBands,nObj,iObj as dword local oField,oExpBlk as usual local lFound,lFontBold,lFontItalic,lFontUnderline,lFontStrikeout as logic local newVar as rpVariable local iFontHeight as longint local oFontColor as Color oLVI := self:oDCListView1:GetSelectedItem() if Val(oLVI:GetText(#Id)) < 500 oRapport := self:ssw:oRapport if oRapport:Seek(oLVI:GetText(#Program) + oLVI:GetText(#Id)) s2 := sPathService + AllTrim(Str(self:ssw:nFtgnr)) aTables := {{self:ssw:oForetag:filespec:fullpath,"Foretag", "DBFCDX",false},; {self:ssw:oORHuvud:filespec:fullpath,"ORHuvud","DBFCDX",false},; {self:ssw:oORRader:filespec:fullpath,"ORRader","DBFCDX",false},; {self:ssw:oFAHuvud:filespec:fullpath,"FAHuvud","DBFCDX",false},; {self:ssw:oFARader:filespec:fullpath,"FARader","DBFCDX",false},; {self:ssw:oBetaln:filespec:fullpath,"Betaln","DBFCDX",false},; {self:ssw:oMontor:filespec:fullpath,"Montor","DBFCDX",false},; {self:ssw:oResurs:filespec:fullpath,"Resurs","DBFCDX",false},; {self:ssw:oKund:filespec:fullpath,"Kund","DBFCDX",false},; {self:ssw:oDivreg:filespec:fullpath,"Divreg","DBFCDX",false},; {self:ssw:oOrder2HD:filespec:fullpath,"Order2HD","DBFCDX",false}} pathftg := self:ssw:oForetag:filespec:drive + self:ssw:oForetag:filespec:path + "\" +; self:ssw:oForetag:filespec:filename aDBS := {{"Foretag",pathftg + ".dbf",pathftg + ".cdx","FTGNR","DBFCDX"},; {"Foretag1",pathftg + ".dbf",pathftg + ".cdx","FTGNR","DBFCDX"}} oR := RpReport{self:ssw,aTables,s2,aDBS} oR:LoadRpt(sPathRap + oLVI:GetText(#Fil)) if oR:IsValid nSec := ALen(oR:Sections) for iSec := 1 upto nSec // Alle Sections müssen bearbeitet werden xVars := oR:Sections[iSec]:aVars nVars := ALen(xVars) lFound := false for iVars := 1 upto nVars // Jede Variable überprüfen // Diese Variablen wurden bereits mit 3.00 ständig vorm Ausdruck ersetzt // ....mal endlich auf den korrekten Stand bringen if Upper(xVars[iVars]:CNAME) = "FANR" *oReport:Sections[iSec]:aVars[iVars]:CINIEXP :=; * 'iif(andereAnschrift.and.! Empty(schueler.ag),Trim(schueler.r3) + CHR(13) +; * Trim(" + schueler.name)' *oReport:Sections[iSec]:aVars[iVars]:CUPDATEEXP :=; * 'iif(andereAnschrift.and.! Empty(schueler.ag),Trim(schueler.r3) + CHR(13) +; * Trim(schueler.ag),Trim(schueler.anrede) + CHR(13) +; * Trim(schueler.vornamen) + " " + schueler.name)' // Befindet sich die Variable in der Ersetztungsdatenbank, dann erhält Sie eine neue Update-Expression !!! // entweder aufgrund der Summenbildung für Euro-Wert, oder wegen der ViewKL-Geschichte lFound := true endif next // nVars // Neue Variablen hinzufügen if !lFound newVar := rpVariable{nVars+1} newVar:cName := "FANR" newVar:cReset := "Fahuvud.Fanr" newVar:nReset := 0 // Testa olika siffror här... newVar:nIniPos := nVars + 1 *newVar:cIniExp := "Fahuvud.Fanr" // ["DM"] newVar:cIniExp := "FANR" // ["DM"] newVar:cUpdateExp := "Fahuvud.Fanr" AAdd(oR:Sections[iSec]:aVars,newVar) endif // Weitere Altlasten, die zu tilgen sind..... *if "EMPTY(SCHUELER.GESCHLECHT)"$Upper(oReport:Sections[iSec]:oDataSource:CFILTEREXP) // Filter für Schüler-Listen zwecks Listenstopp und so.... * oReport:Sections[iSec]:oDataSource:CFILTEREXP := * strTranSpezial(oReport:Sections[iSec]:oDataSource:CFILTEREXP,'Empty(SCHUELER.GESCHLECHT)','(.T.)') *endif *if Left(tempArray[i],5) = "MWS4_" .and. "MAHNHELP.ML=1"$Upper(oReport:Sections[iSec]:oDataSource:CFILTEREXP) // Mahnung für 4. Stufe ist der falsche Filter drin..... * oReport:Sections[iSec]:oDataSource:CFILTEREXP := "Mahnhelp.Ml=4" *endif aBands := oR:Sections[iSec]:Bands nBands := ALen(aBands) lFound := false for iBands := 1 upto nBands // Alle Bänder durchlaufen aObj := aBands[iBands]:aObjList nObj := ALen(aObj) for iObj := 1 upto nObj // Alle Object eines Bandes überprüfen do case case IsInstanceOf(aObj[iObj],#RPField) // Es ist ein Feldobjekt do case case Upper(aObj[iObj]:expression) = "NETTO" ;oField := aObj[iObj] case Upper(aObj[iObj]:expression) = "MOMSPROC(FANR,.T.)" ;lFound := true endcase case IsInstanceOf(aObj[iObj],#RPTEXT) if Upper(aObj[iObj]:textvalue) = "NETTO" sFontName := aObj[iObj]:FontName iFontHeight := aObj[iObj]:FontHeight lFontBold := aObj[iObj]:FontBold lFontItalic := aObj[iObj]:FontItalic lFontUnderline := aObj[iObj]:FontUnderLine lFontStrikeout := aObj[iObj]:FontStrikeOut oFontColor := aObj[iObj]:FontColor endif endcase // Welcher Object-Typ next // Objects if !Empty(oField) .and. !lFound // Kopiera lite information från Netto-fältet if Empty(sFontName) sFontName := oField:FontName iFontHeight := oField:FontHeight lFontBold := oField:FontBold lFontItalic := oField:FontItalic lFontUnderline := oField:FontUnderline lFontStrikeout := oField:FontStrikeOut oFontColor := oField:FontColor endif oExpBlk := oField:ExpBlk // RPText /* export TextValue as string export *FontName as string export *FontHeight as longint export *FontBold as logic export *FontItalic as logic export *FontUnderLine as logic export *FontStrikeOut as logic export *FontColor as color export Alignment as dword protect oEdit as multilineedit protect hEditFont as ptr*/ // Vi har hittat fakturafoten... // RPField /* export Expression as string export FontName as string export FontHeight as longint export FontBold as logic export FontItalic as logic export FontUnderLine as logic export FontStrikeOut as logic export FontColor as color export ExpBlk as usual export Picture as string export Alignment as dword export PrintDups as logic export VertShrink as logic export RTFStream as logic protect nLastPrintedChar as longint export oRTF as RTF // added 2.5 for page spanning RTF streams */ oField := RpField{Point{346,654},Dimension{116,23}} oField:Expression := "MomsProc(FANR,.T.)" oField:FontName := sFontName oField:FontHeight := iFontHeight oField:FontBold := lFontBold oField:FontItalic := lFontItalic oField:FontUnderLine := lFontUnderline oField:FontStrikeOut := lFontStrikeout oField:FontColor := oFontColor oField:ExpBlk := oExpBlk oField:PrintDups := true oField:VertShrink := false oField:RTFStream := false AAdd(aBands[iBands]:aObjList,oField) iBands := nBands endif next // Bands next // Sections oR:Show(SHOWZOOMED) ApplicationExec(EXECWHILEEVENT) oR:repaint() do case case !Empty(oField) .and. !lFound InfoBox{,"Invoice layout changed!",; "bla bla bla..."}:Show() oR:WriteRpt2File(sPathRap + oLVI:GetText(#Fil)) case lFound InfoBox{,"No changes made!",; "bla bla bla"}:Show() case Empty(oField) InfoBox{,"No changes made!",; "bla bla bla..."}:Show() endcase endif // gültige Report-Datei endif else InfoBox{,"This function only works on invoice layouts!",; "bla bla bla..."}:Show() endif return nil On 8 mar, 12:32, Paulo Oliveira <pa...(a)clipinfor.com> wrote: > Hi all, > > This is a old problem without solution, in my reports i need > portuguese style: > DecimalSep=',' and ThousandsSep='.' > i solve the problem using pic "@E 99,999.99", but is ahard work, i > need change my 1000's reports to this solution in numeric fields, any > idea or solution to this problem. > > TIA > Paulo Oliveira
From: Willie Moore on 9 Mar 2010 07:20
Paulo, The thing that comes to mind is that using RP2, you are using something that obeys the VO GUI rules. You can also build dlls to include your own functions. If the report is not obeying setDecimalSep natively, create a function that you call in the pagesetup. That function does nothing but call setdecimalsep and setthousSep with the current windows settings. It returns nothing. That should quickly get your reports up and running. I haven't created a custom dll for RP2 but I do it all the time for RP3. I am out of town for the next 3 days. Let me know if you need a sample and I will see what I can do. Regards, Willie __________ Information from ESET NOD32 Antivirus, version of virus signature database 4928 (20100309) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com |