Seems simple but I don't understand. Is that what you're looking for? If not, why?:
public boolean fetch(){
QueryRun LocalQuery = new QueryRun(this);
if (element.prompt() && LocalQuery.prompt()){
// the user clicked OK
if (validReceiptAccount()) {
//everything's fine, go on with the fetch
fetchStuff();
return true; //Everything worked out ok
} else {
// Bad receipt or Account
warning("Bad Stuff");
// Here you have a choice, return true will show the "Report
// empty" message and return false will show no messages except
// yours.
return false; //Report cancelled
}
}
// User clicked cancel then do nothing
return false; //no message
}
Steeve...
-----Message d'origine-----
De�: k_otickashka [mailto:[EMAIL PROTECTED]
Envoy�: 5 juillet 2004 16:14
��: [EMAIL PROTECTED]
Objet�: Re: RE : [development-axapta] How to cancel a report
Basically I am trying to print a receipt based on an account number
and receipt number. The user must enter the account number (how do I
make mandatory on a query form? ) If the user enters the account
number then a check is done to see if a receipt exists for that
customer. If it does and the user hasnt specified a receipt number in
the query form then an warning is issued and the report is cancelled.
How do I accomplish this?
--- In [EMAIL PROTECTED], "Steeve Gilbert"
<[EMAIL PROTECTED]> wrote:
> I don't know how your fetch() is built but you can check that
sample and let us know if you need more details.
>
> public boolean fetch(){
> QueryRun LocalQuery = new QueryRun(this);
>
> if (element.prompt() && LocalQuery.prompt()){
> // clicked OK
> return true; //message appear
> }
>
> // Clicked cancel
>
> return false; //no message
> }
>
> regards,
>
> Steeve...
>
>
> -----Message d'origine-----
> De�: k_otickashka [mailto:[EMAIL PROTECTED]
> Envoy�: 5 juillet 2004 11:22
> ��: [EMAIL PROTECTED]
> Objet�: [development-axapta] How to cancel a report
>
> I am trying to build a report based on two ranges. If the range
does
> not entered, I would like the an infolog to appear and the report
> aborted. I got that part to work by modifying the fetch method and
> checking the value of the range but if the user selects "Cancel",
the
> infolog still appears. How can I tell the report not to display
that
> message if the user clicks cancel?
Yahoo! Groups Links
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

