Page 1 of 2
Problemas con Rpreview
Posted: Sat Feb 05, 2011 9:37 am
by Pedro
Hola a todos
Al revisar uno de mis programas, en la opción informes al cliente le saco un preview del informe, noto algunos problemas
El primero, que los botones de la versión 10.12 de previsualizar en Word, y salvar en pdf/doc no aparecen.
El segundo, el preview se esconde debajo de los diálogos, pensaba que esto ya estaba solucionado.
El tercero, que al darle a salvar en formato doc da este error :
Error description: Error Word.Application:DOCUMENTS:ADD/0 S_OK: SAVEAS
Args:
[ 1] = C C:\DOCUMENTS AND SETTINGS\PEDRO\MIS DOCUMENTOS\INFORME.doc
[ 2] = N 16
Stack Calls
===========
Called from: source\rtl\win32ole.prg => TOLEAUTO:SAVEAS(0)
Called from: .\source\classes\RPREVIEW.PRG => TPREVIEW:SAVEAS(1576)
Called from: .\source\classes\RPREVIEW.PRG => (b)TPREVIEW:SAVEASMENU(1519)
Called from: .\source\classes\MENU.PRG => TMENU:ACTIVATE(470)
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP(648)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1489)
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:HANDLEEVENT(1450)
Called from: .\source\classes\WINDOW.PRG => _FWH(3408)
Called from: => WINRUN(0)
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE(992)
Called from: c:\PROYEC~1\Brinquis2\SOURCE\geshinic.prg => MAIN(96)
El cuarto, al aumentar el preview, algunas líneas escritas desaparecen,estan pero no se ven, y hace un efecto feo que al disminuir se quede el borde de la ventana del informe cuando se aumentó.
En otro orden de cosas, ¿por qué ahora tengo que ir a todos los browses, hechos con xBrowse, y ponerle la picture a los campos fecha? si no se lo pongo me pinta la fecha como date time.
Re: Problemas con Rpreview
Posted: Sun Feb 06, 2011 4:03 am
by nageswaragunupudi
El primero, que los botones de la versión 10.12 de previsualizar en Word, y salvar en pdf/doc no aparecen.
Prev32.dll and Prev32sp.dll are changed in version 10.12. As clearly explained in the "whatsnew.txt", you need to redistribute the revised dlls along with the application.
El segundo, el preview se esconde debajo de los diálogos, pensaba que esto ya estaba solucionado.
Can you please provide a self-contained example reproducing this behavior?
El tercero, que al darle a salvar en formato doc da este error :
Error description: Error Word.Application:DOCUMENTS:ADD/0 S_OK: SAVEAS
Args:
[ 1] = C C:\DOCUMENTS AND SETTINGS\PEDRO\MIS DOCUMENTOS\INFORME.doc
[ 2] = N 16
Please let us know the version of Word and OS of the PC, where this error is observed. Also plese try this modification in rpreview.prg and let us know if the error still continues.
For lines 1578 and 1579 in the rpreview.prg (10.12)
Code: Select all | Expand
oDoc:SaveAs( cFile, ;
If( nVer >= 12.0 .and. Lower( cFileExt( cFile ) ) == 'doc', 0, 16 ) )
Substitute these lines:
Code: Select all | Expand
if nVer >= 12.0
oDoc:SaveAs( cFile, If( Lower( cFileExt( cFile ) ) == 'doc', 0, 16 ) )
else
oDoc:SaveAs( cFile )
endif
El cuarto, al aumentar el preview, algunas líneas escritas desaparecen,estan pero no se ven, y hace un efecto feo que al disminuir se quede el borde de la ventana del informe cuando se aumentó.
We are unable to reproduce this behavior. Can you please provide a self contained sample code and screen-shot?
En otro orden de cosas, ¿por qué ahora tengo que ir a todos los browses, hechos con xBrowse, y ponerle la picture a los campos fecha? si no se lo pongo me pinta la fecha como date time.
Consistent behavior of XBrowse since DateTime variables were introduced is to display datetime values in DateTime format if
(a) Date value contains time part also or
(b) oCol:cDataType = 'T'
(c) FieldType is 'T'
and to display dates in Date format in all other cases (most common cases).
You may compile and test this small sample code:
Code: Select all | Expand
#include "fivewin.ch"
#include "xbrowse.ch"
function Main()
SET DATE ITALIAN
SET CENTURY ON
XBROWSER "c:\fwh\samples\customer.dbf" COLUMNS "HireDate", "HireDate + .45"
return nil
ScreenShot:

First column is shown in simple dateformat since the values do no contain any datepart and second column is shown in datetime format since these values contain time-part also.
Re: Problemas con Rpreview
Posted: Sun Feb 06, 2011 9:40 am
by Pedro
nageswaragunupudi wrote:Prev32.dll and Prev32sp.dll are changed in version 10.12. As clearly explained in the "whatsnew.txt", you need to redistribute the revised dlls along with the application.
Ok Nao, no me di cuenta que usaba el prev32.dll de la version 9.04
nageswaragunupudi wrote:Can you please provide a self-contained example reproducing this behavior?
En la línea 455 del rpreview sigue estando la clausula MDICHILD, esto hace que el preview se esconda debajo de los dialogos cuando tienes una windowd mdichild debajo del dialogo.
nageswaragunupudi wrote:For lines 1578 and 1579 in the rpreview.prg (10.12)
CODE: SELECT ALL EXPAND VIEW
oDoc:SaveAs( cFile, ;
If( nVer >= 12.0 .and. Lower( cFileExt( cFile ) ) == 'doc', 0, 16 ) )
Substitute these lines:
CODE: SELECT ALL EXPAND VIEW
if nVer >= 12.0
oDoc:SaveAs( cFile, If( Lower( cFileExt( cFile ) ) == 'doc', 0, 16 ) )
else
oDoc:SaveAs( cFile )
endif
Ok hecho y funciona
nageswaragunupudi wrote:Consistent behavior of XBrowse since DateTime variables were introduced is to display datetime values in DateTime format if
(a) Date value contains time part also or
(b) oCol:cDataType = 'T'
(c) FieldType is 'T'
and to display dates in Date format in all other cases (most common cases).
Si pongo un xBrowse
Code: Select all | Expand
oLbx := TXBrowse():New( oWChild )
oLbx:nMarqueeStyle := MARQSTYLE_HIGHLCELL
oLbx:nColDividerStyle := LINESTYLE_BLACK
oLbx:nRowDividerStyle := LINESTYLE_BLACK
oLbx:lColDividerComplete := .t.
oLbx:SetRDD()
for nFor := 1 to len( oLbx:aCols )
oCol := oLbx:aCols[ nFor ]
oCol:nEditType := 0
oCol:blDClickData := {|| CtrPaciente(ID_MOD,oDPacien) }
next
oLbx:l2007 := (.t.)
oLbx:bClrStd := { || If( ( (oLbx:cAlias)->(OrdKeyNo()) % 2 ) == 0, ;
{ CLR_BLACK, RGB( 224, 236, 255 ) }, { CLR_BLACK, RGB( 189, 211, 253 ) } ) }
oLbx:CreateFromCode()
oWChild:oClient := oLbx
En la columnas con fecha, sale con date time, he de poner oLbx:aCols[x]:cEditPicture:= "@D" para que la pinte sin la hora
nageswaragunupudi wrote:El cuarto, al aumentar el preview, algunas líneas escritas desaparecen,estan pero no se ven, y hace un efecto feo que al disminuir se quede el borde de la ventana del informe cuando se aumentó.
We are unable to reproduce this behavior. Can you please provide a self contained sample code and screen-shot?


Re: Problemas con Rpreview
Posted: Fri Feb 11, 2011 4:51 pm
by nageswaragunupudi
Mr. Pedro
Thanks for the screen shots. The problem is clear. Hope this will be fixed soon.
Re: Problemas con Rpreview
Posted: Tue Jul 23, 2013 8:43 pm
by cnavarro
He buscado por el foro y me he encontado este post:
nageswaragunupudi wrote:El cuarto, al aumentar el preview, algunas líneas escritas desaparecen,estan pero no se ven, y hace un efecto feo que al disminuir se quede el borde de la ventana del informe cuando se aumentó.
We are unable to reproduce this behavior. Can you please provide a self contained sample code and screen-shot?

[/quote]
Este mismo efecto me ocurre a mi.
¿Cómo se puede solucionar?
Gracias
Re: Problemas con Rpreview
Posted: Wed Jul 24, 2013 2:18 pm
by Antonio Linares
Pedro, Cristobal,
Tal vez sea porque en la resolución de mi ordenador no se vea la imagen completa, pero no aprecio cual es el error al que os referis. A la derecha debería verse una barra de scroll con la que poder desplazarse por el documento.
En cuanto al uso de una ventana MDICHILD, se hacen estas tres comprobaciones:
1. Que el preview no sea MODAL.
2. Que exista una ventana principal
3. Que esa ventana principal sea MDI.
Se entiende que en un entorno MDI lo lógico es que la previsualización aparezca como MDICHILD, pero si le especificas la cláusula MODAL entonces debería aparecerte por encima de todo. Tu decides si quieres integrarlo como una ventana MDICHILD más ó no permitirle al usuario hacer algo más. Una ventana MDICHILD _no_ se puede situar por encima de un diálogo. Windows no lo permite.
Code: Select all | Expand
if !::oDevice:lPrvModal .and. ::oWndMain != nil .and. ;
Upper( ::oWndMain:ClassName() ) == "TMDIFRAME"
DEFINE WINDOW ::oWnd ;
TITLE cTitle ;
COLOR CLR_BLACK,CLR_LIGHTGRAY ;
ICON oIcon ;
VSCROLL HSCROLL MDICHILD
else
DEFINE WINDOW ::oWnd /*FROM 0, 0 TO 24, 80*/ ;
TITLE cTitle ;
COLOR CLR_BLACK,CLR_LIGHTGRAY ;
ICON oIcon ;
VSCROLL HSCROLL MENU ::BuildMenu()
endif
Re: Problemas con Rpreview
Posted: Wed Jul 24, 2013 3:08 pm
by nageswaragunupudi
In the above screenshots, two red arrows refer to two problems.
Bottom red arrow refers to a problem that a black line (shadow line) is shown longer than the width of the page. This was happening when we zoom and unzoom.
I may inform that this bug was already fixed and we do not have the problem with the present versions.
I have no answer for the problem pointed by the top red arrow. I have never seen it happening with me in my applications.
Re: Problemas con Rpreview
Posted: Wed Jul 24, 2013 3:13 pm
by sysctrl2
Utiliza esta data:
oPrn:lPrvModal := .t.
de esta forma siempre aparecera encima de los oDlg, o oWnd.
saludos.
Re: Problemas con Rpreview
Posted: Wed Jul 24, 2013 4:18 pm
by cnavarro
He usado las imagenes que en su momento puso Pedro en
Febrero del 2011 que encontre en el foro con el mismo problema que yo tenia
Yo uso la version de
FWH 12.03Adjunto imagenes del preview en una mdichild que es lo que necesito
El problema es que cuando hago zoom y unzoom aparecen las lineas verticales y horizontales negras (se ve en la tercera imagen)
Bottom red arrow refers to a problem that a black line (shadow line) is shown longer than the width of the page. This was happening when we zoom and unzoom.
I may inform that this bug was already fixed and we do not have the problem with the present versions.
Si minimizo y maximizo la aplicacion desaparecen las lineas negras
Imaginaba que ese efecto está solucionado. Preguntaba como se solucionó.
Gracias
If I maximize the application I minimize and black lines disappear
I imagined that this effect is solved. He asked as solved.
thanks



Cesar, lo probare
Gracias
Re: Problemas con Rpreview
Posted: Wed Jul 24, 2013 7:10 pm
by lucasdebeltran
Cristóbal,
Se ve muy bonito.
¿Qué estilo usas en la barra de botones?. Se parece mucho al look Windows 8

-
Muchas gracias.
Re: Problemas con Rpreview
Posted: Wed Jul 24, 2013 7:42 pm
by cnavarro
Lucas, si te refieres al preview
Code: Select all | Expand
if IsAppThemed() .and. ! l2007
DEFINE IMAGELIST oImageList SIZE 16, 16
Como ves, ninguno, pero SI se está ejecutando bajo Windows 8, y es el propio codigo de la clase, como sabes.
Pero yo no noto mucha diferencia al ejecutarlo bajo Win 7.
En el resto de la aplicacion, tampoco (todos los controles intento que tengan la apariencia mas "plana" , por ejemplo los xbrowse del menu izdo.)
Adjunto una imagen de un mantenimiento, como ves, el estilo lo mas simple posible, por si te sirve de algo.

Muchas gracias por tus palabras
Saludos
Re: Problemas con Rpreview
Posted: Thu Jul 25, 2013 1:50 pm
by Antonio Linares
Cristobal,
Veo que usas un control outlook a la izquierda y MDI.
Usas la función NoGPF() ó encontrastes una solución ?
Re: Problemas con Rpreview
Posted: Thu Jul 25, 2013 3:44 pm
by cnavarro
Antonio,
No es un control Outlook, son dos xbrowses, uno encima de otro sobre un TPanel
El 95% de la aplicacion se desarrolla sobre ambiente MDI
¿Usas la función NoGPF() ó encontrastes una solución ?
No entiendo a lo que te refieres
Gracias y un saludo
Re: Problemas con Rpreview
Posted: Thu Jul 25, 2013 11:04 pm
by cnavarro
sysctrl2 wrote:Utiliza esta data:
oPrn:lPrvModal := .t.
de esta forma siempre aparecera encima de los oDlg, o oWnd.
saludos.
Gracias Cesar
No soluciona el problema.
Saludos
Re: Problemas con Rpreview
Posted: Fri Jul 26, 2013 8:45 am
by cnavarro
nageswaragunupudi wrote:In the above screenshots, two red arrows refer to two problems.
Bottom red arrow refers to a problem that a black line (shadow line) is shown longer than the width of the page. This was happening when we zoom and unzoom.
I may inform that this bug was already fixed and we do not have the problem with the present versions.
Antonio, Mr. Rao
En qué version se soluciono el problema ?
Gracias
Saludos
Antonio, Mr. Rao
Which version will fix the problem?
thanks
regards