Normal Topic @AskUser() before printing report (Read 672 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
@AskUser() before printing report
Sep 11th, 2007 at 7:10pm
Print Post Print Post  
I have a number of pre-defined "Posting" reports in my Invoice database.  By pre-defined I mean they have attached retrieve and sort specs.  Posting reports print out a report which shows information about payments that have been posted to an invoice.

I also have one posting report called something like "specific invoices" which has no attached retrieve spec.  It runs on the result set that the user has on his screen at the time.

The user who runs these, Lisa, is not tremendously computer savvy.  She has learned by rote the steps required to post a payment, move on to the next invoice, post again, and so on.  When she's done she's learned that she can F10 a blank retrieve spec and run the predefined reports against that, and she will get the results she wants.

Today, by luck alone, she made a specific invoice posting and ran the specific report against it.  I was out of the office at the time.  She got the results she wanted but it was a fluke, because she did not know that she would have to retrieve specific invoices for the report to run against, and luckily she had not cleared the spec and F10'd for all 35,000 invoices on file.  That would have been a heck of a report.

So what I'd like to do, for future instances where the user has to retrieve specific records before running the report, is program in an @AskUser() question which tells them that they are running the report against @ResultSetTotal(), are you sure you want to do this?  I'm not sure I know how to do this.  I don't have any specific button for running this report, it's just selected off the tree.

I've got my programming manual pages tagged at @AskUser and @ResultSetTotal(), and the programming seems pretty straightforward...but where do I put it?  The "yes" answer would run the report, and the "no" answer would not.

Thanks for any pointers.
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @AskUser() before printing report
Reply #1 - Sep 11th, 2007 at 7:32pm
Print Post Print Post  
You'd need to make a button for it instead of running it off the tree. Once they run it from the tree, there is no place to insert your question that can stop it from running. Exatcly what the button does kind of depends on what she was supposed to retrieve before running the report.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: @AskUser() before printing report
Reply #2 - Sep 11th, 2007 at 7:34pm
Print Post Print Post  
Thanks Erika.

The button would need to run a report against the current result set.  I'm not sure how to program a button to run a report.  I'm reading up on @PrintAReport() right now.

Update:  Got it, works great.  YAY!
« Last Edit: Sep 11th, 2007 at 8:51pm by Infinity »  

**
Captain Infinity
Back to top
IP Logged