Duda al crear un Reporte en FWH

Duda al crear un Reporte en FWH

Postby Compuin » Thu Feb 17, 2011 8:46 pm

Tomando un reporte ejemplo de la carpeta samples armen uno parecido pero me lanza un error que aparentemente busca crear un Dialogo. Es necesario un Dialogo desde recurso para que funcione un reporte muy basico??

Esto fue el error
Application
===========
Path and name: C:\FWH\test\prueba.exe (32 bits)
Size: 1,506,816 bytes
Time from start: 0 hours 0 mins 1 secs
Error occurred at: 02/17/11, 16:11:55
Error description: Error FiveWin/3 Cannot create Dialog Box:
Resource: PREVIEW_PROC

Aca el codigo de mi reporte

STATIC FUNCTION RBancos()

USE BANCO

REPORT oRpt PREVIEW
COLUMN TITLE "Codigo" DATA BANCO->BCO_CODIGO
COLUMN TITLE "Nombre" DATA BANCO->BCO_DESCRI
END REPORT

ACTIVATE REPORT oRpt

USE

RETURN nil

Atento a sus comentarios
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1213
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Duda al crear un Reporte en FWH

Postby Armando Picon » Thu Feb 17, 2011 9:51 pm

Verifica la existencia del archivo Preview.dll en la carpeta donde esta tu aplicación.
FWH + BCC582 + WorkShop 4.5 + Resource Hacker + Mingw
Mis nuevas herramientas
Comunicacion via WhatsApp (+51) 957549 665
Comunicación via Correo: apic1002002 at yahoo dot es; apic1002002@gmail.com
User avatar
Armando Picon
 
Posts: 446
Joined: Mon Dec 26, 2005 9:11 pm
Location: Lima, Peru

Re: Duda al crear un Reporte en FWH

Postby Compuin » Thu Feb 17, 2011 9:53 pm

Ya lo verifique...de hecho coloque una copia del mismo alli y sigue presentando el error
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1213
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Duda al crear un Reporte en FWH

Postby Armando Picon » Thu Feb 17, 2011 10:01 pm

¿Es el archivo prev32.dll?

Compuin wrote:Ya lo verifique...de hecho coloque una copia del mismo alli y sigue presentando el error
FWH + BCC582 + WorkShop 4.5 + Resource Hacker + Mingw
Mis nuevas herramientas
Comunicacion via WhatsApp (+51) 957549 665
Comunicación via Correo: apic1002002 at yahoo dot es; apic1002002@gmail.com
User avatar
Armando Picon
 
Posts: 446
Joined: Mon Dec 26, 2005 9:11 pm
Location: Lima, Peru

Re: Duda al crear un Reporte en FWH

Postby Compuin » Thu Feb 17, 2011 10:11 pm

Estaba usando era el archivo preview.dll. Ya puse el archivo prev32.dll y cargo el formato de reporte pero no muestra registros y la DBF los tiene, arrojando lo siguiente:

Application
===========
Path and name: C:\FWH\test\prueba.exe (32 bits)
Size: 1,506,816 bytes
Time from start: 0 hours 0 mins 1 secs
Error occurred at: 02/17/11, 17:39:48
Error description: Error DBCMD/2001 Workarea not in use: DBSKIPPER

Stack Calls
===========
Called from: => DBSKIPPER(0)
Called from: XBROWSE.PRG => (b)TXBROWSE:SETRDD(0)
Called from: XBROWSE.PRG => TXBROWSE:PAINT(0)
Called from: XBROWSE.PRG => TXBROWSE:DISPLAY(0)
Called from: CONTROL.PRG => TXBROWSE:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TWINDOW:ACTIVATE(0)
Called from: prueba.prg => MAIN(66)
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1213
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Duda al crear un Reporte en FWH

Postby Armando Picon » Thu Feb 17, 2011 10:16 pm

Prueba a definir una variable local oRpt, que no lo veo en el codigo que mostraste en el mensaje inicial.
FWH + BCC582 + WorkShop 4.5 + Resource Hacker + Mingw
Mis nuevas herramientas
Comunicacion via WhatsApp (+51) 957549 665
Comunicación via Correo: apic1002002 at yahoo dot es; apic1002002@gmail.com
User avatar
Armando Picon
 
Posts: 446
Joined: Mon Dec 26, 2005 9:11 pm
Location: Lima, Peru

Re: Duda al crear un Reporte en FWH

Postby Compuin » Thu Feb 17, 2011 10:37 pm

La puse local, tampoco funciono. Ya de hecho la variable estaba como STATIC al inicio del PRG.

Aca el codigo

STATIC FUNCTION RBancos()
LOCAL oRpt

USE BANCO

BANCO->(ORDSETFOCUS(1))

BANCO->(DBGOTOP())

REPORT oRpt PREVIEW
COLUMN TITLE "Codigo" DATA BANCO->BCO_CODIGO
COLUMN TITLE "Nombre" DATA BANCO->BCO_DESCRI
END REPORT

ACTIVATE REPORT oRpt

USE

RETURN nil
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1213
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Duda al crear un Reporte en FWH

Postby Armando Picon » Thu Feb 17, 2011 10:46 pm

Amigo

El mensaje que estás recibiendo indica que tu base no está activada en el area de trabajo:

Error description: Error DBCMD/2001 Workarea not in use: DBSKIPPER

Prueba a inactivar la cláusula USE para que permanezca abierta. De esa manera se va ha descartar poco a poco cada posible falla lógica.

Adicionalmente; al inicio del programa antes de la funcion coloca:
#include "Report.ch"
FWH + BCC582 + WorkShop 4.5 + Resource Hacker + Mingw
Mis nuevas herramientas
Comunicacion via WhatsApp (+51) 957549 665
Comunicación via Correo: apic1002002 at yahoo dot es; apic1002002@gmail.com
User avatar
Armando Picon
 
Posts: 446
Joined: Mon Dec 26, 2005 9:11 pm
Location: Lima, Peru

Re: Duda al crear un Reporte en FWH

Postby jrestojeda » Fri Feb 18, 2011 1:00 am

Hola Compuin
Prueba poner el NEW en el apertura de la tabla.

Saludos, Esteban.
Ojeda Esteban Eduardo.
Buenos Aires - Argentina.
FWH - PellesC - DBF/CDX - ADS - Gloriosos .Bat - MySql - C# .net - FastReport
Skype: jreduojeda
User avatar
jrestojeda
 
Posts: 584
Joined: Wed Jul 04, 2007 3:51 pm
Location: Buenos Aires - Argentina

Re: Duda al crear un Reporte en FWH

Postby Compuin » Fri Feb 18, 2011 1:14 am

Con ambas recomendaciones recibo este error

Application
===========
Path and name: C:\FWH\test\prueba.exe (32 bits)
Size: 1,506,816 bytes
Time from start: 0 hours 0 mins 4 secs
Error occurred at: 02/17/11, 20:44:15
Error description: (DOS Error 2) DBFCDX/1001 Open error: BANCO.dbf

Stack Calls
===========
Called from: => DBUSEAREA(0)
Called from: prueba.prg => RBANCOS(146)
Called from: prueba.prg => (b)MAIN(26)
Called from: BTNBMP.PRG => TBTNBMP:CLICK(0)
Called from: BTNBMP.PRG => TBTNBMP:LBUTTONUP(0)
Called from: => TWINDOW:HANDLEEVENT(0)
Called from: CONTROL.PRG => TCONTROL:HANDLEEVENT(0)
Called from: BTNBMP.PRG => TBTNBMP:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: WINDOW.PRG => TWINDOW:ACTIVATE(0)
Called from: prueba.prg => MAIN(66)

System
======
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1213
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Duda al crear un Reporte en FWH

Postby FranciscoA » Fri Feb 18, 2011 1:34 am

Hola, quizás esta información te ayude:

DBFNDX/1001 Open error (.dbf)

Explanation: The specified database (.dbf) file could not be
opened.

Action:

1. Check to make sure that the specified file exists. If the file is
not in the directory where the application runs, use SET DEFAULT or
SET PATH to make the file accessible, or specify the full path name
where the file can be found.

2. In a network environment, make sure the application has the necessary
rights to access the file. If the file is available only for read
access, use the READONLY clause on the USE command.

CA-Clipper's default error handler (Errorsys.prg) will set NETERR()
to true (.T.) and will ask DBFNDX to default if the error was due to
a sharing violation on the network.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2112
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: Duda al crear un Reporte en FWH

Postby artu01 » Fri Feb 18, 2011 2:44 am

hola compuin
1. Haz intentado abrir la tabla banco.dbf desde afuera usando DBU, lo abre?
2. No habras modificado la estructura de la tabla banco con Dbu?

Saludos
fwh 17.12, harbour 3.2.0, pelles C, bcc7, Ms-Sql
artu01
 
Posts: 397
Joined: Fri May 11, 2007 8:20 pm
Location: Lima

Re: Duda al crear un Reporte en FWH

Postby Armando Picon » Fri Feb 18, 2011 4:02 am

Este ejemplo es básico en el paquete de FWH (esta probado totalmente). Comparalo con tu codigo y efectua los ajustes adecuados. Ojo---> Utiliza la base de datos CUSTOMER.DBF que debe encontrarse en la carpeta samples de tu versión.

// Testing FiveWin built-in report engine and print preview

#include "FiveWin.ch"
#include "Report.ch"

static oWnd

function Main()

local oBar, oCursorHand

DEFINE WINDOW oWnd ;
TITLE "Testing FiveWin Report-Engine and Print-Preview" ;
MENU BuildMenu()

DEFINE BUTTONBAR oBar _3D SIZE 26, 27 OF oWnd

DEFINE BUTTON OF oBar FLAT TOOLTIP "Generate report" ;
ACTION DoReport() RESOURCE "Report"

DEFINE BUTTON OF oBar FLAT GROUP TOOLTIP "Exit" ;
ACTION oWnd:End() RESOURCE "Exit"

DEFINE CURSOR oCursorHand HAND

AEval( oBar:aControls, { | o | o:oCursor := oCursorHand } )

DEFINE MESSAGE BAR OF oWnd TITLE FWCOPYRIGHT ;
NOINSET DATE CLOCK KEYBOARD

ACTIVATE WINDOW oWnd ;
VALID MsgYesNo( "Want to exit ?" )

return nil

function BuildMenu()

local oMenu

MENU oMenu
MENUITEM "&Generate Report" ACTION DoReport() ;
MESSAGE "Open customers database and generate a report"

MENUITEM "&Exit" ACTION oWnd:End() ;
MESSAGE "Terminate the application and exit"
ENDMENU

return oMenu

function DoReport()

local oRpt

USE Customer

REPORT oRpt PREVIEW
COLUMN TITLE "First" DATA Customer->First
COLUMN TITLE "Last" DATA Customer->Last
COLUMN TITLE "State" DATA Customer->State
END REPORT

ACTIVATE REPORT oRpt

USE

return nil
FWH + BCC582 + WorkShop 4.5 + Resource Hacker + Mingw
Mis nuevas herramientas
Comunicacion via WhatsApp (+51) 957549 665
Comunicación via Correo: apic1002002 at yahoo dot es; apic1002002@gmail.com
User avatar
Armando Picon
 
Posts: 446
Joined: Mon Dec 26, 2005 9:11 pm
Location: Lima, Peru

Re: Duda al crear un Reporte en FWH

Postby Compuin » Fri Feb 18, 2011 1:14 pm

Tome el ejemplo basico que me enviastes, puse la dbf curstomer y tampoco funciona. Arrojo lo siguiente:

Application
===========
Path and name: C:\FWH\test\prueba.exe (32 bits)
Size: 1,506,816 bytes
Time from start: 0 hours 0 mins 1 secs
Error occurred at: 02/18/11, 08:43:08
Error description: Error DBCMD/2001 Workarea not in use: DBSKIPPER

Stack Calls
===========
Called from: => DBSKIPPER(0)
Called from: XBROWSE.PRG => (b)TXBROWSE:SETRDD(0)
Called from: XBROWSE.PRG => TXBROWSE:PAINT(0)
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1213
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Duda al crear un Reporte en FWH

Postby Armando Picon » Fri Feb 18, 2011 6:59 pm

Amigo

Los problemas que estas teniendo mas parecen del xBrowse que de la clase Report. He bajado la versión de FWH6.12 desde el site de FW, y compile el mismo ejemplo que te envie. Y funciona bien... Eso me hace suponer que el problema puede ser en el xBrowse.

Espero que otros amigos te orienten acerca de esa clase, porque yo no lo uso hasta el momento. ¿Puedes poner el codigo completo, para revisarlo?

Saludos

Armando
FWH + BCC582 + WorkShop 4.5 + Resource Hacker + Mingw
Mis nuevas herramientas
Comunicacion via WhatsApp (+51) 957549 665
Comunicación via Correo: apic1002002 at yahoo dot es; apic1002002@gmail.com
User avatar
Armando Picon
 
Posts: 446
Joined: Mon Dec 26, 2005 9:11 pm
Location: Lima, Peru

Next

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 36 guests