rpreview excel fwh1308

rpreview excel fwh1308

Postby Sistem » Tue Oct 01, 2013 4:55 pm

ola
usando o codigo abaixo:
COLUMN TITLE "ATACADO";
DATA Prod->Pfa_Prod;
PICTURE "@E 999,999.99";
SIZE 08;
FONT 1

preview exibe:
Image => 16,00 correto

excel exibe:
Image => 16,099 nao correto

como solucionar?

grato
FWH2008 | xHarbour | BCC74 | SQLRDD
User avatar
Sistem
 
Posts: 226
Joined: Sun May 13, 2012 7:52 am

Re: rpreview excel fwh1308

Postby nageswaragunupudi » Wed Oct 02, 2013 12:56 pm

We understand that there appears to be problem with non-english installations of Excel.
We request your feed back for finding suitable solution.

Please let us know if the export is correct if the picture is changed as
Code: Select all  Expand view  RUN
PICTURE "@E 999999.99";
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: rpreview excel fwh1308

Postby Sistem » Wed Oct 02, 2013 1:25 pm

nageswaragunupudi

office 2010 pt-br
column mysql => pfa_prod REAL (13,4)

COLUMN TITLE "ATACADO";
DATA Prod->Pfa_Prod;
PICTURE "@E 999999.99";
SIZE 08;
FONT 1

preview result:
Image

excel result:
Image :(


PICTURE "@E 999999.9999";
Image :(

thanks
FWH2008 | xHarbour | BCC74 | SQLRDD
User avatar
Sistem
 
Posts: 226
Joined: Sun May 13, 2012 7:52 am

Re: rpreview excel fwh1308

Postby nageswaragunupudi » Wed Oct 02, 2013 2:13 pm

Please try modifying report.prg as suggested below.

Please locate the following code in report.prg ( line 2115 in version 13.08 )
Code: Select all  Expand view  RUN
        case 'N'
            :NumberFormat     := "##0"
            :HorizontalAlignment := xlRight
            if "." $ cPic
               :NumberFormat  += SubStr( cPic, At( ".", cPic ) )
            endif
            if "," $ cPic
               :NumberFormat  := "#," + :NumberFormat
            endif
            exit
 


Please substitute the above block of code with the code below:
Code: Select all  Expand view  RUN
        case 'N'
            :NumberFormat     := "##0"
            :HorizontalAlignment := xlRight
            if "." $ cPic
               :NumberFormat  += ( "," + Replicate( '0', Len( AfterAtNum( '.', cPic ) ) ) )
            endif
            if "," $ cPic
               :NumberFormat  := "#." + :NumberFormat
            endif
            exit
 

Please make the above changes, compile and link the modified report.prg with your application.

Please let us know the result of export to excel after making the above changes with picture clauses "@E 999,999.99" and "@E 999999.99"
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: rpreview excel fwh1308 (resolved)

Postby Sistem » Wed Oct 02, 2013 2:36 pm

perfect :lol:
thanks
FWH2008 | xHarbour | BCC74 | SQLRDD
User avatar
Sistem
 
Posts: 226
Joined: Sun May 13, 2012 7:52 am

Re: rpreview excel fwh1308

Postby nageswaragunupudi » Wed Oct 02, 2013 4:27 pm

Thanks for your feedback. This is very useful to us.
I request you to make this correction in your copy of report.prg till we make general modification.

Wish to get feedback from users of other language installations of Excel.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: rpreview excel fwh1308

Postby Sistem » Wed Oct 02, 2013 7:48 pm

nageswaragunupudi

brother, If I ADD the TOTAL return 1 error

COLUMN TITLE "VLR.NF";
DATA Nota->Val_Nota;
PICTURE "@E 9,999,999.99";
SIZE 09;
FONT 2;
TOTAL <============= RETURN ERRO IN EXCEL =========> error 9003: Too many recursive
FWH2008 | xHarbour | BCC74 | SQLRDD
User avatar
Sistem
 
Posts: 226
Joined: Sun May 13, 2012 7:52 am

Re: rpreview excel fwh1308

Postby nageswaragunupudi » Wed Oct 02, 2013 9:22 pm

For totals we use the forumla
=SUBTOTAL( 9, <range> ) and <range> with syntax "A2:A5" for English installation of Excel.

I understand that your Excel Installation is Portugese (Brazil ). I read from documentation that the syntax for

Portugese (Poland) is "=SUBTOTAL( 9; A2:A5 )"
Portugese (Brazil) is "=SUBTOTAL( 9, A2:A5 )" // Same as English.

I thought the default English Syntax should work for you.

Please help by doing this test.
Open a blank Excel sheet. Enter some numbers in cells A2, A3, A4 and A5
In Cell A6 please enter the forumla "=SUBOTAL( 9, A2:A5 )"
Does it work or do you get error. If you get error, please find what is the correct syntax to enter.

We need your help and cooperation to implement your language in excel export.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: rpreview excel fwh1308

Postby Sistem » Wed Oct 02, 2013 9:51 pm

nageswaragunupudi

results:
=SUBTOTAL(9;A2:A5) <= ok
=SUBTOTAL(9,A2:A5) <= erro
FWH2008 | xHarbour | BCC74 | SQLRDD
User avatar
Sistem
 
Posts: 226
Joined: Sun May 13, 2012 7:52 am

Re: rpreview excel fwh1308

Postby nageswaragunupudi » Wed Oct 02, 2013 10:04 pm

#1. Please make this change in report.prg.

Locate this code in METHOD ToExcel(...) ( line no:2003 in ver 13.08)
Code: Select all  Expand view  RUN
  local cSubTot     := "=SUBTOTAL(9,"

Please change this as
Code: Select all  Expand view  RUN
  local cSubTot     := "=SUBTOTAL(9;"

After the change, please let me know the result.

#2. I would appreciate some more help and feedback from you.

Please write this small function for testing your language installation ID of Excel
Code: Select all  Expand view  RUN
function XlangID()

   local oExcel, nLangID

   oExcel := ExcelObj()
   nLangID := oExcel:LanguageSettings:LanguageID( 2 )
   ? nLangID

return nLangID
 

Please let me know the result you get.

Note:
I think
1046 = Portuguese Brazil
2070 = Portuguese Poland.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: rpreview excel fwh1308

Postby Sistem » Wed Oct 02, 2013 10:05 pm

nageswaragunupudi

local cSubTot := "=SUBTOTAL(9;" // thanks

suggestion:
local hWnd
...
..
oExcel:Visible := .t.

hWnd:=oExcel:hWnd
ShowWindow(hWnd, 3)
BringWindowToTop(hWnd)


calls excel to foreground
FWH2008 | xHarbour | BCC74 | SQLRDD
User avatar
Sistem
 
Posts: 226
Joined: Sun May 13, 2012 7:52 am

Re: rpreview excel fwh1308

Postby Sistem » Wed Oct 02, 2013 10:10 pm

XlangID() = 1046
FWH2008 | xHarbour | BCC74 | SQLRDD
User avatar
Sistem
 
Posts: 226
Joined: Sun May 13, 2012 7:52 am

Re: rpreview excel fwh1308

Postby Sistem » Wed Oct 02, 2013 10:40 pm

nageswaragunupudi

veja:

GROUP ON Nota->Nat_Nota ;
FOOTER "TOTAL DE NOTAS ICMS => "+oReport:aGroups[1]:cValue+ ;
" ( "+ltrim(str(oReport:aGroups[1]:nCounter))+" )" ;
FONT 2


Image

Image
FWH2008 | xHarbour | BCC74 | SQLRDD
User avatar
Sistem
 
Posts: 226
Joined: Sun May 13, 2012 7:52 am


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 59 guests