Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Edit Multiple Running Totals?

Status
Not open for further replies.

ztruelove

Technical User
Oct 3, 2008
13
US
I have a report with many dozen running total fields that I need to edit to "Reset on change of group." Is there a way to modify all of these at once, or am I going to have to edit each one individually?
 
As far as I know, you must edit them individually.

-LB
 
That's ok. I ended up building an AutoIt script to do it for me. Thanks for replying though.
 
I have been considering playing with AutoIt and I would be interested in seeing the script you used.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
I admit this is sort of "ghetto," but it worked for my needs.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
AutoItSetOption("WinTitleMatchMode",2)
WinWaitActive("Crystal Reports")

$count = 1

Do
send("{APPSKEY}")
sleep(1000)
Send("E")
sleep(1000)
Send("!p")
sleep(1000)
Send("{ENTER}")
sleep(1000)
Send("{DOWN}")
sleep(1000)
$count = $count + 1
Until $count > 200 ;;; fill in the number of RTs you need to edit.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

So I basically run this script and then switch over to my already open Crystal Reports app by clicking on the first RT that I want to edit. The script automatically performs a "right-click," selects Edit, selects "On change of group" under the Reset section, sends an Enter command, and then moves down to the next RT where it performs the same steps again...until it reaches the end of the counter.

I'm sure there's a better way to do it, but having never used AutoIT before, I found this to be the quickest way for me.
 
Thanks. No reason to be fancy if it works.

It took me a while to get the meaning of !p, because I didn't know that there were 'Alt' options in the running totals dialogue. It appears that CR has decided to hide the 'Alt' key underlines for most dialogue windows, unless you hit the 'Alt' key. I now see that this same pattern is followed in most CR dialogues. Knowig that there are 'Alt' keys in these dialogues is great for someone likes me who hates to reach for a mouse when my hands are already on the keyboard.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top