AW: Page break before an output element

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

AW: Page break before an output element

la volta statistics
Hi Jason

I am not sure if a understand you correctly? What is this about the log
turned off?
Try the sample syntax (see below) in which the the page breaks are set just
above a comment, a frequency table, and a chart with the log turned on.
The bothersome titles (such as Frequencies and Graph) that SPSS always puts
in to the viewer, you can prevent with an OMS command.


Chritian

**************.
* Start Syntax.
**************.
DATA LIST FREE /V1.
BEGIN DATA.
1 2 3 4 5
END DATA.

* Place a Comment on the first page.
ECHO "This is the start page. The next page will have the Frequency table.".

* Place a table on a single page.
Freq Var V1.
SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\V15\Add_PageBrake.sbs".
Exec.

* Place a comment on a single page.
ECHO "This line should be on a single page. On the next page you should see
a chart".
SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\V15\Add_PageBrake.sbs".
Exec.

* Place a chart on a single page.
GRAPH
  /BAR(SIMPLE)=PCT BY V1.
SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\V15\Add_PageBrake.sbs".
Exec.

* Place a comment AND a chart on a single page.
ECHO "This page contains a comment AND a chart.".
SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\V15\Add_PageBrake.sbs".
Exec.
GRAPH
  /BAR(SIMPLE)=PCT BY V1.


ECHO "That's it!".
SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\V15\Add_PageBrake.sbs".
Exec.

**************.
* End   Syntax.
**************.

* Possible OMS commands for Graph:.
OMS
 /SELECT HEADINGS
 /IF COMMANDS = ["Graph"]
     LABELS = ["Title"]
 /DESTINATION   VIEWER = NO.
GRAPH
  /BAR(SIMPLE)=PCT BY V1.
OMSEND.


* Possible OMS commands for Frequencies:.
OMS
 /SELECT HEADINGS
 /IF COMMANDS = ["Frequencies"]
     LABELS = ["Title"]
 /DESTINATION   VIEWER = NO.
Freq Var V1.
OMSEND.



-----Ursprüngliche Nachricht-----
Von: [hidden email] [mailto:[hidden email]]
Gesendet: Freitag, 30. November 2007 16:27
An: [hidden email]
Betreff: RE: Page break before an output element


Christian-

Thanks.  The script works, but it puts the page break before the log, not
the table.  I have the log turned off, but it still shows the page break in
the outline panel.  Part of the problem may be I have the script as the last
statement in a large loop macro that prints a graph and some other analysis
for each subgroup.  The hope was to create a page break for each subgroup's
set of analyses.

Jason M. Siniscalchi, PhD
US Coast Guard Academy
Phone: (860)7016673


-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: Friday, November 30, 2007 3:00 AM
To: Siniscalchi, Jason Dr.; [hidden email]
Subject: AW: Page break before an output element

Hi Jason

I use a script that I activate with a syntax command. It just adds a page
break to the very last object (chart, table title, etc.) in the output
viewer. So for example: if you want to have a chart on a new page, you just
include the syntax after the chart command. Change the path in the syntax
according to where you store the scrip file.

Hope this helps
Christian

*******************************
la volta statistics
Christian Schmidhauser, Dr.phil.II
Weinbergstrasse 108
Ch-8006 Zürich
Tel: +41 (043) 233 98 01
Fax: +41 (043) 233 98 02
email: mailto:[hidden email]
internet: http://www.lavolta.ch/


************************************
* The syntax part.
* my script is stored at: C:\Programme\SPSS\Scripts\ChangeViewer\V15.
************************************

SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\V15\Add_PageBrake.sbs".
Exec.

************************************
* The script part:
************************************

Option Explicit

Sub Main

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

  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
-----Ursprüngliche Nachricht-----
Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
Jason
Gesendet: Donnerstag, 29. November 2007 17:06
An: [hidden email]
Betreff: Page break before an output element


Does anyone know of a script that will put a page break before a selected
output element (chart, table, etc.)?

I have found one that puts a page break before the text '/page break' in a
table's title, but this is not helpful for charts or other non table
entities.

=====================
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

=====================
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: AW: Page break before an output element

Art Kendall
What about putting
PRINT EJECT.
in the syntax?

Art Kendall
Social Research Consultants

la volta statistics wrote:

> Hi Jason
>
> I am not sure if a understand you correctly? What is this about the log
> turned off?
> Try the sample syntax (see below) in which the the page breaks are set just
> above a comment, a frequency table, and a chart with the log turned on.
> The bothersome titles (such as Frequencies and Graph) that SPSS always puts
> in to the viewer, you can prevent with an OMS command.
>
>
> Chritian
>
> **************.
> * Start Syntax.
> **************.
> DATA LIST FREE /V1.
> BEGIN DATA.
> 1 2 3 4 5
> END DATA.
>
> * Place a Comment on the first page.
> ECHO "This is the start page. The next page will have the Frequency table.".
>
> * Place a table on a single page.
> Freq Var V1.
> SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\V15\Add_PageBrake.sbs".
> Exec.
>
> * Place a comment on a single page.
> ECHO "This line should be on a single page. On the next page you should see
> a chart".
> SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\V15\Add_PageBrake.sbs".
> Exec.
>
> * Place a chart on a single page.
> GRAPH
>   /BAR(SIMPLE)=PCT BY V1.
> SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\V15\Add_PageBrake.sbs".
> Exec.
>
> * Place a comment AND a chart on a single page.
> ECHO "This page contains a comment AND a chart.".
> SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\V15\Add_PageBrake.sbs".
> Exec.
> GRAPH
>   /BAR(SIMPLE)=PCT BY V1.
>
>
> ECHO "That's it!".
> SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\V15\Add_PageBrake.sbs".
> Exec.
>
> **************.
> * End   Syntax.
> **************.
>
> * Possible OMS commands for Graph:.
> OMS
>  /SELECT HEADINGS
>  /IF COMMANDS = ["Graph"]
>      LABELS = ["Title"]
>  /DESTINATION   VIEWER = NO.
> GRAPH
>   /BAR(SIMPLE)=PCT BY V1.
> OMSEND.
>
>
> * Possible OMS commands for Frequencies:.
> OMS
>  /SELECT HEADINGS
>  /IF COMMANDS = ["Frequencies"]
>      LABELS = ["Title"]
>  /DESTINATION   VIEWER = NO.
> Freq Var V1.
> OMSEND.
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: [hidden email] [mailto:[hidden email]]
> Gesendet: Freitag, 30. November 2007 16:27
> An: [hidden email]
> Betreff: RE: Page break before an output element
>
>
> Christian-
>
> Thanks.  The script works, but it puts the page break before the log, not
> the table.  I have the log turned off, but it still shows the page break in
> the outline panel.  Part of the problem may be I have the script as the last
> statement in a large loop macro that prints a graph and some other analysis
> for each subgroup.  The hope was to create a page break for each subgroup's
> set of analyses.
>
> Jason M. Siniscalchi, PhD
> US Coast Guard Academy
> Phone: (860)7016673
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: Friday, November 30, 2007 3:00 AM
> To: Siniscalchi, Jason Dr.; [hidden email]
> Subject: AW: Page break before an output element
>
> Hi Jason
>
> I use a script that I activate with a syntax command. It just adds a page
> break to the very last object (chart, table title, etc.) in the output
> viewer. So for example: if you want to have a chart on a new page, you just
> include the syntax after the chart command. Change the path in the syntax
> according to where you store the scrip file.
>
> Hope this helps
> Christian
>
> *******************************
> la volta statistics
> Christian Schmidhauser, Dr.phil.II
> Weinbergstrasse 108
> Ch-8006 Zürich
> Tel: +41 (043) 233 98 01
> Fax: +41 (043) 233 98 02
> email: mailto:[hidden email]
> internet: http://www.lavolta.ch/
>
>
> ************************************
> * The syntax part.
> * my script is stored at: C:\Programme\SPSS\Scripts\ChangeViewer\V15.
> ************************************
>
> SCRIPT file="C:\Programme\SPSS\Scripts\ChangeViewer\V15\Add_PageBrake.sbs".
> Exec.
>
> ************************************
> * The script part:
> ************************************
>
> Option Explicit
>
> Sub Main
>
> Dim objOutputDoc        As ISpssOutputDoc
> Dim objItems            As ISpssItems
> Dim objitem             As ISpssItem
> Dim i                   As Integer
>
>   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
> -----Ursprüngliche Nachricht-----
> Von: SPSSX(r) Discussion [mailto:[hidden email]]Im Auftrag von
> Jason
> Gesendet: Donnerstag, 29. November 2007 17:06
> An: [hidden email]
> Betreff: Page break before an output element
>
>
> Does anyone know of a script that will put a page break before a selected
> output element (chart, table, etc.)?
>
> I have found one that puts a page break before the text '/page break' in a
> table's title, but this is not helpful for charts or other non table
> entities.
>
> =====================
> 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
>
> =====================
> 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
>
>
>

=====================
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
Art Kendall
Social Research Consultants