Page Break in Spss

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

Page Break in Spss

behnaz shirazi-2
Hello Dear All,

Is there anyway to control page break through spss syntax.I want to make PDF
and I want to have control on the number of table or chart within one page.

Do you have any experience ? is it possilbe?


Thank you
Behnaz

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.com/
Reply | Threaded
Open this post in threaded view
|

AW: Page Break in Spss

la volta statistics
Hi Behnaz

There was recently a similar question on the list. The sugested answer was
using the title command:

TITLE "".

(see: http://listserv.uga.edu/cgi-bin/wa?A2=ind0709&L=spssx-l&P=R22376)
This should give you a page breake.

Another possibility would be to use a script and call the script through
syntax.
This has the advantage that the page break belongs to a visible object in
the output (and does not waste space).

copy the following script to 'yourPath' and name it Add_PageBrake.sbs.

in the syntax file you envoke the script with the following code:

* This belongs to the syntax file.
Acrtivate the script by using the following syntax
SCRIPT file="C:\yourPath\Add_PageBrake.sbs".




* This belongs to the script file.
Option Explicit
Sub Main

Dim objOutputDoc As ISpssOutputDoc
Dim objItems As ISpssItems
Dim objitem As ISpssItem
Dim i As Integer

'Acrtivate the script by using the following syntax
'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".

Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
Set objItems = objOutputDoc.Items()

i=objItems.Count

Set objitem = objItems.GetItem(i -1)
With objitem
.PageBreak = True
End With

objitem.Deactivate
Set objitem = Nothing
Set objItems = Nothing
Set objOutputDoc = Nothing

End Sub

Hope this helps, Christian

-----Ursprüngliche Nachricht-----
Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
behnaz shirazi
Gesendet: Mittwoch, 3. Oktober 2007 20:22
An: [hidden email]
Betreff: Page Break in Spss


Hello Dear All,

Is there anyway to control page break through spss syntax.I want to make PDF
and I want to have control on the number of table or chart within one page.

Do you have any experience ? is it possilbe?


Thank you
Behnaz

Don't just search. Find. Check out the new MSN Search!
http://search.msn.com/
Reply | Threaded
Open this post in threaded view
|

Re: AW: Page Break in Spss

behnaz shirazi-2
Thank you so much .That would be great.I will test it as soon as I get a
chance.

Thanks again
Behnaz


>From: la volta statistics <[hidden email]>
>Reply-To: la volta statistics <[hidden email]>
>To: [hidden email]
>Subject: AW: Page Break in Spss
>Date: Thu, 4 Oct 2007 09:09:51 +0200
>
>Hi Behnaz
>
>There was recently a similar question on the list. The sugested answer was
>using the title command:
>
>TITLE "".
>
>(see: http://listserv.uga.edu/cgi-bin/wa?A2=ind0709&L=spssx-l&P=R22376)
>This should give you a page breake.
>
>Another possibility would be to use a script and call the script through
>syntax.
>This has the advantage that the page break belongs to a visible object in
>the output (and does not waste space).
>
>copy the following script to 'yourPath' and name it Add_PageBrake.sbs.
>
>in the syntax file you envoke the script with the following code:
>
>* This belongs to the syntax file.
>Acrtivate the script by using the following syntax
>SCRIPT file="C:\yourPath\Add_PageBrake.sbs".
>
>
>
>
>* This belongs to the script file.
>Option Explicit
>Sub Main
>
>Dim objOutputDoc As ISpssOutputDoc
>Dim objItems As ISpssItems
>Dim objitem As ISpssItem
>Dim i As Integer
>
>'Acrtivate the script by using the following syntax
>'SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\Add_PageBrake.sbs".
>
>Set objOutputDoc = objSpssApp.GetDesignatedOutputDoc
>Set objItems = objOutputDoc.Items()
>
>i=objItems.Count
>
>Set objitem = objItems.GetItem(i -1)
>With objitem
>.PageBreak = True
>End With
>
>objitem.Deactivate
>Set objitem = Nothing
>Set objItems = Nothing
>Set objOutputDoc = Nothing
>
>End Sub
>
>Hope this helps, Christian
>
>-----Urspr?he Nachricht-----
>Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
>behnaz shirazi
>Gesendet: Mittwoch, 3. Oktober 2007 20:22
>An: [hidden email]
>Betreff: Page Break in Spss
>
>
>Hello Dear All,
>
>Is there anyway to control page break through spss syntax.I want to make
>PDF
>and I want to have control on the number of table or chart within one page.
>
>Do you have any experience ? is it possilbe?
>
>
>Thank you
>Behnaz
>
>Don't just search. Find. Check out the new MSN Search!
>http://search.msn.com/

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search!
http://search.msn.com/
Reply | Threaded
Open this post in threaded view
|

Re: AW: Page Break in Spss

ChrisKeran
In reply to this post by la volta statistics
Hi Jon,

Thank you for sharing your .sbs script file, however the page break gets
deleted when I remove all logs and wondering if you have a suggestion?

Background: when I remove all logs using SPSSINC MODIFY OUTPUT syntax (see
below) and then run the OUTPUT EXPORT syntax (see below) the symbol ">>"
still appears in the Output navigation pane, but the page break is gone when
opening the subsequent .doc file. However, if I run the OUTPUT EXPORT syntax
with EXPORT=ALL, then it correctly keeps the page breaks BUT IT KEEPS ALL
the ugly command syntax too.

Wondering if you have a suggestion?
FYI, Title and Subtitle are no good because only allow 60 characters each,
so I'm using the TEXT command instead, and this remains visible after
removing the logs, but the page breaks do not remain after removing the
logs.

*Remove log text.
SPSSINC MODIFY OUTPUT LOGS  
/IF
PROCESS=ALL
/REPLACE ITEMS
/VISIBILITY VISIBLE=FALSE.

* Export Output.
OUTPUT EXPORT
  /CONTENTS  EXPORT=VISIBLE  LAYERS=PRINTSETTING  MODELVIEWS=PRINTSETTING
  /DOC  DOCUMENTFILE='K:\CEA\MI\CURRENT PROJECTS\DATA\2021 Continuum
Subscriber Report\03 Report\SPSS Output\ResultsB.doc'
     NOTESCAPTIONS=YES  WIDETABLES=ASIS PAGEBREAKS=YES
     PAGESIZE=INCHES(8.5, 11.0)  TOPMARGIN=INCHES(1.0)
BOTTOMMARGIN=INCHES(1.0)
     LEFTMARGIN=INCHES(1.0)  RIGHTMARGIN=INCHES(1.0).

Thanks,
Chris



--
Sent from: http://spssx-discussion.1045642.n5.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