Re: Custom Tables Grand Totals Only?

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

Re: Custom Tables Grand Totals Only?

Heidi Green
I have been trying to figure out an easy way to automate making totals
bold through syntax or Python script, since I received SPSS 17, and have
been stymied at every turn.

When I try to run:

SPSSINC MODIFY TABLES SUBTYPE="Custom Table" SELECT="total"
DIMENSION=ROWS LEVEL=-4
/STYLES TEXTSTYLE=BOLD.

after creating a CTABLE, I get a message that SPSS had an unrecoverable
error and must exit.

I managed to modify a sample Python script to make the label "Total" bold,
but couldn't get it to make the WHOLE ROW bold (just the label). The
Python shell doesn't show any errors, but the program gets hung up and I
get a WinWrap error??

I'm not a programmer, just an analyst, so I know I'm a bit out of my
league here, but I am usually pretty good with SPSS syntax/macros/ and
prior to Version 16, had a lot of autoscripts to do these functions.

I posed this question to SPSS tech support in several different ways, and
each time got a stock answer of "You must use Python now, and Python
support is beyond the scope of tech support".
Can anyone help?
Thanks a million!

=====================
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: Custom Tables Grand Totals Only?

Peck, Jon
I would have to see the table to figure out what is going wrong.  If you want to send me a non-confidential spv file and the syntax you are running, I can take a look ([hidden email]).  It doesn't make sense that you would get a WinWrap error, since that only applies to Basic scripting, not Python.  The only thing I can speculate on is that the levels specification is your syntax is too deep (but that, of course, still shouldn't cause a crash).

Here is an example of bolding total rows (and making the background yellow).
SPSSINC MODIFY TABLES SUBTYPE="Custom Table"
SELECT = "Total" DIMENSION=ROWS
/STYLES BACKGROUNDCOLOR=255 255 88
TEXTSTYLE = BOLD.

This comes from the PowerPoint of my talk at the recent SPSS Directions conference.  You can get the whole PowerPoint file from Developer Central (www.spss.com/devcentral).

By default, SPSSINC MODIFY TABLES applies the specified styles to both the labels and data portions of the table(s).  The STYLES APPLYTO is used to restrict the styling to one or the other.

Let me reiterate also one thing: you do NOT have to do everything with Python.  Basic scripting is still available.  But it is true that this kind of styling has to be done with either Python or Basic scripting, because traditional syntax can't do that.  SPSSINC MODIFY TABLES is extension command syntax that uses Python programmability and scripting under the covers.

In general, if you have problems with extension commands downloaded from Developer Central, using the forums provided there is appropriate.

Regards,
Jon Peck



-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Heidi Green
Sent: woensdag 3 december 2008 13:46
To: [hidden email]
Subject: Re: [SPSSX-L] Custom Tables Grand Totals Only?

I have been trying to figure out an easy way to automate making totals
bold through syntax or Python script, since I received SPSS 17, and have
been stymied at every turn.

When I try to run:

SPSSINC MODIFY TABLES SUBTYPE="Custom Table" SELECT="total"
DIMENSION=ROWS LEVEL=-4
/STYLES TEXTSTYLE=BOLD.

after creating a CTABLE, I get a message that SPSS had an unrecoverable
error and must exit.

I managed to modify a sample Python script to make the label "Total" bold,
but couldn't get it to make the WHOLE ROW bold (just the label). The
Python shell doesn't show any errors, but the program gets hung up and I
get a WinWrap error??

I'm not a programmer, just an analyst, so I know I'm a bit out of my
league here, but I am usually pretty good with SPSS syntax/macros/ and
prior to Version 16, had a lot of autoscripts to do these functions.

I posed this question to SPSS tech support in several different ways, and
each time got a stock answer of "You must use Python now, and Python
support is beyond the scope of tech support".
Can anyone help?
Thanks a million!

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