Date:  02/21/2007 09:21:58 PM Msg ID:  003319
From:  FoxWeb Support Thread:  003317
Subject:  Re: Help with REPORT FORM
Does your code work from a regular VFP program?  If not, then you need to solve that part first.
 
Are you running FoxWeb as a service?  If yes, have you tried running as a regular application?  The problem may be the printer definitions for the service user. 
FoxWeb Support Team
support@foxweb.com email
Sent by FoxWeb Support on 02/21/2007 10:27:16 AM:
Hello all:
I'm trying to print a report to the server's printer using the REPORT FORM command, but it doesn't work. I create a table in the same folder where the foxweb scripts reside, and also the frx file is located there.
My server runs Windows 2003 server and I have installed three printers:
1 HP LaserJet 1200 marked as Default printer (I want the report to print here)
1 Microsoft Office Document Image Writer
1 Fax
Well, when I execute the script, none is printed but I can see the number of documents near the Fax icon is increased!!!
Please, could you tell me if anyone has experienced something like this?
I attach my code for reference (this is called from an fwx script):

PARAMETERS lcNumparte

LOCAL lnNumparte

lnNumparte = VAL(lcNumparte)

IF FILE("Partpend.dbf")

DELETE FILE Partpend.*

ENDIF

 

IF FILE
("&wcEspPath.\CENTROS.DBF")

USE &wcEspPath.\CENTROS.DBF IN 0 SHARED ALIAS CENTROS

ENDIF

SELECT
Partes.Centro_id, Partes.Prioridad, Partes.Especialid, Partes.Edificio, Partes.Departam, Partes.parte_num, Partes.tipo_parte, Partes.Mantenedor,;

Partes.fecha_part, Partes.persona, Partes.avería, Partes.técnico1, Partes.técnico2, Partes.Observa, Partes.Trabajo, Partes.totalhoras, Partes.Totalhdes, ;

Partes.Técnico3, Partes.Técnico4, Centros.descentro, Centros.telefono, Centros.nif, Partes.Facturar, Partes.Cliente_id, Partes.Referencia, ;

Centros.direccion, Centros.ciudad, Centros.delegacion, Centros.Deleg_id, Centros.código_postal, Centros.ruta_id, Partes.horas_tec1, Partes.Hdes_tec1, Partes.horas_tec2, Partes.Hdes_tec2, Partes.horas_tec3, Partes.Hdes_tec3, Partes.horas_tec4, Partes.Hdes_tec4, Partes.Fecha_term, ;

Centros.provincia, Centros.tipocontrato, Centros.contrato_num;

FROM partes, centros;

INTO TABLE partpend;

WHERE Partes.centro_id = Centros.centro_id;

HAVING Partes.Parte_num = lnNumparte;

ORDER BY Partes.parte_num

*-- Añadir campos a partpend para evitar errores

ALTER TABLE Partpend ADD Refecruz c(30)

ALTER TABLE Partpend ADD Clave c(5)

ALTER TABLE Partpend ADD numero n(3)

ALTER TABLE Partpend ADD orden n(3)

ALTER TABLE Partpend ADD inicial n(3)

ALTER TABLE Partpend ADD final n(3)

ALTER TABLE Partpend ADD calibra l(1)

USE IN Partes

USE IN Centros

SELECT PARTPEND

GO TOP

IF FILE
("&wcEspPath.\EMPRESA.DBF")

USE &wcEspPath.\EMPRESA.DBF IN 0 SHARED ALIAS EMPRESA

ENDIF

SET PRINTER TO "HPLaserJ"

REPORT FORM ParteCl.FRX NOCONSOLE TO PRINTER NOWAIT

USE IN Empresa

USE IN Partpend

RETURN

The table partpend is always well generated, but printing doesn't happen

Thanks in advance 

Carlos