Progress - Codigo de Barra

 
Vista:

Codigo de Barra

Publicado por Mariela (1 intervención) el 30/09/2005 00:36:23
Agradeceré me indiquen cómo imprimir un código de barras en progress 8.3, para XP.
En Windows\Fonts tengo una Font llamada "BarCode 128 Internal (TrueType)", y querría utilizarla.

Gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Codigo de Barra

Publicado por Gustavo Ferrer (115 intervenciones) el 06/10/2005 19:22:57
Si puedes explicarte mejor te lo agradezco, de todas formas si las impresiones son eventuales, puedes usar los programas de ejemplo de progress para excel y enviar el codigo que quieras imprimir para excel diciendole que use esa fuente, el problema se presenta cuando quieras llevarte el programa para otra maquina que no tenga esa fuente, y el mantenimiento se complica, no es nada facil pero se puede...

Este es el ejemplo de progress para excel..

/*********************************************************************
* Copyright (C) 2000 by Progress Software Corporation ("PSC"), *
* 14 Oak Park, Bedford, MA 01730, and other contributors as listed *
* below. All Rights Reserved. *
* *
* The Initial Developer of the Original Code is PSC. The Original *
* Code is Progress IDE code released to open source December 1, 2000.*
* *
* The contents of this file are subject to the Possenet Public *
* License Version 1.0 (the "License"); you may not use this file *
* except in compliance with the License. A copy of the License is *
* available as of the date of this notice at *
* http://www.possenet.org/license.html *
* *
* Software distributed under the License is distributed on an "AS IS"*
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. You*
* should refer to the License for the specific language governing *
* rights and limitations under the License. *
* *
* Contributors: *
* *
*********************************************************************/
/*
* This sample extracts data from a Progress database
* and graphs the information using the Automation Objects
* from the Excel server in Office 95/97.
* You must connect to a sports database before running this.
* This sample program leaves Excel open. You should close it manually
* when the program completes.
*/

DEFINE VARIABLE chExcelApplication AS COM-HANDLE.
DEFINE VARIABLE chWorkbook AS COM-HANDLE.
DEFINE VARIABLE chWorksheet AS COM-HANDLE.
DEFINE VARIABLE chChart AS COM-HANDLE.
DEFINE VARIABLE chWorksheetRange AS COM-HANDLE.
DEFINE VARIABLE iCount AS INTEGER.
DEFINE VARIABLE iIndex AS INTEGER.
DEFINE VARIABLE iTotalNumberOfOrders AS INTEGER.
DEFINE VARIABLE iMonth AS INTEGER.
DEFINE VARIABLE dAnnualQuota AS DECIMAL.
DEFINE VARIABLE dTotalSalesAmount AS DECIMAL.
DEFINE VARIABLE iColumn AS INTEGER INITIAL 1.
DEFINE VARIABLE cColumn AS CHARACTER.
DEFINE VARIABLE cRange AS CHARACTER.

/* create a new Excel Application object */
CREATE "Excel.Application" chExcelApplication.

/* launch Excel so it is visible to the user */
chExcelApplication:Visible = TRUE.

/* create a new Workbook */
chWorkbook = chExcelApplication:Workbooks:Add().

/* get the active Worksheet */
chWorkSheet = chExcelApplication:Sheets:Item(1).

/* set the column names for the Worksheet */
chWorkSheet:Columns("A"):ColumnWidth = 18.
chWorkSheet:Columns("B"):ColumnWidth = 12.
chWorkSheet:Columns("C"):ColumnWidth = 12.
chWorkSheet:Range("A1:C1"):Font:Bold = TRUE.
chWorkSheet:Range("A1"):Value = "SalesRep".
chWorkSheet:Range("B1"):Value = "Total Sales".
chWorkSheet:Range("C1"):Value = "Annual Quota".

/* Iterate through the salesrep table and populate
the Worksheet appropriately */
FOR EACH salesrep:
dAnnualQuota = 0.
iTotalNumberOfOrders = 0.
dTotalSalesAmount = 0.
iColumn = iColumn + 1.
FOR EACH order OF salesrep:
iTotalNumberOfOrders = iTotalNumberOfOrders + 1.
FIND invoice WHERE invoice.order-num = Order.order-num NO-ERROR.
IF AVAILABLE invoice THEN
dTotalSalesAmount = dTotalSalesAmount + invoice.amount.
END.

DO iMonth = 1 TO 12:
dAnnualQuota = dAnnualQuota + salesrep.month-quota[iMonth].
END.

cColumn = STRING(iColumn).
cRange = "A" + cColumn.
chWorkSheet:Range(cRange):Value = salesrep.rep-name.
cRange = "B" + cColumn.
chWorkSheet:Range(cRange):Value = dTotalSalesAmount.
cRange = "C" + cColumn.
chWorkSheet:Range(cRange):Value = dAnnualQuota.
END.

chWorkSheet:Range("B2:C10"):Select().
chExcelApplication:Selection:Style = "Currency".

/* create embedded chart using the data in the Worksheet */
chWorksheetRange = chWorksheet:Range("A1:C10").
chWorksheet:ChartObjects:Add(10,150,425,300):Activate.
chExcelApplication:ActiveChart:ChartWizard(chWorksheetRange, 3, 1, 2, 1, 1, TRUE,
"1996 Sales Figures", "Sales Person", "Annual Sales").

/* create chart using the data in the Worksheet */
chChart=chExcelApplication:Charts:Add().
chChart:Name = "Test Chart".
chChart:Type = 11.

/* release com-handles */
RELEASE OBJECT chExcelApplication.
RELEASE OBJECT chWorkbook.
RELEASE OBJECT chWorksheet.
RELEASE OBJECT chChart.
RELEASE OBJECT chWorksheetRange.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Codigo de Barra

Publicado por David Murillo (5 intervenciones) el 15/10/2005 05:36:16
Utiliza El Programa Report Builder de Progress asi:

Levantas report Builder y crea un reporte, haciendo referencia al campo del
registro a imprimir le das formato con el font del codigo de barras que tienes
Ya que creaste el formato lo puedes invocar desde un programa en progress
utilizando un llamado, ver ejemplos del directorio de progress

..\src\aderp\examples\rbbatch.p

Ejemplo del llamado:

run aderb\_printrb(parametros....)
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar