Favor Ayuda oara Imprimir

Favor Ayuda oara Imprimir

Postby Miguel Rivera » Mon Oct 02, 2006 9:43 pm

Hola Amigos, soy nuevo en Fivewin, y tengo un problema super grande, como nuestro querido Clipper, necesita un ambiente windows, es logico llegar aqui, tengo five win ver 2.4 y blinker 5.1, he tenido que hacer un programa chico pero muy importante, el cual tiene como funcion mostrar por pantalla e imprimir informes de examenes medicos.

Yo puedo mostrar la informacion por pantalla con un browse, puedo imprimir con una impresora okidata 320 o una CANNON BJ 200 o 250 de tinta, me previsualiza en pantalla y luego imprimo, mi sorpresa y problema es que al tratar de imprimir en una HP 692, 690 o cualquier impresora de la linea EPSON C43, C80 u otras, el sistema se cae arrojando el error que te describo mas abajo, pero con las impresoras antes mensionadas, imprime sin ningun problema.

Estoy tan complicado porque no logro dar con la solucion, se que es un problema de memoria, lo he probado en diferentes PC P. IV 1,6 GH, 128 RAM intel, otro PC 2,4 GH, 256 RAM y otros con win 98 o WX, y siempre tengo el mismo resultado. Necesito que por favor me orientes, te envio el programa y el error.

Enormemente agradecido, se despide,

Miguel Rivera.

****** ERROR ***

FIVEWIN provocó un error de protección general
en el módulo MENU3.EXE de 000a:000003f9.
Registros:
EAX=000000a7 CS=43b7 EIP=000003f9 EFLGS=00000216
EBX=0147029c CS=563f ESP=0000635a EBP=00006362
ECX=00000000 DS=563f ESI=00024493 FS=0000
EDX=00003b4f ES=4337 EDI=00024337 GS=0000
Bytes en CS:EIP
,02x,02x,02x,02x,02x,02x,02x,02x,02x,02x,02x,02x,02x,02x,02x
Volcado de pila:
,08x,08x,08x,08x,08x,08x,08x,08x,08x,08x,08x,08x,08x,08x,08x


****** LNK

BLINKER executable compress
blinker INCREMENTAL OFF
BLINKER CLIPPER SYMBOL OFF
BLINKER SEGMENT THRESHOLD 65500
STACK 7068
BLINKER PROCEDURE DEPTH 70

MAP A,S

DEFBEGIN
name FiveWin
description 'Clipper for Windows library'
exetype Windows 3.1
code preload moveable discardable
data preload moveable
stacksize 10000
heapsize 8500
segment 'PLANKTON_TEXT' nondiscardable
segment 'EXTEND_TEXT' nondiscardable
segment 'OM_TEXT' nondiscardable
segment 'OSMEM_TEXT' nondiscardable
segment 'SORTOF_TEXT' nondiscardable
segment 'STACK_TEXT' nondiscardable
DEFEND
beginarea
File Menu3
File TcBrowse
File TcColumn
File Rayos
endarea

Lib c:\fw24\lib\five
Lib c:\fw24\lib\fivec
Lib c:\fw24\lib\objects
Lib c:\fw24\lib\winapi
Lib c:\lib\dbfCDX



***** RMK


compile = c:\clipper5\bin\clipper $< /i /n /d
link = c:\bl51\bin\blinker;C:\util\obj


.Prg.Obj:
$(compile)

Menu3.Obj : Menu3.Prg
TcBrowse.Obj : TcBrowse.Prg
TcColumn.Obj : TcColumn.Prg
Rayos.obj : Rayos.Prg
Ecos.obj : Ecos.prg
Scanner.obj : Scanner.prg

menu3.Exe : menu3.Obj TcBrowse.obj TcColumn.obj Rayos.obj\
Scanner.obj Ecos.obj
\bl51\bin\Blinker @compi1.Lnk


***** PROGRAMA PRG

#include "FiveWin.ch"
#Include "TcBrowse.ch"
#include "report.ch"
#Include "Font.Ch"

FUNCTION Scanner()
Local Dialog,oDlg,oNom,oFec
Local odbginfsc,odbdinfsc
bBusca=1
oFolio:=0
cFolio:=0

sele 1
Use Geinfsc Shared
DATABASE oDbGinfsc

Set inde to Geinfsc
sele 2
Use Deinfsc Shared
DATABASE oDbDinfsc


Set inde to Deinfsc
if !file("pasosca.dbf")
Copy struc to pasosca
endif

sele 3
Use Detarayo Shared

Set inde to Detarayo

Sele 4
Use Profesio Shared

Set inde to Profesio

Sele 5
Use pasosca Exclusi

Define Dialog oDlg ResName "Pide_nro_bono" Title "Datos del Paciente"
Redefine Get oFolio Var cFolio Id 102 Of oDlg Color "w+/b*" Update Picture "@9999999999"
Redefine Button Id 201 Of oDlg ;
Action (bBusca:=1,Muestra_datos(),lGrabar:=.f.,cFolio:=0)
Redefine Button Id 101 Of oDlg ;
Action (bBusca:=0,Busca_fol(),lGrabar:=.f.)

Redefine Button Id 150 Of oDlg ;
Action (Dbcloseall(),oDlg:END())

Activate Dialog oDlg Centered

RETURN nil

Static FUNCTION Muestra_datos()
Local oDlg,Dialog,oCod,cCod
if bBusca=1
Sele a
DbSetorder(1)
seek cFolio
lSalida := .T.
lGrabar:=.t.
if eof()
MsgInfo("Nº de Ingreso no Existe")
lSalida := .F.
lGrabar:=.f.
Return
Endif
else
cFolio=a->Nro_bon
Endif
sele c
seek cFolio
cCod=""
Do while (Fol_ray=cFolio).and.!eof()
cCod=cCod+cod_ara+" "
Dbskip()
Enddo
Sele a

Define Dialog oDlg ResName "Pide_paci" Title "Datos del Paciente"
Redefine Say oFolio Prompt a->nro_bon Id 102 Of oDlg Color "w+/b*"
REDEFINE Say oNom Prompt OemToAnsi(a->nom_pac) ID 103 OF oDlg Color "w+/b*"
REDEFINE Say oFec Prompt a->fec_inf ID 104 OF oDlg Color "w+/b*"
REDEFINE Say oCod Prompt cCod ID 105 OF oDlg Color "w+/b*"
Redefine Button Id 210 Of oDlg ;
Action Imprime()

Redefine Button Id 190 Of oDlg ;
Action Muestra_inf()


Redefine Button Id 150 Of oDlg ;
Action (oDlg:END())


Activate Dialog oDlg Centered

cFolio:=0
oFolio:=0

Return


Static Function Imprim()
LOCAL oFont,oFont1,oFont2
Private oReport

Sele d
DbSeek(a->med_rad)
Sele b
Set inde to Deinfsc
DbSeek(cFolio)
if eof()
MsgInfo("No Existe Registro "+str(cFolio,10)+" de Ingreso no Existe")
Return
endif
//-17
DEFINE FONT oFont NAME "Courier New" SIZE 0,-15

REPORT oReport Title " "," "," ",spac(32)+" Santiago "+spac(8)+subs(a->fec_inf,1,2)+spac(11)+aMeses[val(subs(a->fec_inf,4,2))]+space(7)+subs(a->fec_inf,7,4)," ",;
"Sr(a)DR(a) : "+OemToAnsi(trim(a->med_sol))," "," ","Presente ",OemToAnsi(trim(a->tip_exa))," "," ",OemToAnsi(trim(a->nom_pac))," "," "," "," "," ";
FONT oFont;
PREVIEW

COLUMN DATA spac(6)+OemToAnsi(b->Cod_det) SIZE 71

END REPORT

oReport:nTitleUpLine := RPT_NOLINE
oReport:nTitleDnLine := RPT_NOLINE
oReport:Margin(.15,RPT_LEFT,RPT_INCHES)
oReport:Margin(.25,RPT_TOP,RPT_INCHES)
oReport:Margin(.25,RPT_BOTTOM,RPT_INCHES)

ACTIVATE Report oReport While b->Nro_bon=cFolio.and.!eof() ON END Finsc(oReport)

oFont:End()

Sele b
Seek cFolio

Return


Static FUNCTION Busca_fol()
local oDlgPa
local oLbx1,oFont
cFolio:=0
oFolio:=0
Sele a
go bott
aa=nro_bon-10
Dbseek(aa)

Define Dialog oDlgPa ResName "Listado_paci" Title "Paciente Ingresados"

Redefine Browse oLbx1 Grid Id 110 Of oDlgPa;
On DblClick (bBusca:=0,Muestra_datos(),oLbx1:Refresh(), oLbx1:SetFocus())

oLbx1:oFont := TFont():New( "MS Sans Serif", 0, -14,, .T. )
oLbx1:nFreeze := 3

oLbx1:nClrBackFocus := RGB(48,207,100)
oLbx1:bKeyChar := {| nKey, nFlags | iIf(nKey == 13,Muestra_datos(),)}

Add Column To Browse oLbx1 Data a->Nro_bon ;
Head "Nro. Bono" Width 70
Add Column To Browse oLbx1 Data OemToAnsi(a->Nom_pac) ;
Head "Nombre del Paciente" Width 350
Add Column To Browse oLbx1 Data a->Fec_inf ;
Head "Fecha de Informe" Width 450

Define Column oCol Head "" Size 1
oLbx1:AddColumn(oCol)


oLbx1:SetFocus()

Redefine Button Id 150 Of oDlgpa ;
Action (oDlgpa:END())

Activate Dialog oDlgPa Centered

Sele a
DbSetorder(1)

Return

Static FUNCTION Muestra_Inf()
local oDlgDeta
local oLbx1,oFont
Local Deta_inf[200]
cFolio:=a->Nro_bon
oFolio:=0
Sele b
set inde to deinfsc
Dbseek(a->nro_bon)
Do while (nro_bon=a->nro_bon).and.!eof()
sele e
Appen Blank
Repl nro_lin with b->nro_lin,cod_det with b->cod_det
Dbcommit()
Dbunlock()
sele b
Dbskip()
Enddo


Sele e
Dbgotop()
Define Dialog oDlgDeta ResName "Detalle_info"

REDEFINE Say oNom Prompt OemToAnsi(a->nom_pac) ID 103 OF oDlgDeta Color "w+/b*"

Redefine Browse oLbx1 Grid Id 106 Of oDlgDeta;
On DblClick (oLbx1:Refresh(), oLbx1:SetFocus())

oLbx1:oFont := TFont():New( "MS Sans Serif", 0, -15,,.T. )
oLbx1:nFreeze := 1

oLbx1:nClrBackFocus := RGB(48,207,100)

oLbx1:bKeyChar := {| nKey, nFlags | iIf(nKey == 13,Imprime(),)}
Add Column To Browse oLbx1 Data OemToAnsi(e->Cod_Det);
Head "" Width 580 Tag OemToAnsi("e->Cod_Det")

Define Column oCol Head "" Size 1
oLbx1:AddColumn(oCol)


oLbx1:SetFocus()

Redefine Button Id 210 Of oDlgDeta ;
Action (Imprime(),oDlgDeta:END())

Redefine Button Id 150 Of oDlgDeta ;
Action (oDlgDeta:END())


Activate Dialog oDlgDeta Centered

Sele e

Return


Static Function Imprime()
Local oPrint, oFont1, oFont2, cTipo, oFont3, oFont4, oPen, oFont5
Local nFila, nColumna, nVertical, nHorizontal
Print oPrint From User Preview
Define Font oFont1 Name "Arial" Size 0,14 Of oPrint
Define Font oFont2 Name "Arial" Size 0,18 Of oPrint
Define Font oFont5 Name "Arial" Size 0,16 Of oPrint
Define Font oFont3 Name "Arial" Size 0,12 Of oPrint Bold UnderLine
Define Font oFont4 Name "Arial" Size 0,24 Of oPrint Bold Italic
Define Pen oPen Style 0 width 5
nVertical := oPrint:nVertRes()
nHorizontal := oPrint:nHorzRes()
nFila := Round(nVertical/60,0)
nColumna := Round(nHorizontal/80,0)
Fil=nFila
col=nColumna
Page
oPrint:Say(nFila*5,nColumna*40," Santiago "+spac(8)+subs(a->fec_inf,1,2)+spac(11)+aMeses[val(subs(a->fec_inf,4,2))]+space(7);
+subs(a->fec_inf,7,4),oFont1)
oPrint:Say(nFila*7,nColumna*20,"Sr(a)DR(a) : "+OemToAnsi(trim(a->med_sol)),oFont2)
oPrint:Say(nFila*9,nColumna*20,"Presente ",oFont2)
oPrint:Say(nFila*11,nColumna*20,OemToAnsi(trim(a->tip_exa)),oFont2)
oPrint:Say(nFila*13,nColumna*20,OemToAnsi(trim(a->nom_pac)),oFont2)
nAvance := 15.9
Sele b
Set inde to Deinfsc
DbSeek(cFolio)
nPosicion=15.5
nLinea=0
Do While (nro_bon=cFolio).and.!Eof()
nLinea=nLinea+1
nPosicion := nPosicion+1.4
oPrint:Say(nFila*nPosicion,nColumna*10,OemToAnsi(b->cod_det),oFont5)
DbSkip()
if nLinea>29
nFila:=fil
nPosicion:=5
nColumna:=col
nLinea:=0
Endpage
Page
endif
EndDo
nPosocion := 35.7
EndPage
EndPrint
oFont1:End()
oFont2:End()
oFont3:End()
oFont4:End()
oFont5:End()
Return(Nil)
Miguel Rivera
 
Posts: 117
Joined: Sun Oct 01, 2006 11:39 pm

Return to FiveWin para CA-Clipper

Who is online

Users browsing this forum: No registered users and 1 guest