[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] Label Printing problem



Sachin,

Seems to me this is a problem with the file interpreter, ie the programm
that spools the file to the printer and not an SQR problem.
You could try to send a file which includes the print information, like a
PDF or an SPF file.

Hope that will help,
Edwin


----- Original Message ----- 
From: "Sachin Shingare" <sshingare@rediffmail.com>
To: <sqr-users@sqrug.org>
Sent: Monday, May 19, 2003 3:48 AM
Subject: [sqr-users] Label Printing problem


>
> Hi,
>
> I have written a program to print labels 2 accross and 7 vertical
> on each page.
> When I run the program at my client PC and print on HP LaserJet
> 4Si MX printer, it prints well and occupy full page area for
> printing.
>
> Actual process is, in the program output file generated is
> paylabel.lis, which then I rename to PAYLabels_AXA_21704.PCL, and
> copy to another server from there via ftp it goes to another third
> party company where they print this label file on High speed XEROX
> 4635 production printer. They use A4 size(same size what I used)
> pasteing label sheet for printing.But when they print , it occupy
> only 70% of the page area. So there is alignment problem with the
> pasted labels.
>
> Attached are the program and label file.
>
> I am just wondering , how to fix this problem. Can some please
> help me to fix this. Thank you.
> Regards-Sachin.
>
> ===== Program ====================
> !***********************************************************************
> !   Include SQC files
> !***********************************************************************
> #Include 'setenv.sqc'
> #include 'stdapi.sqc'
> #Include 'datetime.sqc'
> #Include 'datemath.sqc'
> #Include 'number.sqc'
> #Include 'curdttim.sqc'
> #Include 'reset.sqc'
> #Include 'runtime.sqc'
> !***********************************************************************
>
> ! Define hard-coded variables
> #define MAX_LABEL_LINES 7
> #define LINES_BETWEEN_LABELS 4
>
>
> !***********************************************************************
> ! Program Section
> !
> ! This is the Main Line Routine.  It will Initiate Date and
> Number
> ! Routines, Open the Input file and start the processing.
> !***********************************************************************
> Begin-Program
>    Do Init-Report
>    Do Mailing-Labels
>    Do Rename-File
>    Do Stdapi-Term
>    Show 'Report ended: ' $ReportDate ' ' $ReportTime
> End-Program
> !***********************************************************************
>
>
>
> !***********************************************************************
> ! Init-Report
> !
> ! Initiate report and obtain run control parameters.
> !
> !***********************************************************************
> Begin-Procedure Init-Report
>
>    #debuga show 'Start INIT-REPORT'
>
>      Do Init-DateTime
>      Do Init-Number
>      Do Get-Current-DateTime
>      Let $ReportTime_Start = $ReportTime
>      Do Stdapi-Init
>      Show 'Report started: ' $ReportDate ' ' $ReportTime
>      Display 'Pay Point Labels'
>      Display 'Report Name = paylabel.sqr'
>
>      If $prcs_process_instance = ''      ! Outside PS - prompt for
> values
>        Input $Company_Name 'Enter the Company for printing Pay
> Labels (eg. AXA or AHI or IPAC)' MAXLEN=4 type=char
>        Let   $Company               = upper(rtrim($Company_Name, '
> '))
>        Let   $Prcs_Oprid             = 'PS'
>        Let   $Prcs_Run_Cntl_ID       = '1'
>        Let   $Prcs_Process_Instance  = '1'
>      Else                                                ! Get
> parameters from run control
>          Do Read-Run-Control
>      End-If
>
>      Show 'Pay Company : ' $Company
>
>      #debuga show 'EXIT INIT-REPORT'
>
> End-Procedure Init-Report
> !***********************************************************************
>
>
>
> !***********************************************************************
> ! Mailing-Labels
> !
> ! Print Mailing-Labels.
> !
> !***********************************************************************
> Begin-Procedure Mailing-Labels
>    #debuga show 'Start Mailing-Labels'
>    Let #Label_Count = 0
>    Let #Label_Lines = 0
>    columns 1 40      ! enable columns
>
>    alter-printer  font=300 point-size=15
>
> Display 'Printing Pay Point Labels....'
>
> Begin-select On-Error=Abort-SQL-Error
> P.PAYPOINT_ID_AXA  !(1,1,30)
> P.ADDRESS1
> P.ADDRESS2
> P.ADDRESS3
> P.CITY
> P.STATE
> P.ZIP
>
>    Let $Paypt = &P.PAYPOINT_ID_AXA
>    Let $Addr1 = &P.ADDRESS1
>    Let $Addr2 = &P.ADDRESS2
>    Let $Addr3 = &P.ADDRESS3
>    Let $City  = &P.CITY
>    Let $State = &P.STATE
>    Let $Zip   = ltrim(&P.ZIP,' ')
>
>    Print 'PRIVATE & CONFIDENTIAL' (1,1)
>    Let $Name = $Addr1 || ' (' || $Paypt || ')'
>    Print $Name (2,1)
>    Print $Addr2 (3,1)
>    Let $CSZ = $City || ', ' || $State || '. ' || $Zip
>    If $Addr3 = '' or $Addr3 = ' '
>       Print $CSZ (4,1)
>    Else
>       Print $Addr3 (4,1)
>       Print $CSZ (5,1)
>    End-If
>
>    next-column at-end=newline
>    add 1 to #label_count
>    If #current-column = 1
>       add 1 to #label_lines
>       If #label_lines = {MAX_LABEL_LINES}
>          new-page
>          Let #label_lines = 0
>       Else
>          next-listing no-advance
> skiplines={LINES_BETWEEN_LABELS}
>       End-If
>    End-If
>
>  from PS_PYPOINT_TBL_AXA P
> where P.EFFDT = (select max(E.effdt) from PS_PYPOINT_TBL_AXA E
> where E.PAYPOINT_ID_AXA = P.PAYPOINT_ID_AXA)
> and P.EFF_STATUS = 'A'
> and P.COUNTRY = 'AUS'
> and P.descrshort = $Company
> order by P.PAYPOINT_ID_AXA
> end-select
>
>    use-column 0       ! disable columns
>    new-page
>    Print 'Labels printed on ' (,1)
>    Print $current-date ()
>    Print 'Total labels printed = ' (+1,1)
>    Print #label_count () edit 9,999,999
>
> End-Procedure Mailing-Labels
> !***********************************************************************
>
>
>
> !***********************************************************************
> ! Read-Run-Control
> !
> ! Selects the parameters from the run control record
> !
> !***********************************************************************
> Begin-Procedure Read-Run-Control
>
>    #debuga show '*** Entering Read-Run-Control ***'
>
> Begin-select
> COMPANY_PAY_AXA
>
>      Let $Company           = upper(rtrim(&COMPANY_PAY_AXA, '
> '))
>
>  FROM PS_RUNCTL_PYLB_AXA
> WHERE OPRID = $Prcs_Oprid
> AND   RUN_CNTL_ID = $Prcs_Run_Cntl_Id
> end-select
>
>    #debuga show '*** Exiting Read-Run-Control ***'
>
> End-Procedure Read-Run-Control
> !***********************************************************************
>
>
>
> !***********************************************************************
> ! Rename-File
> !
> ! Rename output file name in UNIX
> !***********************************************************************
> Begin-Procedure Rename-File
>
>    Let $output_dir = '
> /opt/pshr/hrdev/hrdev/hr750/appserv/prcs/PSHRDEV/output/'
>    Let $src_filename = $output_dir || 'paylabel_' ||
> $Prcs_Process_Instance || '.lis'
>    Let $dest_filename = $output_dir || 'PAYLabels_' || $Company ||
> '_' || $Prcs_Process_Instance || '.PCL'
>
>    Let $SYSTEM_CALL = 'mv ' || $src_filename || ' ' ||
> $dest_filename
>
>    call system using $SYSTEM_CALL #system_status
>    Show 'status: ' #system_status
>
>    let $SYSTEM_CALL = 'lp -dSOL_PAY ' || $dest_filename
>
>    call system using $SYSTEM_CALL #system_status
>    show 'status: ' #system_status
>
> End-Procedure Rename-File
>
>
>
> !***********************************************************************
> ! Error-Found
> !
> ! Create an Error Listing of record that has invalid data.
> !***********************************************************************
> Begin-Procedure Error-Found
>
>    Let $ErrorFound = 'Y'
>    Add 1 to #Total_Errors
>    Do Format-Number(#Total_Errors,$Total_Errors,'99999')
>    Let $Total_Errors = 'E' || $Total_Errors
>    Print $Total_Errors  (+1,1)
>    Print $ErrorMsg      (,+1,75) Wrap 75 5
>    Print $ErrorContext  (,+1,20) Wrap 20 5
>    Let $ErrorMsg = ' '
>    Let $ErrorContext = ' '
>
> End-Procedure Error-Found
> !***********************************************************************
>
>
>
> !***********************************************************************
> ! Abort-SQL-Error
> !
> ! Handle SQL Errors
> !
> !*s**********************************************************************
> Begin-Procedure Abort-SQL-Error
>
>   Show 'Procedure - Abort-SQL-Error'
>
>    Evaluate #sql-status
>
>     When = -99999  !* Token "when" clause for non-DB2
> environments
>     When-other
>        Let $ErrorMsg = $sql-error
>        Let $ErrorContext =  '****SQL ERROR****'
>        Do Error-Found
>    End-Evaluate
>
> End-Procedure Abort-SQL-Error
> !***********************************************************************
>
>
> ___________________________________________________
> Get www. mycompany .com and 5 matching email ids.
> Just Rs. 1499/ year.
> Click here http://www.rediffmailpro.com
>


----------------------------------------------------------------------------
----


> Here was a non admissible message part of 'application/octet-stream'
> MIME type. It has been automatically discarded before sending the
> message to the list.
>


----------------------------------------------------------------------------
----


> Here was a non admissible message part of 'application/octet-stream'
> MIME type. It has been automatically discarded before sending the
> message to the list.
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.481 / Virus Database: 277 - Release Date: 13/05/2003

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users