Duda al crear un Reporte en FWH
- Compuin
- Posts: 1250
- Joined: Tue Dec 28, 2010 1:29 pm
- Location: Quebec, Canada
- Has thanked: 7 times
- Been thanked: 3 times
Duda al crear un Reporte en FWH
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
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
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
- Armando Picon
- Posts: 446
- Joined: Mon Dec 26, 2005 9:11 pm
- Location: Lima, Peru
Re: Duda al crear un Reporte en FWH
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
Mis nuevas herramientas
Comunicacion via WhatsApp (+51) 957549 665
Comunicación via Correo: apic1002002 at yahoo dot es; apic1002002@gmail.com
- Compuin
- Posts: 1250
- Joined: Tue Dec 28, 2010 1:29 pm
- Location: Quebec, Canada
- Has thanked: 7 times
- Been thanked: 3 times
Re: Duda al crear un Reporte en FWH
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
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
- Armando Picon
- Posts: 446
- Joined: Mon Dec 26, 2005 9:11 pm
- Location: Lima, Peru
Re: Duda al crear un Reporte en FWH
¿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
Mis nuevas herramientas
Comunicacion via WhatsApp (+51) 957549 665
Comunicación via Correo: apic1002002 at yahoo dot es; apic1002002@gmail.com
- Compuin
- Posts: 1250
- Joined: Tue Dec 28, 2010 1:29 pm
- Location: Quebec, Canada
- Has thanked: 7 times
- Been thanked: 3 times
Re: Duda al crear un Reporte en FWH
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)
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
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
- Armando Picon
- Posts: 446
- Joined: Mon Dec 26, 2005 9:11 pm
- Location: Lima, Peru
Re: Duda al crear un Reporte en FWH
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
Mis nuevas herramientas
Comunicacion via WhatsApp (+51) 957549 665
Comunicación via Correo: apic1002002 at yahoo dot es; apic1002002@gmail.com
- Compuin
- Posts: 1250
- Joined: Tue Dec 28, 2010 1:29 pm
- Location: Quebec, Canada
- Has thanked: 7 times
- Been thanked: 3 times
Re: Duda al crear un Reporte en FWH
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
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
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
- Armando Picon
- Posts: 446
- Joined: Mon Dec 26, 2005 9:11 pm
- Location: Lima, Peru
Re: Duda al crear un Reporte en FWH
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"
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
Mis nuevas herramientas
Comunicacion via WhatsApp (+51) 957549 665
Comunicación via Correo: apic1002002 at yahoo dot es; apic1002002@gmail.com
- jrestojeda
- Posts: 601
- Joined: Wed Jul 04, 2007 3:51 pm
- Location: Buenos Aires - Argentina
Re: Duda al crear un Reporte en FWH
Hola Compuin
Prueba poner el NEW en el apertura de la tabla.
Saludos, Esteban.
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
Buenos Aires - Argentina.
FWH - PellesC - DBF/CDX - ADS - Gloriosos .Bat - MySql - C# .net - FastReport
Skype: jreduojeda
- Compuin
- Posts: 1250
- Joined: Tue Dec 28, 2010 1:29 pm
- Location: Quebec, Canada
- Has thanked: 7 times
- Been thanked: 3 times
Re: Duda al crear un Reporte en FWH
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
======
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
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
- FranciscoA
- Posts: 2163
- Joined: Fri Jul 18, 2008 1:24 am
- Location: Chinandega, Nicaragua, C.A.
Re: Duda al crear un Reporte en FWH
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.
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
Chinandega, Nicaragua.
Fwxh-MySql-TMySql
Re: Duda al crear un Reporte en FWH
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
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
- Armando Picon
- Posts: 446
- Joined: Mon Dec 26, 2005 9:11 pm
- Location: Lima, Peru
Re: Duda al crear un Reporte en FWH
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
// 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
Mis nuevas herramientas
Comunicacion via WhatsApp (+51) 957549 665
Comunicación via Correo: apic1002002 at yahoo dot es; apic1002002@gmail.com
- Compuin
- Posts: 1250
- Joined: Tue Dec 28, 2010 1:29 pm
- Location: Quebec, Canada
- Has thanked: 7 times
- Been thanked: 3 times
Re: Duda al crear un Reporte en FWH
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)
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
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
- Armando Picon
- Posts: 446
- Joined: Mon Dec 26, 2005 9:11 pm
- Location: Lima, Peru
Re: Duda al crear un Reporte en FWH
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
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
Mis nuevas herramientas
Comunicacion via WhatsApp (+51) 957549 665
Comunicación via Correo: apic1002002 at yahoo dot es; apic1002002@gmail.com