Dear Friends,
I am facing the below error can some body please help me solving it.
the above error pops up when i am clicking a menu item button which is calling a report but the report is called via class which has this report in its lastvalueelement name.
now the class already contains the parmfromdate function still it is throwing me the above error
please help me out, thanks in advance.
Hi,
What happens if you comment the call to parmFormDate() method in your report’s init()?
regards,
Thomas
dm79
July 31, 2012, 10:44am
3
I am guessing you are trying to pass in the formRun object to the report generation class?
In that case, try make the variable as type “Object” instead of “FormRun”,
i.e.
Object formRef; // Instead of: FormRun formRef
it opens up the report dialog and shows report is empty since no from and to date is not found.
the report already is in this way
public class ReportRun extends ObjectRun
and in the init method of the report
this is written
InvoiceCheckList = new ITL_POD_InvoiceCheckListReport();
InvoiceCheckList = element.args().caller();
fromdate = InvoiceCheckList.parmFromDate();
todate = InvoiceCheckList.parmToDate();
where ITL_POD_InvoiceCheckListReport() is my class
the report already is in this way
public class ReportRun extends ObjectRun
and in the init method of the report
this is written
InvoiceCheckList = new ITL_POD_InvoiceCheckListReport();
InvoiceCheckList = element.args().caller();
fromdate = InvoiceCheckList.parmFromDate();
todate = InvoiceCheckList.parmToDate();
where ITL_POD_InvoiceCheckListReport() is my class
where should i try make the variable as type “Object” instead of “FormRun”,
i.e.
Object formRef; // Instead of: FormRun formRef
OPiiPO
July 31, 2012, 11:42am
7
Hi,
What happens if you comment the .parmFromDate();? Will you get the same message for .parmToDate(); ?
Regards,
OPi
no it opens the dialog … no error nothing but then from where would i get the from date and to date to run the report?
i found one thing it is that element is picking up formrun object instead of reportrun how can i make the element pickup the object reportrun rather than formrun
OPiiPO
July 31, 2012, 2:15pm
10
Hi,
Maybe you can pass them from other parts of the report or the caller.
OPiiPO
August 1, 2012, 10:11am
12
Hi,
What happens if you substitute the new object with a simple ITL_POD_InvoiceCheckListReport InvoiceCheckList declaration?
dm79
August 2, 2012, 5:51am
13
I guess this is where “InvoiceCheckList” becomes formRun?
You assigned the caller form to the variable invoiceCheckList, maybe that’s why the parm methods are not found.
(I assume the parm methods are in ITL_POD_InvoiceCheckListReport class)
yes dm79 you are absolutely right, thats what i am searching for how to make “InvoiceCheckList” to become reportRun can u suggest something?
Axapta 3.0
the below lines of code is written in the init method of the report.
ITL_POD_InvoiceCheckListReport = new ITL_POD_InvoiceCheckListReport();
ITL_POD_InvoiceCheckListReport = element.args().caller();
fromdate = ITL_POD_InvoiceCheckListReport.parmFromDate(); → throwing the above screened error here where it changes from reportRun to formRun
dm79
August 3, 2012, 2:21am
17
Hmm, maybe send me an email with the project/objects?