I just need to just do a check on the user's query and if the
condition holds true that is if a receipt exists for that account and
the user enters a receipt number for the range then the report is
printed if not an error is issued and the report is aborted. Also if
a receipt does not exist for that account then a new receipt number
is created for the user and printed.
=====================================================================

--- In [EMAIL PROTECTED], "Steeve Gilbert"
<[EMAIL PROTECTED]> wrote:
> I don't know how to make a field mandatory on a query form.
>
> 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
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to