[Axapta-Knowledge-Village] Re: Calling many reports from LastValueElementName()
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 [EMAIL PROTECTED] 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.parfromDateX) 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.300117 6/D=gr oups/S=1705001380:HM/EXP=1107973160/A=2532114/R=2/SIG=12kp6h04c/*http: /clk.a tdmt.com/NFX/go/yhxxxnfx002014nfx/direct/01/time=1107886760730615 http://view.atdmt.com/NFX/view/yhxxxnfx002014nfx/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.
Re: [Axapta-Knowledge-Village] Unreserve and reserve by code
Hi, I am able to find a perticular transaction from my transfer journal i need to un reserve and succeeded in unreserving the quantity. Here is the code i used for un reserving : - InventMovement = ItnventTrans::findTransId(01).inventmovement(true); InventUpd_Reservation = InventUpd_Reservation::newInventDim(Inventmovement,inventTrans.inventDim(),qty,true); inventUpd_Reservation.updatenow(); - Ultimately this calls to the methods UpdateReserveLess() or updateReserveMore() of class InventUpd_Reservation based on the +ve or -ve qty passed. When i pass a +ve qty , it calls the method UpdateReserveLess() and unreserves the quantity for that transaction .Hence success in unreserving a perticular transaction. But when i pass a -ve quantity , to again reserve it calls the method updateReserveMore() and consequently throws a error saying The cursor is invalid for instantiating recordviewCache and this throws from the method viewCacheInventTransId() . I am not able to understand the contents and call of this class and why it throws error , when i call through code. Can any one please explain me on this method and error? Any help on this will be greately appriciated. Thanks and Regards Akash --- Akash [EMAIL PROTECTED] wrote: Hi All, I have an item having quantity 1000.00 locates at one warehouse MW1 that is reserved. I want to transfer the 1000.00 quantity from warehouse MW1 to warehouse GW , hence first i need to unreserve the quantity and then transfer and then reserve the quantity against warehouse GW . I need to make this unreserve and reserve through code during the transfer journal. Is any one have done this earlier and is any side effects by doing this? Any help will be greatly appriciated. Thanks and Regards Akash Get your own web address. Have a HUGE year through Yahoo! Small Business. http://smallbusiness.yahoo.com/domains/?p=BESTDEAL Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. http://advision.webevents.yahoo.com/mailbeta/features_spam.html
[Axapta-Knowledge-Village] Re: Temporary Table in report
Hi Arijit, I've already downloaded the sample code for the temporary table in report. The sample work great. However my concern is how to apply it to my own scenario. I have a report that populate the temp table from a buildquery method of the class that is extended from runbasereport. I can not apply the same code in the sample xpo to my actual program it is giving me error. The sample code is Public boolean fetch { boolean ret; queryRun qr; FormDataSource formDataSource; TRG_TempTable TRG_TempTable; query q = new query(element.query()); ; if (templTableReport) qr= new query(this.queryRun().setRecord(tempTableReport. .parmTempTable())); qr= new QueryRun(q); while (qr.next()) { element.send(TRG_TempTable); } return ret; My program code look like this. Public boolean Fetch() { I have some variable init here qr = new QueryRun(MYclass.buildquery()); this.queryRun(qr); while (qr.next) { element.send(Table1); } return } MYclass is the class with dialog buildquery - populate the temp table how can I change the code qr = new QueryRun(MYclass.buildquery()); to qr= new query(this.queryRun().setRecord(tempTableReport. .parmTempTable())); Thanks, Patrick --- In Axapta-Knowledge-Village@yahoogroups.com, chuapatrickd [EMAIL PROTECTED] wrote: Hi Arijit, Thanks for the reply. I'll check this site and let you know what happen. regards, Patrick --- In Axapta-Knowledge-Village@yahoogroups.com, Arijit Basu arijit.basu@ wrote: Hi, Check out this link on temp tables in Reports. http://www.axaptapedia.com/index.php/Temporary_tables There are XPO downloads here. Lemme know if it helped Cheers Arijit http://daxguy.blogspot.com/ On 1/22/07, chuapatrickd chuapatrickd@ wrote: Hi to All, I'm trying to use a temporary table as data source for my report. However after populating it with the desired data, the report would have no data in it. What I did is to make the temp table as permanent. This time, the report did print ok with the selected customer. My problem is if there are more than 1 user who will print the same report. The problem I foresee is that the selectec customer for first user will be overriden by the second users. This result in an incorrect output. How will I be able to solve this problem? any idea will be greatly appreciated. How come that the temp does not store the data in the report ? regards, Patrick -- Arijit Basu [Non-text portions of this message have been removed]
[Axapta-Knowledge-Village] Re: Date to String Conversion
Hi Imthiyaz Ahamed, Pls look at this site about date conversion. You can use the format as explained below and maybe you an just add new function to concatenate the th or rd to make the day appear as 25th or 3rd. the logic will be similar to this: if the day more than 3 - you add th as in 5th,6th... 19th if the day is 3 - you add rd as in 3rd if the day is 2 - you add nd as in 2nd if the day is 1 - you add st as in 1st You can visit below site for more info about date2str function. http://www.axaptapedia.com/User_talk:Patrickchuad --- In Axapta-Knowledge-Village@yahoogroups.com, Imthiyaz Ahamed [EMAIL PROTECTED] wrote: Hi Siva, Thanks for your Reply. It is vey useful for me, But My requirement is little bit more. i.e instead of January/23/2007, I wish to print January 23rd, 2007 like this. If it is January/25/2007, it should be January 25th, 2007. Is it possible by using this function. If u explain what are the meanings of 213,1,4, it may be very helpful for me. Once again million of Thanks to u. Regards, Imthiyaz Ahamed - Original Message From: Siva kumar [EMAIL PROTECTED] To: Axapta-Knowledge-Village@yahoogroups.com Sent: Thursday, January 25, 2007 9:15:04 AM Subject: Re: [Axapta-Knowledge-Village] Date to String Conversion Hi you can use the inbuild function Date2Str() E.g date2str(today( ),213,1,4, 4,4,4); It prints January/25/2007 It may help you.. Thanks, Siva Imthiyaz Ahamed imthiyazahamed_ [EMAIL PROTECTED] com wrote: Hi Group, In one of my Report, I wish to display date in string format. For Example If Date is 24/01/2007, I want it should be January 24th, 2007. What code I need to write? or any Built-in function is already in Axapta. If so, Please convey that function or what kind of code I need to write? Please Advice on this. Kind Regards, Imthiyaz Ahamed.A _ _ _ _ _ _ Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. http://advision. webevents. yahoo.com/ mailbeta/ features_ spam.html [Non-text portions of this message have been removed] We Born to Win... - - --- It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. [Non-text portions of this message have been removed] __ __ Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 [Non-text portions of this message have been removed]
[Axapta-Knowledge-Village] Help me out!
In one of my reports I need to sort one of my field in ascending order, I have already used the group by clause in my select query so it is not allowing me to use the order by clause along with that. Can anybody suggest me anyway to do it.
Re: [Axapta-Knowledge-Village] Jobs disappear from batch list
What do you mean with disappear? Have you try to inquiry the Batch List form using different status? At the top left of Basic - Inquiry - Batch List form you have a show status combo box, have you try to inquiry the form with Ended status. The status of a job that successfully executed changes from waiting to ended, therefore it doesnt appear anymore when you open your form. Or have you try to search the job using table browser? I dont thing that your job would just vanish without explanation. Regards, Kristanto optimateuwe [EMAIL PROTECTED] wrote: We have jobs that periodically disappear from the batchlist after successfully running for several days, they just seem to disappear. Furthermore we have the Databaselog acitivated to log deletion of batch records, byt nothing is seen in the log We are using AX 3.0 on SQL Server. Anyone who can help? - Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get things done faster. [Non-text portions of this message have been removed]
[Axapta-Knowledge-Village] Re: Calling many reports from LastValueElementName()
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.parfromDateX) 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/yhxxxnfx002014nfx/direct/01/time=110788676073061 5 http://view.atdmt.com/NFX/view/yhxxxnfx002014nfx/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.
[Axapta-Knowledge-Village] Temporary table
Hi, I've used temp table to store temporary the data before it goes to the printer. My problem is that the generation of the table takes too long aroune 20 minutes. But when I run a stored proce, it takes only less than few 5 minutes. Is Ax temp table really slow ? is there a better way of doing it. I've read about the recordinsertlist but can't quite understand it. can anyone explain in very simple way how it works ? can it replace temp table in report ? thanks, patrick
[Axapta-Knowledge-Village] Re: Date to String Conversion
Hi Imthiyaz Ahamed, Pls visit this site for more info on date2str. http://www.axaptapedia.com/User_talk:Patrickchuad on your requirement I think you just create a class that will add the suffix to day of the month. The logic will be as follows: if the day is greater than 5 then add st as in 25th,4th,25th if the day is 3 - add rd as in 3rd,23rd,63rd if the day is 2 - add nd as in 2nd,92rd if the day is 1 - add st as in 41st,61st regards, patrick --- In Axapta-Knowledge-Village@yahoogroups.com, Imthiyaz Ahamed [EMAIL PROTECTED] wrote: Hi Siva, Thanks for your Reply. It is vey useful for me, But My requirement is little bit more. i.e instead of January/23/2007, I wish to print January 23rd, 2007 like this. If it is January/25/2007, it should be January 25th, 2007. Is it possible by using this function. If u explain what are the meanings of 213,1,4, it may be very helpful for me. Once again million of Thanks to u. Regards, Imthiyaz Ahamed - Original Message From: Siva kumar [EMAIL PROTECTED] To: Axapta-Knowledge-Village@yahoogroups.com Sent: Thursday, January 25, 2007 9:15:04 AM Subject: Re: [Axapta-Knowledge-Village] Date to String Conversion Hi you can use the inbuild function Date2Str() E.g date2str(today( ),213,1,4, 4,4,4); It prints January/25/2007 It may help you.. Thanks, Siva Imthiyaz Ahamed imthiyazahamed_ [EMAIL PROTECTED] com wrote: Hi Group, In one of my Report, I wish to display date in string format. For Example If Date is 24/01/2007, I want it should be January 24th, 2007. What code I need to write? or any Built-in function is already in Axapta. If so, Please convey that function or what kind of code I need to write? Please Advice on this. Kind Regards, Imthiyaz Ahamed.A _ _ _ _ _ _ Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. http://advision. webevents. yahoo.com/ mailbeta/ features_ spam.html [Non-text portions of this message have been removed] We Born to Win... - - --- It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. [Non-text portions of this message have been removed] __ __ Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 [Non-text portions of this message have been removed]
RE: [Axapta-Knowledge-Village] Help me out!
I have never tried this before, but you might be able to build a query from a query. So for example: Query1 = Order By DataSet Query2 = Built from Query 1, Group by the DataSet I also thought you could Order and Group By within X++ SQL Statements... thanks, J. Brandon George Senior Technical Architect Sunrise Technologies, Inc. http://www.sunriseconsult.com Cell: 706-412-7726 Office: 336-722-6741 http://www.sunriseconsult.com/ http://www.sunriseconsult.com/ From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of pankaj_dbc Sent: Thursday, January 25, 2007 12:46 AM To: Axapta-Knowledge-Village@yahoogroups.com Subject: [Axapta-Knowledge-Village] Help me out! In one of my reports I need to sort one of my field in ascending order, I have already used the group by clause in my select query so it is not allowing me to use the order by clause along with that. Can anybody suggest me anyway to do it. [Non-text portions of this message have been removed]
RE: [Axapta-Knowledge-Village] Help me out!
hi pankaj_dbc, please post your code so that you will be helped -subbu Brandon George [EMAIL PROTECTED] wrote: I have never tried this before, but you might be able to build a query from a query. So for example: Query1 = Order By DataSet Query2 = Built from Query 1, Group by the DataSet I also thought you could Order and Group By within X++ SQL Statements... thanks, J. Brandon George Senior Technical Architect Sunrise Technologies, Inc. http://www.sunriseconsult.com Cell: 706-412-7726 Office: 336-722-6741 http://www.sunriseconsult.com/ http://www.sunriseconsult.com/ From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of pankaj_dbc Sent: Thursday, January 25, 2007 12:46 AM To: Axapta-Knowledge-Village@yahoogroups.com Subject: [Axapta-Knowledge-Village] Help me out! In one of my reports I need to sort one of my field in ascending order, I have already used the group by clause in my select query so it is not allowing me to use the order by clause along with that. Can anybody suggest me anyway to do it. [Non-text portions of this message have been removed] - Everyone is raving about the all-new Yahoo! Mail beta. [Non-text portions of this message have been removed]
Re: [Axapta-Knowledge-Village] Date to String Conversion
An example... some functions. transdate KikeDate = systemdateget(); ; info(strfmt(%1 %2th, %3,mthname(mthOfyr(KikeDate)), dayofmth(KikeDate), year(KikeDate))); Saludos. On 1/25/07, Imthiyaz Ahamed [EMAIL PROTECTED] wrote: Hi Siva, Thanks for your Reply. It is vey useful for me, But My requirement is little bit more. i.e instead of January/23/2007, I wish to print January 23rd, 2007 like this. If it is January/25/2007, it should be January 25th, 2007. Is it possible by using this function. If u explain what are the meanings of 213,1,4, it may be very helpful for me. Once again million of Thanks to u. Regards, Imthiyaz Ahamed - Original Message From: Siva kumar [EMAIL PROTECTED] mgsivani%40yahoo.com To: Axapta-Knowledge-Village@yahoogroups.comAxapta-Knowledge-Village%40yahoogroups.com Sent: Thursday, January 25, 2007 9:15:04 AM Subject: Re: [Axapta-Knowledge-Village] Date to String Conversion Hi you can use the inbuild function Date2Str() E.g date2str(today( ),213,1,4, 4,4,4); It prints January/25/2007 It may help you.. Thanks, Siva Imthiyaz Ahamed imthiyazahamed_ [EMAIL PROTECTED] com wrote: Hi Group, In one of my Report, I wish to display date in string format. For Example If Date is 24/01/2007, I want it should be January 24th, 2007. What code I need to write? or any Built-in function is already in Axapta. If so, Please convey that function or what kind of code I need to write? Please Advice on this. Kind Regards, Imthiyaz Ahamed.A _ _ _ _ _ _ Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. http://advision. webevents. yahoo.com/ mailbeta/ features_ spam.html [Non-text portions of this message have been removed] We Born to Win... - - --- It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. [Non-text portions of this message have been removed] __ Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 [Non-text portions of this message have been removed] -- Lic. Luis Enrique Martínez Peña Analista Programador Axapta Consultor Sistemas Web Off. (81) 8335 0620 ext 8564 http://www.it-soluciones.com.mx [Non-text portions of this message have been removed]
[Axapta-Knowledge-Village] How to update InventTrans After Inventory Closing Process AX3.0?????
Hi to everybody. I have a big problem to update InventTrans when the periods have been closed with InventoryClosing. This is the example, i'm running a new development call it Monetary Correction, this development search and select on InventTrans all transactions with ValueOpen == Yes. This transactions conforms the stock for an specific Item, so, this transactions must be updated using the updateNow method from InventTransAdjust class with certain criteria including the amount of the adjust. This procedure will adjust the transaction on multiple fields, but when it tries to update the transaction, throws an error that says that the transaction can not be updated because the period has been closed. What can i do??? Because i have to run InventoryClosing to reduce the number of transactions that i have to update, if not, the process can take more than 24 hours with 2'800.000 transactions and it will adjust transactions that doesn't need to be updated. Please help me with this. And Sorry for mi English jejeje :D Att: Gustavo Camargo