Hi Patrick,

If you plan to initialize your report from menu/menuitems, then you 
should configure two almost identical menuitems, one with a 
parameter configured and one without parameter or a different 
parameter. These parameters are automatically send as Args-object 
parameters to the reportrun object (the object which executes the 
report behind the scenes).

Below is an example with a two design report. I no arguments is 
passed then is selects default (ReportDesign1). If parameter is 
passed then the ReportDesign2 two is selected. I have not tested it, 
but I think it should work.


public void init()
{
    ;

    super();

    if (element.args().parm())
    {
        info(element.args().parm());
        element.design("ReportDesign2");
    }

}

Best regards
Lars


<[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> can you give me sample code of the INIT method of the report that 
can 
> select specific design based on parameter ? I have a requirement 
that 
> there are two differen design of the report, one is detailed 
report 
> and the other is just a summary report.
> 
> 
> Thanks,
> Patrick
> 
> 
> --- In Axapta-Knowledge-Village@yahoogroups.com, "Preston A. 
Larimer" 
> <palarimer@> wrote:
> >
> > What is really different in the reports you are wanting to call, 
is 
> it
> > logic, or just layout?  If it's layout you might think about 
adding 
> multiple
> > designs to a single report, then in the init method of the 
report 
> you can
> > set the design based on parameters in the calling class.  If 
it's 
> truly
> > different logic that you need to implement out side of the 
design 
> level then
> > you could have a dialog class that gathers the user parameters, 
> then calls
> > the appropriate report class, setting the parameters on the 
report 
> class
> > form you dialog class and skipping the prompt call, not fun but 
> doable
> > 
> >  
> > 
> > -Preston
> > 
> >  
> > 
> >   _____  
> > 
> > From: abdulabsi [mailto:[EMAIL PROTECTED] 
> > Sent: Tuesday, February 08, 2005 1:19 PM
> > To: Axapta-Knowledge-Village@yahoogroups.com
> > Subject: [Axapta-Knowledge-Village] Calling many reports from
> > LastValueElementName()
> > 
> >  
> > 
> > 
> > hi all I hav ethi cenario
> > 
> > -Class A extends Class B
> > -Class B extends class runBAsereport.
> > 
> > Class B has many mehtod s for creating dialog and some options 
to 
> be 
> > entered by the end user.
> > 
> > The dialog fields are frmDate,toDate.
> > 
> > I hav parmFrmDate() method in class B that rturn the frmDate 
value 
> > entered by the user.
> > 
> > I want to use this value in the lastValueElementName() to call 
the 
> > correct report: 
> > A.lastValueElementName() code may look like
> > 
> > {
> > if(this.parfromDate>=X) return reportStr(report1);
> > else (this.parfromDate<X) return reportStr(report2);
> > }
> > the problem I traced the methods execution sequence and I found 
> that 
> > LastValueElementName() is called befor the user entered the 
> > dates,which make parmFrmDate() return null which will make the 
> class 
> > allways calling report2 regardless of the date.(sonce Date==null)
> > which is allways <enteredDate.
> > 
> > I am looking for a solution that makes LAStValueElementName() 
gets 
> > the correct values of date,then do the comparison...
> > 
> > Appreciate your time and help
> > 
> > Abdul. Absi
> > FanarIT...
> > 
> > 
> > 
> > 
> > 
> > Sharing the knowledge on Axapta. 
> > 
> > 
> > 
> > 
> > 
> > 
> > Yahoo! Groups Sponsor
> > 
> > 
> > 
> > ADVERTISEMENT
> >  
> > 
> 
<http://us.ard.yahoo.com/SIG=129fod528/M=298184.6018725.7038619.30011
7
> 6/D=gr
> > 
> 
oups/S=1705001380:HM/EXP=1107973160/A=2532114/R=2/SIG=12kp6h04c/*http
:
> /clk.a
> > 
> 
tdmt.com/NFX/go/yhxxxnfx0020000014nfx/direct/01/&time=110788676073061
5
> > 
> > 
> >  
> > 
> 
<http://view.atdmt.com/NFX/view/yhxxxnfx0020000014nfx/direct/01/&time
=
> 110788
> > 6760730615> 
> > 
> > 
> >  
> > <http://us.adserver.yahoo.com/l?
> M=298184.6018725.7038619.3001176/D=groups/S=
> > :HM/A=2532114/rand=322319344> 
> > 
> >  
> > 
> >   _____  
> > 
> > Yahoo! Groups Links
> > 
> > *   To visit your group on the web, go to:
> > http://groups.yahoo.com/group/Axapta-Knowledge-Village/
> >   
> > *   To unsubscribe from this group, send an email to:
> > [EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]
> subject=Unsubsc
> > ribe> 
> >   
> > *   Your use of Yahoo! Groups is subject to the Yahoo!
> > <http://docs.yahoo.com/info/terms/>  Terms of Service.
> >
>


Reply via email to