OMS Export Table to PDF

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

OMS Export Table to PDF

Dan Conlon
I get some puzzling inconsistencies in the output when using the EXPORT to PDF command.  I can't figure out if the issue is attributable to SPSS, OMS, or Acrobat Pro (or a combination of the three).

I run the below syntax to create the table.  

SET TLOOK ='H:\SPSS19\BOXSHRINK_WIDE.STT'.                                                          
                         
CTABLES
/VLABELS VARIABLES=FYEAR  BLNG_PRVDR_SPCLTY_CODE  dISPLAY=none
/VLABELS VARIABLES=paid_amt CLIENTS  AVEPERUSER  dISPLAY=LABEL
 /MRSETS COUNTDUPLICATES=YES
/FORMAT  MinCOLWIDTH= 80  MaxCOLWIDTH= 100  UNITS=POINTS  EMPTY= BLANK  MISSING= '.'
/TABLE BLNG_PRVDR_SPCLTY_CODE [C]  
BY  fyear  [C]  >
 (clients [S][SUM,'',comma6.0]   + paid_amt[S][SUM,'',dollar7.0]  +  AVEPERUSER[S][SUM,'',dollar6.2]  )  
 /CATEGORIES VAR=ALL EMPTY=EXCLUDE MISSING=EXCLUDE
  /CATEGORIES VAR= BLNG_PRVDR_SPCLTY_CODE TOTAL=no POSITION=AFTER LABEL='TOTAL'
  /SLABELS POSITION=COLUMN.


I select the table in the output viewer, then export the table to pdf using the menu  (FILE>EXPORT>SELECTED>PDF>FILE NAME ).    It produces a pdf file that appears identical to the table in the SPSS output viewer (i.e., the table completely fills the page in Acrobat and prints in an easily readable format).  However, this is not the most efficient approach since I often have 50-100 different tables I want to export to pdf as individual pdf files.

     
The preferred approach is more automated and uses OMS to export to a pdf file. The syntax below successfully creates a pdf file using OMS. This particular report fits on 1 page landscape. However. the report created in pdf via OMS is very compressed in Acrobat Pro and fills only about 1/3 of the page. It is very difficult to read without going into Acrobat Pro and making some adjustments.

SET TLOOK ='H:\SPSS19\BOXSHRINK_WIDE.STT'.                                                          
** OMS.                                                                          
OMS                                                                              
/SELECT TABLES                                                                    
/IF COMMANDS=['CTables'] SUBTYPES=['Custom Table']                                
/DESTINATION FORMAT=PDF                                                          
OUTFILE='h:\dental\oms\FY1320131231\P88-21 L FY0913 PROVSPEC EXPS AGEGE21 LAND.pdf'                                          
vieWER=yes.                            
CTABLES
/VLABELS VARIABLES=FYEAR  BLNG_PRVDR_SPCLTY_CODE  dISPLAY=none
/VLABELS VARIABLES=paid_amt CLIENTS  AVEPERUSER  dISPLAY=LABEL
 /MRSETS COUNTDUPLICATES=YES
/FORMAT  MinCOLWIDTH= 80  MaxCOLWIDTH= 100  UNITS=POINTS  EMPTY= BLANK  MISSING= '.'
/TABLE BLNG_PRVDR_SPCLTY_CODE [C]  
BY  fyear  [C]  >
 (clients [S][SUM,'',comma6.0]   + paid_amt[S][SUM,'',dollar7.0]  +  AVEPERUSER[S][SUM,'',dollar6.2]  )  
 /CATEGORIES VAR=ALL EMPTY=EXCLUDE MISSING=EXCLUDE
  /CATEGORIES VAR= BLNG_PRVDR_SPCLTY_CODE TOTAL=no POSITION=AFTER LABEL='TOTAL'
  /SLABELS POSITION=COLUMN.
OMSEND.
EXE.


http://147.55.192.44:50134/help/index.jsp?topic=%2Fcom.ibm.spss.statistics.help%2Fspss%2Fbase%2Fidh_exp_dialog.htm 
mentions that "Portable Document Format. All output is exported as it appears in Print Preview, with all formatting attributes intact."
I find that to be true when using the menu to export to a pdf file  - but not true when using OMS to export to a pdf file.  Using OMS does not result in the old acronym of WYSIWYG (what you see is what you get).  

Any suggestions for getting the exported file to be formatted correctly would be appreciated.  

I wasn't sure if attaching the output would be beneficial (or whether it's allowed on this forum).

Thanks,
Dan


Reply | Threaded
Open this post in threaded view
|

Re: OMS Export Table to PDF

Dan Conlon
I thought of a hopefully better way of illustrating my issue than my rushed, end of the day attempt yesterday. This uses an SPSS sample sav file and table look that should make it easier for others to replicate. The contents of the table using the syntax below are of no interest  - I just wanted to illustrate my problem.

The issue is still the same.  When I use the menu in output viewer and manually export a table to a pdf file (FILE>EXPORT>SELECTED>PDF>FILE NAME ) , the file created in Acrobat Pro is identical to the table I see in the SPSS output viewer  (WYSIWYG).    However, when I attempt to automate the process and use OMS to export the table to a pdf file, the resulting pdf file is much different (and does not look like the table I see on the SPSS output viewer).  

My question:  is there a way to use OMS to create a pdf file that is identical to the table that I see in the output viewer.  


dataset close all.
GET
  FILE='C:\Program Files\IBM\SPSS\Statistics\22\Samples\English\car_sales.sav'.
DATASET NAME DataSet1 WINDOW=FRONT.


select if (horsepow le 125).

                                                   
SET TLOOK ='c:\program files\ibm\spss\statistics\22\looks\compactboxed.stt'.  
       
CTABLES
/VLABELS VARIABLES=horsepow model sales dISPLAY=none
 /MRSETS COUNTDUPLICATES=YES
/FORMAT  MinCOLWIDTH= 50  MaxCOLWIDTH= 70  UNITS=POINTS  EMPTY= BLANK  MISSING= '.'
 /TABLE model [C]  
BY  horsepow [C]  >
 (sales [S][SUM,'',comma6.0]   )  
  /CATEGORIES VAR=ALL EMPTY=EXCLUDE MISSING=EXCLUDE
  /CATEGORIES VAR= model TOTAL=no POSITION=AFTER LABEL='TOTAL'
  /SLABELS POSITION=COLUMN.

                                                             
 OMS                                                                              
 /SELECT TABLES                                                                    
 /IF COMMANDS=['CTables'] SUBTYPES=['Custom Table']                                
 /DESTINATION FORMAT=PDF                                                          
 OUTFILE='h:\temp\oms table test LAND.pdf'                                          
 vieWER=yes.                    
CTABLES
/VLABELS VARIABLES=horsepow model sales dISPLAY=none
 /MRSETS COUNTDUPLICATES=YES
/FORMAT  MinCOLWIDTH= 50  MaxCOLWIDTH= 70  UNITS=POINTS  EMPTY= BLANK  MISSING= '.'
 /TABLE model [C]  
BY  horsepow [C]  >
 (sales [S][SUM,'',comma6.0]   )  
  /CATEGORIES VAR=ALL EMPTY=EXCLUDE MISSING=EXCLUDE
  /CATEGORIES VAR= model TOTAL=no POSITION=AFTER LABEL='TOTAL'
  /SLABELS POSITION=COLUMN.
 OMSEND.
EXE.

Reply | Threaded
Open this post in threaded view
|

Re: OMS Export Table to PDF

Jon K Peck
The answer depends on your Statistics version.  OMS is a backend procedure, and until recently it therefore did not apply tablelooks or see any other edits done in the front end.  Those used to be applied in the frontend which is downstream from OMS processing.  In V22, at least, tableLooks are applied in the backend and, hence, are seen by OMS.  If you have an older version where this does not happen, you can still automate the export process from the Viewer using the SPSSINC MODIFY OUTPUT extension command.  It comes with a custom function called pdfexport that exports the specified tables to a set of consecutively numbered files.  MODIFY OUTPUT would, for example, specify an OMS table type and all the tables that meet that criterion would be exported.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        Dan Conlon <[hidden email]>
To:        [hidden email],
Date:        01/28/2014 10:31 AM
Subject:        Re: [SPSSX-L] OMS Export Table to PDF
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




I thought of a hopefully better way of illustrating my issue than my rushed,
end of the day attempt yesterday. This uses an SPSS sample sav file and
table look that should make it easier for others to replicate. The contents
of the table using the syntax below are of no interest  - I just wanted to
illustrate my problem.

The issue is still the same.  When I use the menu in output viewer and
manually export a table to a pdf file (FILE>EXPORT>SELECTED>PDF>FILE NAME )
, the file created in Acrobat Pro is identical to the table I see in the
SPSS output viewer  (WYSIWYG).    However, when I attempt to automate the
process and use OMS to export the table to a pdf file, the resulting pdf
file is much different (and does not look like the table I see on the SPSS
output viewer).

My question:  is there a way to use OMS to create a pdf file that is
identical to the table that I see in the output viewer.


dataset close all.
GET
 FILE='C:\Program
Files\IBM\SPSS\Statistics\22\Samples\English\car_sales.sav'.
DATASET NAME DataSet1 WINDOW=FRONT.


select if (horsepow le 125).


SET TLOOK ='c:\program files\ibm\spss\statistics\22\looks\compactboxed.stt'.

CTABLES
/VLABELS VARIABLES=horsepow model sales dISPLAY=none
/MRSETS COUNTDUPLICATES=YES
/FORMAT  MinCOLWIDTH= 50  MaxCOLWIDTH= 70  UNITS=POINTS  EMPTY= BLANK
MISSING= '.'
/TABLE model [C]
BY  horsepow [C]  >
(sales [S][SUM,'',comma6.0]   )
 /CATEGORIES VAR=ALL EMPTY=EXCLUDE MISSING=EXCLUDE
 /CATEGORIES VAR= model TOTAL=no POSITION=AFTER LABEL='TOTAL'
 /SLABELS POSITION=COLUMN.


OMS
/SELECT TABLES
/IF COMMANDS=['CTables'] SUBTYPES=['Custom Table']
/DESTINATION FORMAT=PDF
OUTFILE='h:\temp\oms table test LAND.pdf'
vieWER=yes.
CTABLES
/VLABELS VARIABLES=horsepow model sales dISPLAY=none
/MRSETS COUNTDUPLICATES=YES
/FORMAT  MinCOLWIDTH= 50  MaxCOLWIDTH= 70  UNITS=POINTS  EMPTY= BLANK
MISSING= '.'
/TABLE model [C]
BY  horsepow [C]  >
(sales [S][SUM,'',comma6.0]   )
 /CATEGORIES VAR=ALL EMPTY=EXCLUDE MISSING=EXCLUDE
 /CATEGORIES VAR= model TOTAL=no POSITION=AFTER LABEL='TOTAL'
 /SLABELS POSITION=COLUMN.
OMSEND.
EXE.





--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/OMS-Export-Table-to-PDF-tp5724189p5724206.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


Reply | Threaded
Open this post in threaded view
|

Re: OMS Export Table to PDF

Dan Conlon
In reply to this post by Dan Conlon




Re: OMS Export Table to PDF



Thanks Jon.  

I'm using V22.  As discussed offline, for anyone interested, part of the problem may be the fact I have my Viewer Page Setup in landscape (which OMS seems to be unable to recognize).  Hopefully that will be addressed in a future fixpack.

Dan



==============================================================
The answer depends on your Statistics version.  OMS is a backend procedure, and until recently it therefore did not apply tablelooks or see any other edits done in the front end.  Those used to be applied in the frontend which is downstream from OMS processing.  In V22, at least, tableLooks are applied in the backend and, hence, are seen by OMS.  If you have an older version where this does not happen, you can still automate the export process from the Viewer using the SPSSINC MODIFY OUTPUT extension command.  It comes with a custom function called pdfexport that exports the specified tables to a set of consecutively numbered files.  MODIFY OUTPUT would, for example, specify an OMS table type and all the tables that meet that criterion would be exported.
 

Jon Peck (no "h") aka Kim
 Senior Software Engineer, IBM
 [hidden email]
 phone: 720-342-5621