[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

How to launch a class (extended from RunbaseReport) from a form ?

Dave

2/9/2006 12:58:00 AM

Dear all,
I have a class that extended from RunBaseReport. And I want to pass some
parameter from form to that class (to use in the report).
I did this way :
SCA_ShippingAdvice shippingAdvice;
;
shippingAdvice = new
SCA_ShippingAdvice(SCA_ShipTable::find(SCA_ShipJour.ShipNum).CustAccount);
shippingAdvice.init();
shippingAdvice.run();
when clicked the button to invoke the report, I got this msg :
error excuting code : PrintJobSettings object not initialised.
Can anyone know why, and have a sample code ?
Thanks a lot
3 Answers

KS

2/9/2006 7:37:00 AM

0

Your problem is mostly like due to that you did not add
shippingAdvice.prompt();

There are lot of examples in the standard code, try to have a look at for
example the main method of the class LedgerReport_CheckTrans for a
straightforward example

Also keep in mind that since you are extending RunbaseReport you need to add
pack and unpack methods.


"Vy" wrote:

> Dear all,
> I have a class that extended from RunBaseReport. And I want to pass some
> parameter from form to that class (to use in the report).
> I did this way :
> SCA_ShippingAdvice shippingAdvice;
> ;
> shippingAdvice = new
> SCA_ShippingAdvice(SCA_ShipTable::find(SCA_ShipJour.ShipNum).CustAccount);
> shippingAdvice.init();
> shippingAdvice.run();
> when clicked the button to invoke the report, I got this msg :
> error excuting code : PrintJobSettings object not initialised.
> Can anyone know why, and have a sample code ?
> Thanks a lot

Dave

2/9/2006 8:29:00 AM

0

Thanks a lot, KS
I've got it

"KS" wrote:

> Your problem is mostly like due to that you did not add
> shippingAdvice.prompt();
>
> There are lot of examples in the standard code, try to have a look at for
> example the main method of the class LedgerReport_CheckTrans for a
> straightforward example
>
> Also keep in mind that since you are extending RunbaseReport you need to add
> pack and unpack methods.
>
>
> "Vy" wrote:
>
> > Dear all,
> > I have a class that extended from RunBaseReport. And I want to pass some
> > parameter from form to that class (to use in the report).
> > I did this way :
> > SCA_ShippingAdvice shippingAdvice;
> > ;
> > shippingAdvice = new
> > SCA_ShippingAdvice(SCA_ShipTable::find(SCA_ShipJour.ShipNum).CustAccount);
> > shippingAdvice.init();
> > shippingAdvice.run();
> > when clicked the button to invoke the report, I got this msg :
> > error excuting code : PrintJobSettings object not initialised.
> > Can anyone know why, and have a sample code ?
> > Thanks a lot

Marcel Veldhuijzen

2/20/2006 8:39:00 AM

0

Maybe you can do it like this:

Add a boolean field to both the invoice table and the invoice line table
that corresponds to the value of the checkboxes.

Then you add a method to the invoice datasource (onchange method on the
boolean field) on the form and in this method you simply set the value of the
new boolean fields of the invoice lines to true (by walking to the datasource
of the invoice lines).
--
Een kleinigheidje hou je toch


"Vy" wrote:

> Dear all,
> I have a class that extended from RunBaseReport. And I want to pass some
> parameter from form to that class (to use in the report).
> I did this way :
> SCA_ShippingAdvice shippingAdvice;
> ;
> shippingAdvice = new
> SCA_ShippingAdvice(SCA_ShipTable::find(SCA_ShipJour.ShipNum).CustAccount);
> shippingAdvice.init();
> shippingAdvice.run();
> when clicked the button to invoke the report, I got this msg :
> error excuting code : PrintJobSettings object not initialised.
> Can anyone know why, and have a sample code ?
> Thanks a lot