topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
preview report got error when Windows User name Chinese word | This is happening because our metafile functions like create, open, etc are not supporting Unicode file path names.
These functions are now made Unicode compatible.
With this you will not face this problem from the next version of FWH2208 to be released.
For the present you need to bear with the problem. |
preview report got error when Windows User name Chinese word | [quote="nageswaragunupudi":1yuh8ggt]This is happening because our metafile functions like create, open, etc are not supporting Unicode file path names.
These functions are now made Unicode compatible.
With this you will not face this problem from the next version of FWH2208 to be released.
For the present you need to bear with the problem.[/quote:1yuh8ggt]
Mr.Rao
so the next version to be released? |
preview report got error when Windows User name Chinese word | We are trying to release around the middle of September. May be, we call it FWH2309 |
preview report got error when Windows User name Chinese word | Till then, if you like, you can make a small patch in printer.prg
Please see this code in METHOD new()
[code=fw:1rt0g825]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lMeta</span><br /> ::<span style="color: #000000;">hDcOut</span> = ::<span style="color: #000000;">hDC</span><br /> <span style="color: #00C800;">else</span><br /> ::<span style="color: #000000;">aMeta</span> = <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> ::<span style="color: #000000;">cDir</span> = GetEnv<span style="color: #000000;">(</span> <span style="color: #ff0000;">"TEMP"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">cDir</span> <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">cDir</span> = GetEnv<span style="color: #000000;">(</span> <span style="color: #ff0000;">"TMP"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">cDir</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"<span style="color: #000000;">\"</span><br /> ::cDir = SubStr( ::cDir, 1, Len( ::cDir ) - 1 )<br /> endif<br /><br /> if ! Empty( ::cDir )<br /> if ! lIsDir( ::cDir )<br /> ::cDir = GetWinDir()<br /> endif<br /> else<br /> ::cDir := GetWinDir()<br /> endif<br /> endif<br /><br /> if ::lMeta .and. ( ( ::lUseHaruPDF .and. IsHaruLinked() ) .or. ::lNativeWord )<br /> ::aCallLog := {}<br /> else<br /></span></div>[/code:1rt0g825]
Please add one line between "endif" and "if ::lMeta"
like this:
[code=fw:1rt0g825]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">endif</span><br /> ::<span style="color: #000000;">cDir</span> := <span style="color: #ff0000;">"<some directory in pure English>"</span> <span style="color: #B900B9;">// <-- Insert here</span><br /><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lMeta</span> .and. ........</div>[/code:1rt0g825]
You choose some existing directory name which is in English, where the user has rights to create files.
Do not include "\" at the end. |
preview report got error when Windows User name Chinese word | [quote="nageswaragunupudi":1huhmvup]Till then, if you like, you can make a small patch in printer.prg
Please see this code in METHOD new()
[code=fw:1huhmvup]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lMeta</span><br /> ::<span style="color: #000000;">hDcOut</span> = ::<span style="color: #000000;">hDC</span><br /> <span style="color: #00C800;">else</span><br /> ::<span style="color: #000000;">aMeta</span> = <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> ::<span style="color: #000000;">cDir</span> = GetEnv<span style="color: #000000;">(</span> <span style="color: #ff0000;">"TEMP"</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">cDir</span> <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">cDir</span> = GetEnv<span style="color: #000000;">(</span> <span style="color: #ff0000;">"TMP"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> <span style="color: #00C800;">if</span> <span style="color: #0000ff;">Right</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">cDir</span>, <span style="color: #000000;">1</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">"<span style="color: #000000;">\"</span><br /> ::cDir = SubStr( ::cDir, 1, Len( ::cDir ) - 1 )<br /> endif<br /><br /> if ! Empty( ::cDir )<br /> if ! lIsDir( ::cDir )<br /> ::cDir = GetWinDir()<br /> endif<br /> else<br /> ::cDir := GetWinDir()<br /> endif<br /> endif<br /><br /> if ::lMeta .and. ( ( ::lUseHaruPDF .and. IsHaruLinked() ) .or. ::lNativeWord )<br /> ::aCallLog := {}<br /> else<br /></span></div>[/code:1huhmvup]
Please add one line between "endif" and "if ::lMeta"
like this:
[code=fw:1huhmvup]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">endif</span><br /> ::<span style="color: #000000;">cDir</span> := <span style="color: #ff0000;">"<some directory in pure English>"</span> <span style="color: #B900B9;">// <-- Insert here</span><br /><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">lMeta</span> .and. ........</div>[/code:1huhmvup]
You choose some existing directory name which is in English, where the user has rights to create files.
Do not include "\" at the end.[/quote:1huhmvup]
Ok. I will try it later.
Thank you. |
preview report got error when Windows User name Chinese word | May I know your current FWH version?
Are you planning to upgrade? |
preview report got error when Windows User name Chinese word | [quote="nageswaragunupudi":zfudr30t]May I know your current FWH version?
Are you planning to upgrade?[/quote:zfudr30t]
I am using FWH 22.12 Version. |
preview si quito msje de dobleclick solo asi funca | tengo un problema con la clase rpreview cuando quiero hacer un preview me tira este erroR:Error description: Error BASE/1005 Message not found: TMETAFILE:_BLDBLCLICKEDsi comento esa linea sale el preview y se ve mi listado solo la mitad del texto, si quiero hacerle doble clik a la hoja no me hace caso obviamente x que comente la linead del msje oMeta1:blDblClicked := {|nRow, nCol, nKeyFlags| SetOrg1(nCol, nRow, nKeyFlags)}si me voy al combo del zoom y elijo 1 se arregla todouso fwh 2.6 sera que necesito pasarme al fwh2.7 o 2.8Gracias ! |
preview sin botones | La misma aplicación en un puesto con XP, no me muestra los botones del preview.
Y en windows 7 y windows 10, si los muestra.
Si alguien le pasa lo mismo, les agradecería me orienten. |
preview sin botones | Cual versión del FiveWin for xHarbour?
El windows XP está actualizado para la última versíon?
Muestra una imagen.
Teste este ejemplo el el windows xp, porfa:
[url:1iaqkpg3]http://anserkk.com/gnraomysql/view.php?id=18[/url:1iaqkpg3]
Saludos. |
preview sin botones | La versión que utilizo es FWH 17.04, con bcc7.
El xp es profesional, con service pack 3. |
preview sin botones | Compile y ejecute el ejemplo que me adjuntaste y funciona perfecto.
En xp, como en windows 7. |
preview sin botones | Prueba:
// Add this to your resources RC file
[code=fw:38oqeefc]<div class="fw" id="{CB}" style="font-family: monospace;"><br />#ifdef __FLAT__<br /> <span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">"C:<span style="color: #000000;">\F</span>WH1704<span style="color: #000000;">\S</span>AMPLES<span style="color: #000000;">\W</span>inXP<span style="color: #000000;">\W</span>indowsXP.Manifest"</span><br />#endif<br /><br />#ifdef __64__<br /> <span style="color: #000000;">1</span> <span style="color: #000000;">24</span> <span style="color: #ff0000;">"C:<span style="color: #000000;">\F</span>WH1704<span style="color: #000000;">\S</span>AMPLES<span style="color: #000000;">\W</span>inXP<span style="color: #000000;">\W</span>indowsXP.Manifest64"</span><br />#endif<br /> </div>[/code:38oqeefc]
Saludos. |
preview sin botones | Gracias, por darme una mano con este tema.
Puse lo lo que me pusiste en el RC y aparecieron los botones.
Muchas Gracias . |
preview su fivewin | ho ricominciato a riusare le librerie fivewin, ma mi succede una cosa strana con la creazione stampe:
uso questa istruzione:
PRINT oPrn NAME "Clienti 30 60 90" PREVIEW
DEFINE FONT oFont NAME "Courier new" SIZE 0, -8 OF oPrn
oPrn:SetLandscape()
e poi apro le varie pagine con PAGE e la finisco con ENDPAGE
ma il problema è che su 32 pagine le prime due sono bianche e le altre sono normali stampandomi però dalla pagina 3, per ovviare a questo metto le seguenti istruzioni
PAGE
ENDPAGE
PAGE
ENDPAGE
e così la stampa inizia si con due pagine bianche ma alla terza finalmente mi esce la pagina 1....
perchè? |
preview su fivewin | Fammi vedere un piccolo ma compilabile esempio del problema così lo provo qui e ti dico se lo fa anche a me. Comunque mi sento di escludere a priori che ci sia un problema del genere nelle Fivewin.
EMG |
preview su fivewin | ok, per esempio questo foglio mi esce in bianco
#include "FiveWin.ch"
FUNCTION stclient()
local oPrn, oFont
local nRowStep, nColStep
local nRow := 0
local nCol := 0
local oPen1 := 0
local m_pagina := 0
DEFINE PEN oPen1 WIDTH 1 COLOR CLR_BLACK
PRINT oPrn NAME "Clienti" PREVIEW
DEFINE FONT oFont NAME "Courier new" SIZE 0, -8 OF oPrn
oPrn:SetLandscape()
nRowStep = oPrn:nVertRes() / 56 // 56 righe
nColStep = oPrn:nHorzRes() / 190 // 170 colonne
PAGE
nRow += nRowStep * 1
oPrn:Say(nRow,nColStep*1,"PROVA",oFont)
nRow += nRowStep * 1
oPrn:Say(nRow,nColStep*01,"CONTO",oFont)
nRow += nRowStep * 1
oPrn:Line(nRow,nColStep*0,nRow,nColStep*190,oPen1)
ENDPAGE
ENDPRINT
oFont:End()
oPen1:End()
RETURN NIL |
preview su fivewin | A me esce un unico foglio in anteprima con scritto
PROVA
CONTO
e una lunga linea.
Vuoi il mio EXE per verificare?
EMG |
preview su fivewin | no, mi fido....
a sto punto quale potrebbe essere l'errore?
io compilo con clipper 5.2e
e blinker |
preview su fivewin | se aggindo queste istruzioni
*-----------
PAGE
nRow += nRowStep * 1
oPrn:Say(nRow,nColStep*1,"PROVA",oFont)
nRow += nRowStep * 1
oPrn:Say(nRow,nColStep*01,"CONTO",oFont)
nRow += nRowStep * 1
oPrn:Line(nRow,nColStep*0,nRow,nColStep*190,oPen1)
ENDPAGE
PAGE
nRow += nRowStep * 1
oPrn:Say(nRow,nColStep*1,"PROVA",oFont)
nRow += nRowStep * 1
oPrn:Say(nRow,nColStep*01,"CONTO",oFont)
nRow += nRowStep * 1
oPrn:Line(nRow,nColStep*0,nRow,nColStep*190,oPen1)
ENDPAGE
PAGE
nRow += nRowStep * 1
oPrn:Say(nRow,nColStep*1,"PROVA",oFont)
nRow += nRowStep * 1
oPrn:Say(nRow,nColStep*01,"CONTO",oFont)
nRow += nRowStep * 1
oPrn:Line(nRow,nColStep*0,nRow,nColStep*190,oPen1)
ENDPAGE
cioe aggiungendo tre volte altre gli stessi comandi di stampa, mi stampa dalla seconda pagina |
preview su fivewin | Ah, be', io l'ho provato con FWH e xHarbour ultime versioni. Purtroppo non ho modo di verificare che non ci siano stati dei problemi in qualche momento della storia delle Fivewin.
EMG |
preview su fivewin | ho anch'io FWH e xharbour, ma per non incappare in cose che non conosco non lo sto utilizzando....
la conversione da FW 192 a FWH e xharbour è poco traumatica ? |
preview su fivewin | In ogni caso non ti conviene perdere altro tempo con i 16 bit ora che anche i 32 sono in fase di declino.
Il passaggio potrebbe essere indolore ma ci sono alcune cose da tenere presente:
1. [b:1io5gqvr]Tutti[/b:1io5gqvr] i sorgenti vanno ricompilati e ovviamente non si possono utilizzare librerie a 16 bit.
2. Le risorse (RES o RC) vanno convertite a 32 bit.
3. Ci sono alcune piccole differenze sintattiche su alcune funzioni ma niente di non facilmente sistemabile.
EMG |
preview to excel | Is it possible to make preview in Excel like preview to Word or pdf? And how to do it? Thanks. |
preview to excel | En Excel lo hago asi...saludos... <!-- s:shock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked" /><!-- s:shock: -->
[b:igeix5nh]oHoja:PrintPreview()[/b:igeix5nh] // va despues de procesar los datos a mostrar y
debe existir esto antes [b:igeix5nh]oExcel:Visible := .t.[/b:igeix5nh], sino se queda colgado. prueba y comenta, gracias. |
preview to pdf using image2pdf | Hi
Can anyone has modified rpreview.prg to capture emf files and send them to IMAGE2PDF .
I need to create a PDF from Preview and automatically gives it a path and Name
Best regards |
preview to pdf using image2pdf | Try this...
[code:85drvr4b]
DEFINE BUTTON RESOURCE "ACROBAT" OF oBar GROUP ;
MESSAGE "Crea PDF" ;
ACTION SavePDF( ::oDevice ) ;
TOOLTIP "Crea PDF"
...
...
Function SavePdf( oDevice, lEmail )
LOCAL imageFilename := " "
LOCAL ix
LOCAL iErr := 0
LOCAL error
LOCAL i, hLibImg2PDF
local cPdffilename := oV:arc_dir + "TEMP\" + "WP"+DTOS(DATE())+"-"+STRTRAN( TIME(), ":", "" ) + "_" + ov:work_st + ".pdf" // "Test.pdf"
local aFiles:={}
LOCAL oMail, oFontT, cMailText
DEFAULT lEmail := .F.
IF !FILE( "image2PDF.dll" )
msgStop("MANCA FILE CREAZIONE PDF", APP_NAME )
RETURN NIL
ENDIF
aFiles := oDevice:aMeta
IF LEN( aFiles ) = 0
RETURN NIL
ENDIF
hLibImg2PDF:=LoadLib32( "image2PDF.dll")
if ValType( aFiles ) == "A"
//IF lAnd( WP_GEST_PDF, oV:nModuloWP )
//I2PDF_License("xxxxxxxxxxxxxxx")
//ELSE
I2PDF_License("DEMO")
//ENDIF
iErr := IPMeta( ) // Flag that his is a meta file
iErr := IPSize( ) // Reset the size
iErr := IPMetaAdjustText()
IF !lAnd( WP_GEST_PDF, oV:nModuloWP )
xI2PDF_BatesFormat( "Microsystem - VERSIONE DIMOSTRATIVA" )
xI2PDF_BatesLocation( 2, 2, 0 )
xI2PDF_BatesFont_Int( 30, "Times-Roman", 30, 60, 90, 1, 40, 50, 60 )
xI2PDF_BatesBackground_Int( 1, 192, 192, 192 )
ENDIF
// here, first convert the first image.
iErr := IPSetDPI(0) // Set DPI to the default for PDF's. It works better.
FOR ix := 1 TO LEN( aFiles ) // Build the pages using the array of temp files
imageFilename := aFiles[ix]
iErr := IPAddImg(imageFilename)
NEXT
better.
iErr := IPMakePDF(cPdffilename, 0, error, 40 ) // Create the PDF.
ENDIF
FreeLib32( hLibImg2PDF )
IF !EMPTY( oFontT )
oFontT:end()
ENDIF
if ! file(cPdfFileName)
Msginfo("Errore nella creazione del file PDF")
return nil
Endif
IF !lEmail
ShellExecute( ,"open",cPdfFileName,"",".\",.t. )
ELSE
cMailText := MEMOREAD( "testomail.txt" )
cMailText := IIF( EMPTY( cMailText ), " ", cMailText )
DEFINE MAIL oMAIL;
SUBJECT APP_NAME + " "; // Invio Documento: "+TIME()
TEXT cMailText + " "; // Invio Documento - "+ DTOC( DATE() )+' '+TIME()
TO oV:cEmailDefaultPDF + " ";
FILES ( cPdffilename ), cFileName( cPdfFileName ) ;
FROM USER
ACTIVATE MAIL oMail
ENDIF
RETURN NIL
*
** eof SavePDF
[/code:85drvr4b] |
preview to pdf using image2pdf | Hi Pymsoft
Tanks for your reply.
2 more things:
- Can you attach the classe "MAIL "
- How you put the icon in prev32.dll , You open it with what?
best regards |
preview to pdf using image2pdf | Buenos dias
y que libreria se debe enlazar, ya que al compilar salen funciones que no existen
desde ya gracias |
preview to pdf using image2pdf | to Pedro Faro:
the class mail is the standard with FWH
the icon i use is in my rc
Regards
para Patricio:
es una libreria de pago Image2PDF.dll que puedes probar gratuitamente.
Las funciones que faltan vienen en un .prg cuando descargas la dll.
<!-- m --><a class="postlink" href="http://www.utilitywarrior.com/Image-to-PDF.htm">http://www.utilitywarrior.com/Image-to-PDF.htm</a><!-- m -->
Saludos |
preview to pdf using image2pdf | Gracias pedro
Funciono increible, pero sale "EVALUATION MODE", <!-- s:o --><img src="{SMILIES_PATH}/icon_surprised.gif" alt=":o" title="Surprised" /><!-- s:o -->
veremos si adquerimos la licencia <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
preview to pdf using image2pdf | Hi PymSoft
I include the Acrobat BitMap in my RC but it doesn't appear in the preview.
The icons of preview are in prev32.dll . It don't have to be in prev32.dll too.
Best regards |
preview to pdf using image2pdf | Saludos Colegas:
Solo tengo unas cuantas dudas...
He revisado y ya baje el archivo zip que contiene el demo de la DLL, así como un archivo Image2PDF.PRG donde vienen funciones para su uso, tambien he agregado las lineas de código que se encuetran citadas anteriormente, pero, al agregar el archivo prg al proyecto y compilarlo muestra mensajes de que siguen faltando algunas funciones, me pregunto si lo estoy probando de forma equivocada.? <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> <!-- s:x --><img src="{SMILIES_PATH}/icon_mad.gif" alt=":x" title="Mad" /><!-- s:x --> <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: -->
Y si fuera posible y si no es mucho pedir que nos muestren las funciones que faltan para poder completar esta prueba..
_HB_FUN_IPMETA
_HB_FUN_IPSIZE
_HB_FUN_IPMETAADJUSTTEXT
_HB_FUN_XI2PDF_BATESFORMAT
_HB_FUN_XI2PDF_BATESLOCATION
_HB_FUN_XI2PDF_BATESFONT_INT
_HB_FUN_XI2PDF_BATESBACKGROUND_INT
_HB_FUN_IPSETDPI
_HB_FUN_IPADDIMG
_HB_FUN_IPMAKEPDF
Saludos.. |
preview to pdf using image2pdf | Pedro Faro: try open prev32.dll with pellesc and add the bitmap.
Regards
Patricio:
[code:2cx5bvev]
DLL32 STATIC FUNCTION I2PDF_License( code AS LPSTR) AS LONG;
PASCAL FROM "I2PDF_License" LIB "IMAGE2PDF.dll"
DLL32 STATIC FUNCTION IPMeta( ) AS LONG;
PASCAL FROM "I2PDF_MetaToNativePDF" LIB "Image2PDF.dll"
DLL32 STATIC FUNCTION IPMetaAdjustText() AS LONG;
PASCAL FROM "I2PDF_MetaTextFitBoundingRect" LIB "Image2PDF.dll"
DLL32 STATIC FUNCTION IPSize( ) AS LONG;
PASCAL FROM "I2PDF_UseEMFDeviceSize" LIB "Image2PDF.DLL"
// static unsigned int I2PDF_AddImage(char *image);
DLL32 STATIC FUNCTION IPAddImg( cImage AS LPSTR ) AS LONG;
PASCAL FROM "I2PDF_AddImage" LIB "Image2PDF.dll"
// static unsigned int I2PDF_SetDPI(unsigned int dpi);
DLL32 STATIC FUNCTION IPSetDpi( nDpi AS LONG ) AS LONG;
PASCAL FROM "I2PDF_SetDPI" LIB "Image2PDF.dll"
// static unsigned int I2PDF_MakePDF(char *output, int options, char *errorText, unsigned int maxErrorTextSize);
DLL32 STATIC FUNCTION IPMakePDF( cOutFile AS LPSTR, nOptions AS LONG, cErrTxt AS LPSTR, nMaxESize AS LONG ) AS LONG;
PASCAL FROM "I2PDF_MakePDF" LIB "Image2PDF.dll"
DLL32 FUNCTION COPYFILE( cExistName AS LPSTR, cNewName AS LPSTR, nFailIfExist AS LONG ) AS BOOL;
PASCAL FROM "CopyFileA" LIB "kernel32.dll"
DLL32 FUNCTION xI2PDF_BatesFormat( format AS LPSTR ) AS LONG;
PASCAL FROM "I2PDF_BatesFormat" LIB "Image2PDF.dll"
DLL32 FUNCTION xI2PDF_BatesLocation( verticalPosition AS LONG, horizontalPosition AS LONG, orientation AS LONG, margin AS DOUBLE) AS LONG;
PASCAL FROM "I2PDF_BatesLocation" LIB "Image2PDF.dll"
DLL32 FUNCTION xI2PDF_BatesFont_Int( iSize AS LONG, FontID AS LPSTR, fillRed AS LONG, fillGreen AS LONG, fillBlue AS LONG, iStyle AS LONG, otherRed AS LONG, otherGreen AS LONG, otherBlue AS LONG) AS LONG;
PASCAL FROM "I2PDF_BatesFont_Int" LIB "Image2PDF.dll"
DLL32 FUNCTION xI2PDF_BatesBackground_Int( shape AS LONG, bkRed AS LONG, bkGreen AS LONG, bkBlue AS LONG, borderRed AS LONG, borderGreen AS LONG, borderBlue AS LONG ) AS LONG;
PASCAL FROM "I2PDF_BatesBackground_Int" LIB "Image2PDF.dll"
[/code:2cx5bvev]
Saludos |
preview to pdf using image2pdf | Saludos de nuevo:
Ok ya no muestra los mensajes de que faltan funciones, ahora me surge una duda, para que tipos de reportes funciona..?? TReport, TPrint o TTxtPrev, ya que en los reportes con TReport truena al momento de exportar a PDF, porque no reconoce la variable oDevice y por lo consiguiente oDevice:aMeta
Se ve prometedor y ojala y nos puedan dar un ejemplito practico en base a todo lo que esta expuesro aki para podernos darnos una idea del resultado que se obtiene, y talvez, aventarnos a comprar la licencia para su uso completo..
Saludos y Gracias anticipadas.. <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
preview to pdf using image2pdf | creo que funciona para todos los reportes que usen rpreview, visto que ahi fue hice los cambios.
saludos |
preview to pdf using image2pdf | Gracias por el dato pymsoft:
Podrias proporcionarnos los cambios que realizaste al archivo RPreview.prg ya que le he seguido investigando y sigo teniendo problemas con los cambios que hize, este es el error que genera:
Descripción del Error:
___________________________________________________
Error BASE/1004
Class: 'NIL' has no exported method: AMETA
Args:
[ 1] = U
Llamadas al Stack:
___________________________________________________
Llamado desde AMETA(0)
Llamado desde SAVEPDF(1091)
Llamado desde (b)BUILDMENU(225)
Llamado desde TMENU:COMMAND(663)
Llamado desde TWINDOW:COMMAND(954)
Llamado desde TWINDOW:HANDLEEVENT(0)
Llamado desde _FWH(3206)
Llamado desde SYSREFRESH(0)
Llamado desde STOPUNTIL(0)
Llamado desde RPREVIEW(197)
Llamado desde (b)TREPORT:NEW(182)
Llamado desde TREPORT:ACTIVATE(859)
Llamado desde IMPFACT(1915)
Llamado desde (b)LISTFACTRA(79)
Llamado desde TBUTTONBMP:CLICK(167)
Llamado desde TBUTTON:HANDLEEVENT(0)
Llamado desde TBUTTONBMP:HANDLEEVENT(0)
Llamado desde _FWH(3206)
Llamado desde SENDMESSAGE(0)
Llamado desde TDIALOG:COMMAND(404)
Llamado desde TWINDOW:HANDLEEVENT(0)
Llamado desde TDIALOG:HANDLEEVENT(916)
Llamado desde DIALOGBOX(0)
Llamado desde TDIALOG:ACTIVATE(270)
Llamado desde LISTFACTRA(105)
Llamado desde (b)PRINCIPAL(720)
Llamado desde TBTNBMP:CLICK(0)
Llamado desde TBTNBMP:LBUTTONUP(0)
Llamado desde TWINDOW:HANDLEEVENT(0)
Llamado desde TCONTROL:HANDLEEVENT(0)
Llamado desde TBTNBMP:HANDLEEVENT(0)
Llamado desde _FWH(3206)
Llamado desde WINRUN(0)
Llamado desde TWINDOW:ACTIVATE(903)
Llamado desde PRINCIPAL(821)
Llamado desde MAIN(89)
Ya que esta esta es la función con la que intento exportarla a PDF pero la variable "oDevice" no existe
//----------------------------------------------------------------------------//
FUNCTION SavePdf( [b:3624118k]oDevice[/b:3624118k], lEmail )
LOCAL imageFilename := " "
LOCAL ix
LOCAL iErr := 0
LOCAL error
LOCAL i, hLibImg2PDF
LOCAL cPdffilename := ".\DEMO.PDF" //Aki no existe la variable [b:3624118k]oV:arc_dir[/b:3624118k] ni [b:3624118k]ov:work_st[/b:3624118k]
LOCAL aFiles:={}
LOCAL oMail, oFontT, cMailText
DEFAULT lEmail := .F.
IF !FILE( "image2PDF.dll" )
msgStop("MANCA FILE CREAZIONE PDF", APP_NAME )
RETURN NIL
ENDIF
aFiles := oDevice:aMeta // Aki truena el metodo aMeta..
Saludos y gracias por tu tiempo |
preview to pdf using image2pdf | Estos son los cambios que hice:
[code:3tbd07uo]
METHOD BuildButtonBar() CLASS TPreview
..
..
IF lImage2PDF
DEFINE BUTTON RESOURCE "ACROBAT" OF oBar GROUP ;
MESSAGE "Crea PDF" ;
ACTION SavePDF( ::oDevice ) ;
TOOLTIP "Crea PDF"
DEFINE BUTTON RESOURCE "SENDMAIL" OF oBar ;
MESSAGE "Invia per Email" ;
ACTION SavePDF( ::oDevice, .T. ) ; // ::Zoom() ;
TOOLTIP "Invia per Email"
ENDIF
..
[/code:3tbd07uo]
Saludos |
preview to pdf using image2pdf | [b:3cja5cbd]Saludos de Nuevo pymsoft y perdón por la insistencia..[/b:3cja5cbd]
Estan hechos los cambio y ya empezo a funcionar, pero me he dado cuenta de que muchas variables no estan definidas y por lo tanto falla al momento de pasar el reporte a PDF..
Estas son algunas de las variables que no son reconocidas y de las cuales ignoro su valor..
oV:arc_dir
ov:work_st
better.
WP_GEST_PDF
oV:nModuloWP
<!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> Ademas de que al intentar registrar la libreria como demo el reporte truena con error de proteccion general de Windows <!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: --> <!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: -->
[code:3cja5cbd]IF lAnd( WP_GEST_PDF, oV:nModuloWP )
//I2PDF_License("xxxxxxxxxxxxxxx")
ELSE
msginfo("Poniendo Licencia")
I2PDF_License("DEMO") // aki truena por Error de protección general.-
msginfo("Licencia en Demo Ok")
ENDIF[/code:3cja5cbd]
[url=http://img397.imageshack.us/my.php?image=reportewv8.jpg:3cja5cbd][img:3cja5cbd]http://img397.imageshack.us/img397/6098/reportewv8.th.jpg[/img:3cja5cbd][/url:3cja5cbd]
Por eso insisto <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: --> en que si nos pudieran proporcionar un pequeño ejemplo funcional con codigo completo incluido para poder examinar con detenimiento esta otra forma de exportar reportes ya que es de valiosa importancia para muchos colegas.. <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: -->
Gracias de nuevo y disculpen la molestia y mi insistencia.. |
preview to pdf using image2pdf | Victor, espero te sirvan estos comentarios.
Al descargar Image2PDF se obtienen dos DLLs, Image2PDF.Dll que al usarla genera GPFs, renombra y usa Image2PDF StdCall.Dll.
Agregué a RPreview el código de la función SavePDF() y las DLL32 publicadas, despues de algunas compilaciones todo funciona.
No hago público el códogo de RPreview porque la tengo totalmente modificada a mis necesidades, con lo que expuso Pedo me fue suficiente.
Gracias Pedro.
Solo me falta adquirir la licencia y listo! |
preview to pdf using image2pdf | Saludos de Nuevo y perdón otra vez por la insistencia..
Ya registra la dll como demo y no da problemas de error de protección general <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> , hasta ahi bien, pero sigo teniendo problemas con estas variables, en tiempo de ejecución no son reconocidas y no encuentro por ningun lado donde hace referencia a ellas porque no estan declaradas dentro de la función SavePDF( ::oDevice ), ni dentro de la Clase TPreview. <!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: --> <!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: --> <!-- s:twisted: --><img src="{SMILIES_PATH}/icon_twisted.gif" alt=":twisted:" title="Twisted Evil" /><!-- s:twisted: --> <!-- s:? --><img src="{SMILIES_PATH}/icon_confused.gif" alt=":?" title="Confused" /><!-- s:? --> <!-- s:oops: --><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarassed" /><!-- s:oops: -->
oV:arc_dir
ov:work_st
better.
WP_GEST_PDF
oV:nModuloWP
APP_NAME
Ademas de que en esta instrucción no reconoce la variable DOUBLE <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: -->
DLL32 FUNCTION xI2PDF_BatesLocation( verticalPosition AS LONG, horizontalPosition AS LONG, orientation AS LONG, margin AS [b:3ehd0hx2]DOUBLE[/b:3ehd0hx2]) AS LONG;
PASCAL FROM "I2PDF_BatesLocation" LIB "Image2PDF.dll"
Es por eso mi insistencia <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: --> <!-- s:x --><img src="{SMILIES_PATH}/icon_mad.gif" alt=":x" title="Mad" /><!-- s:x --> <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> en que me hechen una manita y en concer todo el código modificado que sea 100% funcional como lo han probado ustedes, para saber exactamente como trabaja y ver la posibilidad de comprar la licencia para su uso completo, me interesa esta forma de exportar los reportes a PDF, ya que ahora es lo que necesito para poder continuar con mi proyecto...
Saludos y en espera de su valiosa ayuda.. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
preview to pdf using image2pdf | Olvidate de las variables quitalas y listo:
[code:277nfvt6]
FUNCTION SavePDF(oDevice)
LOCAL error, hLibImg2PDF
LOCAL imageFilename:=" "
LOCAL cPdfFilename
LOCAL nI, iErr:=0
LOCAL aFiles:={}, cTemp
cPdfFileName:=cUTem+"\"+Left(cNSys,2)+"_Temp\Documento.Pdf"
IF !File("Image2PDF.Dll")
MsgAlert("No existe DLL para generar PDFs.","Precaución!")
RETURN (NIL)
ENDIF
aFiles:=oDevice:aMeta
hLibImg2PDF:=LoadLib32("Image2PDF.Dll")
IF ValType(aFiles)=="A"
I2PDF_License("DEMO")
iErr:=IPMeta() // Flag that his is a meta file
iErr:=IPSize() // Reset the size
iErr:=IPMetaAdjustText()
iErr:=IPSetDPI(0) // Set DPI to the default for PDF's. It works better
FOR nI:=1 TO Len(aFiles) // Build the pages using the array of temp files
CursorWait()
imageFilename:=aFiles[nI]
iErr:=IPAddImg(imageFilename)
NEXT nI
CursorWait()
iErr:=IPMakePDF(cPdfFileName,0,error,40) // Create the PDF.
ENDIF
FreeLib32(hLibImg2PDF)
CursorArrow()
IF !File(cPdfFileName)
MsgInfo("No se generó el archivo PDF.","Información!")
ELSE
ShellExecute(,"Open",cPdfFileName,"",".\",.T.)
ENDIF
RETURN (NIL)
[/code:277nfvt6]
Ya adquirí la licencia y todo bien, si deseas ver como funciona podrás descargar RC-extended desde mi sitio a partir de la siguiente semana. |
preview to pdf using image2pdf | [b:14o4tpze]Mucha Gracias Alfredo Arteaga[/b:14o4tpze] <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Ahora si ya pude realizar las pruebas y ya exporte en Reporte a PDF, quedo de maravillas, me comentas que ya compraste la licencia de uso, quisiera saber cuanto es su costo en pesos mexicanos y como hago para comprar la licencia ya que no uso tarjeta de credito, si posible el deposito bancario y de ser así de cuanto sería el importe..
Te dejo mi correo privado [b:14o4tpze][email protected][/b:14o4tpze]
Muchas gracias por ayudarme... <!-- s:idea: --><img src="{SMILIES_PATH}/icon_idea.gif" alt=":idea:" title="Idea" /><!-- s:idea: --> <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> <!-- s8) --><img src="{SMILIES_PATH}/icon_cool.gif" alt="8)" title="Cool" /><!-- s8) -->
Saludos... |
preview to pdf using image2pdf | Que interesantedonde se compra la libreria? es cara ??si no es cara a la mejor yo la pago ya que donde toy trabajando son algo tacañitos, coditos <!-- s:x --><img src="{SMILIES_PATH}/icon_mad.gif" alt=":x" title="Mad" /><!-- s:x --> SaluditosAida |
preview to pdf using image2pdf | Hola Aida buenos dias:Para comprar la libreria ingresa en esta dirección, haz click en el enlaze Buy y te pedira tus datos.<!-- m --><a class="postlink" href="http://www.utilitywarrior.com/Image-to-PDF-Dynamic-Link-Library.htm">http://www.utilitywarrior.com/Image-to- ... ibrary.htm</a><!-- m -->El precio por la libreria es de $108.98 USD, yo no la he podido comprar porque no uso tarjeta de credito..Saludos.. <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
preview to pdf using image2pdf | HOLA$108.98 USD EJEM EJEM PUES CREO QUE LOS JUNTARE ANDO APRETADITA EN DINERITO A UN TENGO TERAPIA Y NO ES GRATISPERO MUCHAS GRACIAS YA ANOTE EL DATOQUE TENGAS UNA BONITO FIN DE SEMANAAIDA <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> |
preview to pdf using image2pdf | Lo mortales normalmente hacemos una vaquita.quien se apunta..jejej.saludos.. |
preview to pdf using image2pdf | Compañeros:Seguí el hilo de las indicaciones, hice todas las modificaciones en mis PRG, añadí las Lib y PRGs... Aparentemente todo ok, me compila bien y sin errores, pero al correr el EXE y visualizar el Preview no me genera el PDF y por consiguiente no me lo muestra.[quote:3hv48mql]
IF !File(cPdfFileName)
MsgInfo("No se generó el archivo porque no lo encuentro","Información!")
endif
[/quote:3hv48mql]El buscador de Windows no me localiza el PDF. Tengo el código para crear el PDF tal y como se muestra en este hilo.¿ Alguien sabe que puede pasar ?Mil graciasLoren |
preview to pdf using image2pdf | Lorenzo,porque no subes el código así se puede opinar al respecto? Es dificil adivinar. Si realmente hubieses copiado el código tal cual no tendrías ese problema.Por cierto, en la oficina usamos Image2PDF y funciona bastante bien. En la ultima semana he estado en contacto con el desarrollador y muy amablemente ha accedido a hacer algunos ajustes para mejorar la calidad de la conversión. Aún está en beta y no está disponible para la descarga, pero funciona de maravillas y muy rápido.Un saludo,Carlos. |
preview to pdf using image2pdf | Hola,Pueden tratar este codigo con "Image2PDF.dll". Lo estoy usando desde hace mas de un año y me funciona perfecto.[code:21kfjkbc]
FUNCTION SaveAsPDF(cRepName)
LOCAL result, hLib
LOCAL cBuffer:=space(300)
hLib = LOADLIBRARY( "Image2PDF.dll" )
I2PDF_UseEMFDeviceSize()
I2PDF_License("YOUR LICENSE")
I2PDF_Log(".\log.txt", 3)
I2PDF_MetaTextFitBoundingRect()
I2PDF_UseEMFDeviceSize()
I2PDF_MetaToNativePDF()
I2PDF_SetDPI(0) //- or to whatever value you require
DECLARE aEmf := {}
aEmf := directory("*.emf")
FOR nX := 1 TO len(aEmf)
nRc := I2PDF_AddImage(alltrim(aEmf[nX, F_NAME]))
NEXT
nResult := I2PDF_MakePDF(cRepName, 0, @cBuffer ,300)
FreeLibrary(hLib)
RETURN (.T.)
DLL32 Function I2PDF_AddImage(image as LPSTR);
AS LONG PASCAL FROM "I2PDF_AddImage" LIB "IMAGE2PDF.DLL"
//Public Shared Function I2PDF_AddImage(ByVal image As String) As Integer
DLL32 Function I2PDF_SetProducer(producer as LPSTR);
AS LONG PASCAL FROM "I2PDF_SetProducer" LIB "IMAGE2PDF.DLL"
//Public Shared Function I2PDF_SetProducer(ByVal producer As String) As Integer
DLL32 Function I2PDF_GetDLLVersion();
AS LONG PASCAL FROM "I2PDF_GetDLLVersion" LIB "IMAGE2PDF.DLL"
//Public Shared Function I2PDF_GetDLLVersion() As Integer
DLL32 Function I2PDF_License(code As LPSTR);
AS LPSTR PASCAL FROM "I2PDF_License" LIB "IMAGE2PDF.DLL"
// Public Shared Sub I2PDF_License(ByVal code As String)
DLL32 Function I2PDF_MetaImageMaxMP(maxmp as LONG);
AS LONG PASCAL FROM "I2PDF_MetaImageMaxMP" LIB "IMAGE2PDF.DLL"
//Public Shared Function I2PDF_MetaImageMaxMP(ByVal maxmp As Double) As Integer
DLL32 Function I2PDF_DeleteImagesOnConvert();
AS VOID PASCAL FROM "I2PDF_DeleteImagesOnConvert" LIB "IMAGE2PDF.DLL"
//Public Shared Sub I2PDF_DeleteImagesOnConvert()
DLL32 Function I2PDF_SetDPI(dpi as LONG);
AS LONG PASCAL FROM "I2PDF_SetDPI" LIB "IMAGE2PDF.DLL"
//Public Shared Function I2PDF_SetDPI(ByVal dpi As Integer) As Integer
DLL32 Function I2PDF_MakePDF(output As LPSTR, options as LONG, @cBuffer As LPSTR, ;
maxErrorTextSize As LONG);
AS LONG PASCAL FROM "I2PDF_MakePDF" LIB "IMAGE2PDF.DLL"
//Public Shared Function I2PDF_MakePDF(ByVal output As String, ByVal int options,;
DLL32 Function I2PDF_SetPermissionPrint();
AS VOID PASCAL FROM "I2PDF_SetPermissionPrint" LIB "IMAGE2PDF.DLL"
//Public Shared Sub I2PDF_SetPermissionPrint()
DLL32 Function I2PDF_MetaImageMaxMP_Int(maxmp as LONG);
AS LONG PASCAL FROM "I2PDF_MetaImageMaxMP_Int" LIB "IMAGE2PDF.DLL"
//Public Shared Function I2PDF_MetaImageMaxMP_Int(ByVal maxmp As Integer) As Integer
DLL32 Function I2PDF_UseEMFDeviceSize();
AS VOID PASCAL FROM "I2PDF_UseEMFDeviceSize" LIB "IMAGE2PDF.DLL"
//Public Shared Sub I2PDF_UseEMFDeviceSize()
DLL32 Function I2PDF_MetaToNativePDF();
AS VOID PASCAL FROM "I2PDF_MetaToNativePDF" LIB "IMAGE2PDF.DLL"
//Public Shared Sub I2PDF_MetaToNativePDF()
DLL32 Function I2PDF_Log(logFilename As LPSTR, logLevel as LONG);
AS LONG PASCAL FROM "I2PDF_Log" LIB "IMAGE2PDF.DLL"
DLL32 Function I2PDF_MetaTextFitBoundingRect();
AS VOID PASCAL FROM "I2PDF_MetaTextFitBoundingRect" LIB "IMAGE2PDF.DLL"[/code:21kfjkbc]Saludos,George |
preview zoom at init | In Rpreview.prg when issuing a zoom(.t.) before activating the window, the result is very bad. The meta coors have to be changed in that case.
I basically want to show the preview zoomed at init.
Any idea ?
Thanks
Richard |
preview zoom at init | Richard,
Could you please provide a small and self contained sample of what you are doing ? Thanks. |
preview zoom at init | [quote="Antonio Linares":24tcravl]Richard,
Could you please provide a small and self contained sample of what you are doing ? Thanks.[/quote:24tcravl]
problem Fixed
On init zoom(.t.) does the trick
Richard |
preview zoom at init | Richard,
Very good <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> |
preview.dll run time error | I got that run time error for the first time .
Application
===========
Path and name: E:\programs\clipper\FWH\sitex\sitex.exe (32 bits)
Size: 1,190,400 bytes
Time from start: 0 hours 0 mins 11 secs
Error occurred at: 10/03/2006, 16:30:07
Error description: Error FiveWin/3 Cannot create Dialog Box:
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResource: PREVIEW_PROC
Stack Calls
===========
Called from: => CREATEDLGERROR(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: => TREPORT:ACTIVATE(0)
Called from: => TWBROWSE:REPORT(0)
Called from: => (b)LISTCUST(190)
Called from: => TBUTTON:CLICK(0)
Called from: => TCONTROL:HANDLEEVENT(0)
Called from: => _FWH(0)
Called from: => SENDMESSAGE(0)
Called from: => TWINDOW:COMMAND(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: => DIALOGBOXINDIRECT(0)
Called from: => TWINDOW:ACTIVATE(0)
Called from: => LISTCUST(199)
Called from: => (b)BUILDMENU(68)
Called from: => TMENU:COMMAND(0)
Called from: => TWINDOW:COMMAND(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: => _FWH(0)
Called from: => WINRUN(0)
Called from: => TWINDOW:ACTIVATE(0)
Called from: => MAIN(50) |
preview.dll run time error | Ehab,
You cannot have PREVIEW.DLL in a 32-bit program.
In 32-bit environments, we use PREV32.DLL
- Also check your private email -
Regards
Evans |
preview: cerrar después de imprimir | Buenas tardes:
Tengo el nuevo fw v.17.09
Cuando hago el preview para imprimir una factura, aparece el preview como corresponde e imprime la factura.
Hasta ahí todo bien.
Lo que necesitaría saber es como hacer para que cuando termine la impresión el preview se cierre sólo sin usar el icono
de "salir"
Muchas gracias.
Pedro Lavallén. |
preview: cerrar después de imprimir | Puedes modificar y enlazar rpreview.prg en tu aplicación y después de la función de imprimir cierras la ventana con la función de salir [code=fw:1gnwog7m]<div class="fw" id="{CB}" style="font-family: monospace;">::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span></div>[/code:1gnwog7m] |
preview: cerrar después de imprimir | ¿ No habrá otra manera, sin tener que modificar el rpreview.prg ?
Porque en versiones anteriores, vi que se cerraba solo. |
preview: cerrar después de imprimir | Al compilar me tira el siguiente error:
rpreview.prg(351) Error E0030 Syntax error: "syntax error at 'TOOLTIP'" |
preview: cerrar después de imprimir | si he escrito mal el paréntesis, prueba asi
[code=fw:u0jx33cb]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">OF</span> oBar GROUP ;<br /> <span style="color: #0000ff;">MENU</span> ::<span style="color: #000000;">PrintersMenu</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> FWString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Print actual page"</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ValType<span style="color: #000000;">(</span> ::<span style="color: #000000;">bPrint</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">'B'</span>, Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bPrint</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">)</span>, ::<span style="color: #000000;">PrintPage</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>,::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> ;<br /> TOOLTIP FWString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Print"</span> <span style="color: #000000;">)</span><br /> </div>[/code:u0jx33cb] |
preview: cerrar después de imprimir | Muy amable por tu respuesta !
Pero, sería mucho pedir me digas exactamente dentro del código del rpreview.prg, dónde
poner el ::oWnd:End()
Gracias !
Pedro. |
preview: cerrar después de imprimir | Yo lo pondria aqui :
[code=fw:3noof5wi]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BUTTON</span> oBtn <span style="color: #0000ff;">OF</span> oBar GROUP ;<br /> <span style="color: #0000ff;">MENU</span> ::<span style="color: #000000;">PrintersMenu</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> ;<br /> <span style="color: #0000ff;">MESSAGE</span> FWString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Print actual page"</span> <span style="color: #000000;">)</span>;<br /> <span style="color: #0000ff;">ACTION</span> <span style="color: #000000;">(</span><span style="color: #00C800;">If</span><span style="color: #000000;">(</span> ValType<span style="color: #000000;">(</span> ::<span style="color: #000000;">bPrint</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">'B'</span>,<span style="color: #000000;">(</span> Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bPrint</span>, <span style="color: #00C800;">Self</span> <span style="color: #000000;">)</span>, ::<span style="color: #000000;">PrintPage</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> ;<br /> TOOLTIP FWString<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Print"</span> <span style="color: #000000;">)</span><br /> </div>[/code:3noof5wi]
Es decir, la ultima acción después de pulsar sobre el icono de la impresora. No he hecho la prueba pero lo primero que se me ocurre es ahi. |
preview: cerrar después de imprimir | Funcionó perfecto !
eras un Campeón !
Gracias por todo !
Pedro. |
preview: cerrar después de imprimir | Me alegro, a mandar.
Estamos todos para ayudarnos. |
preview: cerrar después de imprimir | Otra forma, sin modificar la clase
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=17&t=34973&p=209484#p209484">viewtopic.php?f=17&t=34973&p=209484#p209484</a><!-- l --> |
preview: esta visible icono excel pero no hace nada-SOLUCION | Fivewineros:
No me funciona el icono para exportar a excel desde el preview del report, he compilado report.prg y rpreview.prg que viene con el fwh 17.12 conjuntamente con mis prgs y tampoco nada, el icono del excel se ve en el preview pero al pasar el mouse sobre éste es como que no hay ningún boton
codigo fuente
[code=fw:wkdyev14]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> REPORT oRpt ;<br /> CAPTION <span style="color: #ff0000;">'Listado de Clientes'</span> ;<br /> <span style="color: #0000ff;">FONT</span> oFont1, oFont2, oFont3, oFont4, oFont5 ;<br /> HEADER cNombre, <span style="color: #ff0000;">"Fecha: "</span>+DTOC<span style="color: #000000;">(</span>DATE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>, <span style="color: #ff0000;">"Almacen.soft"</span>, <span style="color: #ff0000;">""</span> <span style="color: #0000ff;">RIGHT</span>;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">'Listado de Clientes'</span>,<span style="color: #ff0000;">" "</span> <span style="color: #0000ff;">CENTER</span> ;<br /> FOOTER <span style="color: #ff0000;">"Página: "</span>+STR<span style="color: #000000;">(</span>oRpt:<span style="color: #000000;">nPage</span>,<span style="color: #000000;">3</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">RIGHT</span> <br /><br /> COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"COD"</span> ;<br /> <span style="color: #00C800;">DATA</span> oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Codigo"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">11</span><br /> COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"RUC"</span> ;<br /> <span style="color: #00C800;">DATA</span> oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Ruc"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">11</span><br /> COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"RazOn Social"</span> ;<br /> <span style="color: #00C800;">DATA</span> oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Ng"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span> ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">30</span><br /> COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"DIRECCION"</span> ;<br /> <span style="color: #00C800;">DATA</span> oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Di"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br /> COLUMN <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"TELEFONO"</span> ;<br /> <span style="color: #00C800;">DATA</span> oRs:<span style="color: #000000;">Fields</span><span style="color: #000000;">(</span><span style="color: #ff0000;">"Te"</span><span style="color: #000000;">)</span>:<span style="color: #000000;">Value</span><br /> END REPORT<br /><br /> <span style="color: #00C800;">IF</span> oRpt:<span style="color: #000000;">lCreated</span><br /> oRpt:<span style="color: #000000;">bSkip</span> := <span style="color: #000000;">{</span> || oRs:<span style="color: #000000;">MoveNext</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> REPORT oRpt <span style="color: #00C800;">While</span> !oRs:<span style="color: #000000;">Eof</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <br /><br /> oRs:<span style="color: #000000;">MoveFirst</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oFont1:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oFont2:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oFont3:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oFont4:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oFont5:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> </div>[/code:wkdyev14]
Hay alguna intruccion por agregar o quitar en el report.prg o rpreview.prg?
Gracias por su ayuda |
preview: esta visible icono excel pero no hace nada-SOLUCION | Mira en RPreview: WHEN ::CanExportToExcel
[url:rwvk2tbs]http://www.fivetechsupport.com/forums/viewtopic.php?f=6&t=36983[/url:rwvk2tbs]
Saludos. |
preview: esta visible icono excel pero no hace nada-SOLUCION | Please insert this code
[code=fw:tgaa6r6l]<div class="fw" id="{CB}" style="font-family: monospace;"><br />oRpt:<span style="color: #000000;">bInit</span> := <span style="color: #000000;">{</span> || oRs:<span style="color: #000000;">MoveFirst</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> </div>[/code:tgaa6r6l]
before
[code=fw:tgaa6r6l]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #0000ff;">ACTIVATE</span> REPORT oRpt <span style="color: #00C800;">While</span> !oRs:<span style="color: #000000;">Eof</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> </div>[/code:tgaa6r6l]
If you do this Excel button is activated and you can export the report to Excel. |
preview: esta visible icono excel pero no hace nada-SOLUCION | Gracias joao por tu ayuda, lo solucione con la sugerencia de Mr. Rao
Thank you Master Rao!! |
prices breakdown | I have to convert a total price into columns and positions relative to this system, i.e. the total price must be broken down into parts according to the scheme
aImports:={200,100,50,20,10,5,3,2,1,0.50,0.20,0.10,0.05}
for a sample :
total price 1.20 it return me
col - Row
9 --------1
11 -------1
the total max is [b:2mblfxtw]391.85[/b:2mblfxtw] is the sum of all columns
I made a test but there is an error because then the 4 position it jump to 9 and I not understood why
[img:2mblfxtw]https://i.postimg.cc/FsdHtDgW/mm.png[/img:2mblfxtw]
the second column of xbrowse it the row of scheme and the first are the columns
as you can see it cal 1,2,3,4 then make error
[b:2mblfxtw]my test[/b:2mblfxtw]
[code=fw:2mblfxtw]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Fivewin.ch"</span><br /><br /><span style="color: #00C800;">function</span> test<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> abolletta := <span style="color: #000000;">{</span><span style="color: #000000;">391.85</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> aImports := Restore_Prices<span style="color: #000000;">(</span>abolletta<span style="color: #000000;">)</span><br /><br />XBROWSER aImports<br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span> <br /><span style="color: #B900B9;">//---------------------------------------------------------------------//</span><br /> <span style="color: #00C800;">Function</span> Restore_Prices<span style="color: #000000;">(</span>aTotali<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> nRiga<br /> <span style="color: #00C800;">local</span> nColonna,nNumero<br /> <span style="color: #00C800;">local</span> nI<br /> <span style="color: #00C800;">local</span> nTotale<br /> <span style="color: #00C800;">local</span> aData:= <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> aDataX:= <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">For</span> ncolonna= <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">6</span><br /> nTotale:= aTotali<span style="color: #000000;">[</span>ncolonna<span style="color: #000000;">]</span><br /> aData:= <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #B900B9;">//righe</span><br /> aData:= BinCalc<span style="color: #000000;">(</span>nTotale<span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">For</span> k= <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span>adata<span style="color: #000000;">)</span><br /> nriga:=adata<span style="color: #000000;">[</span>k<span style="color: #000000;">]</span><br /> AaDd<span style="color: #000000;">(</span>aDataX,<span style="color: #000000;">{</span>nriga,nColonna<span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Next</span><br /> <span style="color: #00C800;">Next</span><br /><span style="color: #00C800;">return</span> aDataX<br /><br /><span style="color: #00C800;">Function</span> BinCalc<span style="color: #000000;">(</span>nValue<span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> aImports:=<span style="color: #000000;">{</span><span style="color: #000000;">200</span>,<span style="color: #000000;">100</span>,<span style="color: #000000;">50</span>,<span style="color: #000000;">20</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">0.50</span>,<span style="color: #000000;">0.20</span>,<span style="color: #000000;">0.10</span>,<span style="color: #000000;">0.05</span><span style="color: #000000;">}</span><br /><span style="color: #00C800;">LOCAL</span> nPosition := <span style="color: #000000;">0</span><br /><span style="color: #00C800;">LOCAL</span> nRest := nValue<br /><span style="color: #00C800;">LOCAL</span> aRet := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">DO</span> <span style="color: #00C800;">WHILE</span> .T.<br /> nPosition := ASCAN<span style="color: #000000;">(</span>aImports,<span style="color: #000000;">{</span>|e| e <= nRest<span style="color: #000000;">}</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">IF</span> nPosition > <span style="color: #000000;">0</span><br /> AADD<span style="color: #000000;">(</span>aRet,nPosition<span style="color: #000000;">)</span><br /> nRest -= aImports<span style="color: #000000;">[</span>nPosition<span style="color: #000000;">]</span><br /> <span style="color: #00C800;">ELSE</span><br /> EXIT<br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #00C800;">ENDDO</span><br /><span style="color: #00C800;">RETURN</span> aRet<br /> </div>[/code:2mblfxtw] |
prices breakdown | [quote:15r7jpl8]for a sample :
total price 1.20 it return me
col - Row
9 --------1
11 -------1
[/quote:15r7jpl8]
If the total price is 40, what is the correct result you expect? |
prices breakdown | 40.00 euro or 0.40 euro?
aImports:={200,100,50,20,10,5,3,2,1,0.50,0.20,0.10,0.05
If Is 0.40 it's no possibile
If Is 40.00
col 4 (20)
col 5 (10)
col 6(5)
Col7 (3)
col8(2) |
prices breakdown | [quote:3a9jx542]If Is 0.40 it's no possibile[/quote:3a9jx542]
Any value with decimal part .40 is not possibe, eg. 100.40, 90.40. etc. |
prices breakdown | [quote:6s4es5tj]
the total max is 391.85 is the sum of all columns
I made a test but there is an error because then the 4 position it jump to 9 and I not understood why
Image
the second column of xbrowse it the row of scheme and the first are the columns
as you can see it cal 1,2,3,[/quote:6s4es5tj]
This is correct
[code=fw:6s4es5tj]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #000000;">200</span> + <span style="color: #000000;">100</span> + <span style="color: #000000;">50</span> + <span style="color: #000000;">20</span> + <span style="color: #000000;">20</span> + <span style="color: #000000;">1</span> + <span style="color: #000000;">0.50</span> + <span style="color: #000000;">0.20</span> + <span style="color: #000000;">0.10</span> + <span style="color: #000000;">0.5</span> = <span style="color: #000000;">391.85</span></div>[/code:6s4es5tj]
Because you used <= same value ( 20 ) is used twice. |
prices breakdown | This logic gives the result as you expect:
[code=fw:125vn6xy]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> ValSplit<span style="color: #000000;">(</span> nValue <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> nRest, aRet := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">DEFAULT</span> nValue := <span style="color: #000000;">391.65</span><br /> nRest := nValue<br /><br /> AEval<span style="color: #000000;">(</span> <span style="color: #000000;">{</span><span style="color: #000000;">200</span>,<span style="color: #000000;">100</span>,<span style="color: #000000;">50</span>,<span style="color: #000000;">20</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">0.50</span>,<span style="color: #000000;">0.20</span>,<span style="color: #000000;">0.10</span>,<span style="color: #000000;">0.05</span><span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> |n,i| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> n <= nRest, <span style="color: #000000;">(</span> AAdd<span style="color: #000000;">(</span> aRet, <span style="color: #000000;">{</span> i, n <span style="color: #000000;">}</span> <span style="color: #000000;">)</span>, ;<br /> nRest := <span style="color: #0000ff;">ROUND</span><span style="color: #000000;">(</span> nRest - n, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> nRest != <span style="color: #000000;">0.00</span><br /> ? <span style="color: #ff0000;">"not possible. nRest ="</span>, nRest<br /> <span style="color: #00C800;">else</span><br /> XBROWSER aRet SETUP <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">cHeaders</span> := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"COL"</span>, <span style="color: #ff0000;">"EUROS"</span> <span style="color: #000000;">}</span>, ;<br /> oBrw:<span style="color: #000000;">lFooter</span> := .t., oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">cEditPicture</span> := <span style="color: #ff0000;">"999.99"</span>, ;<br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM, oBrw:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> aRet<br /><br /> </div>[/code:125vn6xy]
[url=https://imageshack.com/i/pnWHwzMhp:125vn6xy][img:125vn6xy]https://imagizer.imageshack.com/v2/xq90/923/WHwzMh.png[/img:125vn6xy][/url:125vn6xy] |
prices breakdown | [quote="nageswaragunupudi":3kd29t8q]This logic gives the result as you expect:
[code=fw:3kd29t8q]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">function</span> ValSplit<span style="color: #000000;">(</span> nValue <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> nRest, aRet := <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">DEFAULT</span> nValue := <span style="color: #000000;">391.65</span><br /> nRest := nValue<br /><br /> AEval<span style="color: #000000;">(</span> <span style="color: #000000;">{</span><span style="color: #000000;">200</span>,<span style="color: #000000;">100</span>,<span style="color: #000000;">50</span>,<span style="color: #000000;">20</span>,<span style="color: #000000;">10</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">1</span>,<span style="color: #000000;">0.50</span>,<span style="color: #000000;">0.20</span>,<span style="color: #000000;">0.10</span>,<span style="color: #000000;">0.05</span><span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> |n,i| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> n <= nRest, <span style="color: #000000;">(</span> AAdd<span style="color: #000000;">(</span> aRet, <span style="color: #000000;">{</span> i, n <span style="color: #000000;">}</span> <span style="color: #000000;">)</span>, ;<br /> nRest := <span style="color: #0000ff;">ROUND</span><span style="color: #000000;">(</span> nRest - n, <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #00C800;">nil</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> nRest != <span style="color: #000000;">0.00</span><br /> ? <span style="color: #ff0000;">"not possible. nRest ="</span>, nRest<br /> <span style="color: #00C800;">else</span><br /> XBROWSER aRet SETUP <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">cHeaders</span> := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"COL"</span>, <span style="color: #ff0000;">"EUROS"</span> <span style="color: #000000;">}</span>, ;<br /> oBrw:<span style="color: #000000;">lFooter</span> := .t., oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">cEditPicture</span> := <span style="color: #ff0000;">"999.99"</span>, ;<br /> oBrw:<span style="color: #000000;">aCols</span><span style="color: #000000;">[</span> <span style="color: #000000;">2</span> <span style="color: #000000;">]</span>:<span style="color: #000000;">nFooterType</span> := AGGR_SUM, oBrw:<span style="color: #000000;">MakeTotals</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> aRet<br /><br /> </div>[/code:3kd29t8q]
[url=https://imageshack.com/i/pnWHwzMhp:3kd29t8q][img:3kd29t8q]https://imagizer.imageshack.com/v2/xq90/923/WHwzMh.png[/img:3kd29t8q][/url:3kd29t8q][/quote:3kd29t8q]
it's correct
I explain to you
In the procedure of the amounts the end user goes to select the amount of the bet (Lottery)
[img:3kd29t8q]https://i.postimg.cc/8507B7sJ/prezzi1.png[/img:3kd29t8q]
But when I close this dialog I'm going to save only the totals for each column
and I'm going to enter the totals in the first dialog
[img:3kd29t8q]https://i.postimg.cc/43FcwLSx/prezzi2.png[/img:3kd29t8q]
When I have to print the receipt I have another scheme
[img:3kd29t8q]https://i.postimg.cc/Ssh40q5T/sc.png[/img:3kd29t8q]
then I decompose the totals so you can know the columns and rows
that is, while in the insertion see figure 1 I have the prices vertically, in the printout of the receipt I have them horizontally
therefore, by breaking down the total prices for each group, I can print the pixel in the relative space
here I wanted to explain what I've been trying to do for days
If I try with
abolletta := {391.85,0,0,0,0,0,0,0,0,0,0,0,0}
aImports := Restore_Prices( abolletta)
Function Restore_Prices(aTotali)
local nRiga
local nColonna,nNumero
local nI
local nTotale
local aData:= {}
local aDataX:= {}
For ncolonna= 1 to 13
nTotale:= aTotali[ncolonna]
aData:= {}
[b:3kd29t8q] aData:= ValSplit( nTotale )[/b:3kd29t8q]
For k= 1 to Len(adata)
nriga:=adata[k]
AaDd(aDataX,{nriga,nColonna} )
Next
Next
return aDataX
Now I have this
[img:3kd29t8q]https://i.postimg.cc/zG4bgbby/mm.png[/img:3kd29t8q]
when I go to print i have error
// Imports
#define _MARGIN_TOP_IMPORTS 10.83
#define _MARGIN_LEFT_IMPORTS 2.25
#define _SQUARE_RAD_IMPORTS 0.9
#define _SQUARE_LEFT_IMPORTS 10.2
#define _SQUARE_SIZE_IMPORTS 0.44
#define _SQUARE_DIST_IMPORTS 0.13
#define _XSPACE_IMPORTS 0.57
#define _YSPACE_IMPORTS 0.7
[code=fw:3kd29t8q]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush <span style="color: #0000ff;">COLOR</span> CLR_BLACK<br /><br /><br /> <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> OemToAnsi<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Silvio Print"</span> <span style="color: #000000;">)</span> PREVIEW<br /> <span style="color: #0000ff;">DEFINE</span> PEN oPen WIDTH <span style="color: #000000;">1</span> <span style="color: #0000ff;">OF</span> oPrn<br /> <span style="color: #0000ff;">PAGE</span> <span style="color: #B900B9;">// printing the circles form</span><br /><br /> Print_Imports<span style="color: #000000;">(</span> oPrn, oPen, aImports, oBrush <span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ENDPAGE</span><br /> <span style="color: #0000ff;">ENDPRINT</span><br /><br /><br /><span style="color: #00C800;">Function</span> Print_Imports<span style="color: #000000;">(</span> oPrn, oPen, aImports, oBrush <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> n, o<br /> <span style="color: #00C800;">LOCAL</span> nI<br /> <span style="color: #00C800;">LOCAL</span> nTop, nLeft, nBottom, nRight, aRect<br /> <span style="color: #00C800;">LOCAL</span> nVar := <span style="color: #000000;">1</span><br /> <span style="color: #00C800;">LOCAL</span> nRow, nCol<br /> <span style="color: #00C800;">LOCAL</span> nRadH := _SQUARE_RAD_IMPORTS * <span style="color: #000000;">(</span> <span style="color: #000000;">10</span> * oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / oPRn:<span style="color: #000000;">nHorzSize</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> / <span style="color: #000000;">10</span> <span style="color: #B900B9;">// radius for round boxes in printer resolution horizontal</span><br /> <span style="color: #00C800;">LOCAL</span> nRadV := _SQUARE_RAD_IMPORTS * <span style="color: #000000;">(</span> <span style="color: #000000;">10</span> * oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / oPrn:<span style="color: #000000;">nVertSize</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> / <span style="color: #000000;">10</span> <span style="color: #B900B9;">// radius for round boxes in printer resolution vertical</span><br /> <span style="color: #00C800;">local</span> ncolonna, nRiga<br /><br /><br /> <span style="color: #00C800;">for</span> nI := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> len<span style="color: #000000;">(</span> aImports <span style="color: #000000;">)</span><br /> nColonna := aImports<span style="color: #000000;">[</span> nI <span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><br /> nRiga := aImports<span style="color: #000000;">[</span> nI <span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #000000;">2</span><span style="color: #000000;">]</span><br /><br /> nRow := int<span style="color: #000000;">(</span> nRiga / <span style="color: #000000;">6</span> <span style="color: #000000;">)</span><br /> nCol := <span style="color: #000000;">(</span> nColonna % <span style="color: #000000;">13</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">if</span> nCol == <span style="color: #000000;">0</span><br /> nCol := <span style="color: #000000;">13</span><br /> <span style="color: #00C800;">else</span><br /> ++nRow<br /> <span style="color: #00C800;">endif</span><br /><br /> nTop := _MARGIN_TOP_IMPORTS + .<span style="color: #000000;">1</span> + <span style="color: #000000;">(</span> --nRow * _YSPACE_IMPORTS <span style="color: #000000;">)</span><br /> nLeft := _MARGIN_LEFT_IMPORTS + .<span style="color: #000000;">1</span> + <span style="color: #000000;">(</span> --nCol * _XSPACE_IMPORTS <span style="color: #000000;">)</span><br /> nBottom := nTop - .<span style="color: #000000;">1</span> + _SQUARE_SIZE_IMPORTS<br /> nRight := nLeft - .<span style="color: #000000;">1</span> + _SQUARE_SIZE_IMPORTS<br /><br /> oPrn:<span style="color: #000000;">Cmtr2Pix</span><span style="color: #000000;">(</span> @nTop, @nLeft <span style="color: #000000;">)</span><br /> oPrn:<span style="color: #000000;">Cmtr2Pix</span><span style="color: #000000;">(</span> @nBottom, @nRight <span style="color: #000000;">)</span><br /><br /> aRect := <span style="color: #000000;">{</span> nTop, nLeft , nBottom , nRight <span style="color: #000000;">}</span><br /> oPrn:<span style="color: #000000;">FillRect</span><span style="color: #000000;">(</span> aRect, oBrush <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">next</span><br /><br /><br /> <span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /> </div>[/code:3kd29t8q] |
prices breakdown | Now I made a modification
[code=fw:25xvdln1]<div class="fw" id="{CB}" style="font-family: monospace;"> <span style="color: #00C800;">Function</span> Restore_Prices<span style="color: #000000;">(</span>aTotali<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">local</span> nRiga<br /> <span style="color: #00C800;">local</span> nColonna,nNumero<br /> <span style="color: #00C800;">local</span> nI<br /> <span style="color: #00C800;">local</span> nTotale<br /> <span style="color: #00C800;">local</span> aData:= <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /> <span style="color: #00C800;">local</span> aDataX:= <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">For</span> ncolonna= <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">13</span><br /> nTotale:= aTotali<span style="color: #000000;">[</span>ncolonna<span style="color: #000000;">]</span><br /> aData:= <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #B900B9;">//righe</span><br /><br /> aData:= ValSplit<span style="color: #000000;">(</span> nTotale <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">For</span> k= <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span>adata<span style="color: #000000;">)</span><br /> nriga:=adata<span style="color: #000000;">[</span>k<span style="color: #000000;">]</span><span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><br /> AaDd<span style="color: #000000;">(</span>aDataX,<span style="color: #000000;">{</span>nriga,nColonna<span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Next</span><br /> <span style="color: #00C800;">Next</span><br /> <span style="color: #00C800;">return</span> aDataX<br /> </div>[/code:25xvdln1]
If I use
abolletta := {1.50,1.20,1.20,0,0,0,0,0,0,0,0,0,0}
aImports := Restore_Prices( abolletta)
[img:25xvdln1]https://i.postimg.cc/zftgGtw1/hhhh.png[/img:25xvdln1]
have to print 3 rows but then on Print I have this
[img:25xvdln1]https://i.postimg.cc/NF1FmpXF/h.png[/img:25xvdln1] |
prices breakdown | I corrected the function Now run ok
sample :
local abolletta := {1.50,1.20,1.20,0,0,1.50,1.20} //demo
aImports := Restore_Prices( abolletta)
[b:3g08b85d]result[/b:3g08b85d]
[img:3g08b85d]https://i.postimg.cc/dVJk8R62/right.png[/img:3g08b85d] |
primer registro invisible en xbrowse | Hola a todos
El detalle que tengo es que al abrir un browse me pinta el primer registro en color gris obscuro y en algunos equipos demis clientes es inperceptible.
se soluciona con un click sobre el , pero quisiera que no pase esto...
saludos y gracias |
primer registro invisible en xbrowse | METHOD New( oWnd ) CLASS TXBrowse
::bClrStd := {|| { CLR_BLACK, GetSysColor( COLOR_WINDOW )} }
::bClrSel := {|| { CLR_WHITE, GetSysColor( COLOR_INACTIVECAPTIONTEXT )} } // JR BLACK
::bClrSelFocus := {|| { CLR_WHITE, GetSysColor( COLOR_HIGHLIGHT )} } |
primer registro invisible en xbrowse | voy a probarlo, Gracias |
primer registro invisible en xbrowse | Hola, puedes hacer algo como esto:
Function MYFunction()
local aGradBarSel:= { { 1, RGB(252,232,171) , RGB(248,195, 34) } }
local aGradRowSel:= {{1, RGB(108,125, 184), RGB(241,222,088)}}
oLbx := TXBrowse():New( oDlg )
oLbx:bClrStd := {|| { nRGB( 0, 0, 0), nRGB(255,248,220) } } // colores para lineas normales
oLbx:bClrSel := {|| { nRGB( 0, 0, 0), aGradRowSel } } // para barra de linea selecc cuando el control no tiene el foco
oLbx:bClrSelFocus := { || { CLR_BLACK, aGradBarSel } } // para barra de linea selecc cuando el control tiene el foco
.......
.......
.......
return nil
Espero te sirva |
primer registro invisible en xbrowse | Era Justamente lo que necesitaba..
gracias a todos |
primera compilacion y ejecucion con UEstudio.Ayuda | He bajado un demo de Uestudio. Lo he configurado segun indicaciones del señor Linares y ok. Al compilar y ejecutar mi primer proyecto "hola mundo" me aparece el sigte error en la ejecucion:
'PROGRAM WITH 1ST FUN : TBAR ' was compiled by older version, PCODE version 0 is no longer supported- Please Recompile. |
primera compilacion y ejecucion con UEstudio.Ayuda | Ese no es un error de UEStudio, sino de que estás usando librerías que no estan compiladas con la misma versión que el xharbour que estás usando. |
primera compilacion y ejecucion con UEstudio.Ayuda | Buenas noches,
mira si en UEStudio en Proyecto/Configuración del Proyecto en la pestaña Ajustes, en Modo Generación lo tienes en Release y no en Debug.
Saludos |
primera compilacion y ejecucion con UEstudio.Ayuda | Gracias señor Linares, si se debe al la diferencia de version en las librerias compiladas.
Gracias señor Baxajaun por su interes. |
primera compilacion y ejecucion con UEstudio.Ayuda | Estoy probando la Demo de UES. Segui los pasos indicados por Antonio. Cuando abro el UES y luego el FWH Windows.wiz o cualquier .prg la barra de Proyecto me aparece deshabilitada.. que estoy haciendo mal?
gracias |
primera compilacion y ejecucion con UEstudio.Ayuda | gracias; ya lo solucioné |
primera compilacion y ejecucion con UEstudio.Ayuda | Parece que no estoy dando con las variables; esta es mi configuración
[Variables]
BPATH = D:\BCC55
CPATH = D:\xHARBOUR
COPT = /m /n /o$In $(Warnings) $(Compiler Options)
LOPT = $(Linker Options)
FWH = D:\xHARBOUR\FWH
LINKER = $(BPATH)\BIN\ILINK32
[Environment]
PATH = $(CPATH)\BIN;%PATH%;$(BPATH)\BIN
INCLUDE = $(CPATH)\INCLUDE;$(FWH)\INCLUDE
LIB = $(CPATH)\LIB
OBJ = $(CPATH)\OBJ
No obstante al pulsar sobre el botón Generar me aroja el siguiente error
--------------------Configuración: Prueba - Debug--------------------
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Prueba.c:
Error E2209 Prueba.c 8: Unable to open include file 'hbvmpub.h'
Error E2209 Prueba.c 9: Unable to open include file 'hbpcode.h'
Error E2209 Prueba.c 10: Unable to open include file 'hbinit.h'
Error E2258 Prueba.c 14: Declaration was expected in function HB_FUNC
Error E2258 Prueba.c 15: Declaration was expected in function HB_FUNC
Error E2258 Prueba.c 16: Declaration was expected in function HB_FUNC
Error E2258 Prueba.c 17: Declaration was expected in function HB_FUNC
Error E2258 Prueba.c 22: Declaration was expected in function HB_FUNC
Error E2451 Prueba.c 23: Undefined symbol 'HB_FS_PUBLIC' in function
.... |
primera compilacion y ejecucion con UEstudio.Ayuda | Mario fijate si es por aqui:
[.C]
Out = $In.obj
Cmd0 = bcc32 -c -ID:\XHARBOUR\INCLUDE $In.c
Saludos.
Antonio F. Ortega |
primera compilacion y ejecucion con UEstudio.Ayuda | Efectivamente; ahí había quedado apuntando al path opriginal
muchas gracias |
primera experiencia todo bien pero sin manuales especifico | La verdad es que la primera experiencia con FWPPC ha sido superior a mis expectativas, ha funcionado todo sin problemas y ademas con windows vista, que ya tenia yo mis dudas.
Lo unico que hecho de menos es un manual especifico de FWPPC donde se diga que funciones hay implementadas y un poco la guia del programa
hay ayudas pero son todas de fivewin y de clases de fivewin, pero nada especifico de FWPPC, ¿ donde puedo buscar un manual especifico de FWPPC ?
¿solo buscando en el foro?
Por cierto las ayudas no funcionan en vista , dice que es un sistema de ayudas que ya no soporta windows
saludos y enhorabuena por el sistema
Antonio |
primera experiencia todo bien pero sin manuales especifico | Antonio, yo también he echado de menos un manual especifico para FWPPC. De hecho me he vuelto un poco loco y he dejado un poco de lado mis investigaciones hasta tener un poco más de tiempo libre, ya que creo que hace falta exclusividad durante un par de semanas.
Si encuentras algo en la web que ayude por favor mantenme informado.
Gracias. |
primera experiencia todo bien pero sin manuales especifico | Antonio, Juan Antonio,
Si, es cierto, tenemos pendiente ofrecer un manual totalmente específico de FWPPC. La cuestión es que como muchos usuarios de FWPPC ya conocen FiveWin pues les resulta muy fácil usarlo.
Pero, teneis toda la razón, para quienes vienen de FoxPro, ó de otras plataformas, es un cambio importante, sobre todo si hay que familiarizarse con el lenguaje Clipper tambien.
Actualmente estamos trabajando para ofrecer nueva documentación, el próximo mes, de FiveWin. A continuación aprovecharemos para realizar un manual sólo de FWPPC.
Mientras tanto es importante que reviseis el código fuente de FWPPC. Es muy fácil de entender y además os ayuda a adquirir experiencia en la programación con Harbour (Clipper). |
primtive question | unable to open five.lib is a message appearing to me while building some samples . |
primtive question | Five.lib is a Fivewin 16 bit library.
EMG |
primtive question | My question why it appears to me . My path as far as I know so right especially I am building other samples correctly .
If you mean that is my fw\lib\five.lib is a 32-bit. Can I copy five.lib-16-bit TO fw\lib ( LIB directory ) |
primtive question | Check your compile batch.
EMG |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.