hi all
i have form have combobox and this combobox read data from ENUM type function and the data is choice 2
option
1- AR (arbic lang)
2-EN (english ang)
what i need
1-when i choose the AR that mean i choose Global::numeralsToTxt_AR_LA(iCheckAmount);
if -EN (english ang) mean i choose Global::numeralsToTxt_en(iCheckAmount);
but in report not in form i have summation num i need to change to the word in the report
see this code what i write and same one help me To get to it
in button in form i write like this
void clicked()
{ str sNote_Ref ;
str sEnum ;
SUM_CASHISSUEDETAIL_View5 CheckIssue1 ;
Args args = new args();
ReportRun reportRun;
;
while SELECT CheckIssueRef from CheckIssue1 where CheckIssue1.CheckIssueRef==CheckIssue.CheckIssueRef
sNote_Ref = CheckIssue.CheckIssueRef ;
//******here i define what is inside combobox to parameter my problem i cant pass to the report ************************************////////////////////
if (EN_AR.selection() == EN_AR_ENUMS::ar )
{
args.parm(‘AR’);
args.caller(EN_AR);
}
else {
args.parm(‘EN’);}
// info(sNote_Ref);
//+
args.parm(CheckIssue.CheckIssueRef);
// info(EN_AR.text()) ;
// info(num2str(EN_AR.,0,0,0,0));
args.name(reportstr(CHECKISSUE_Report));
reportRun = classFactory.reportRunClass(args);
reportRun.init();
reportrun.run();
super();
}
in report i create display str amt2txt()
1-to create Control string in report to use the method to show me number to word text from Global class numeralsToTxt_AR_LA or numeralsToTxt_en
i write code like this
display str amt2txt()
{str ParmCaller ;
str sTafqeet;
int iCheckAmount ;
Args args = new args();
while SELECT SumOfAmount from SUM_CASHISSUEDETAIL_View5
where SUM_CASHISSUEDETAIL_View5.CheckIssueRef==CheckIssue.CheckIssueRef
//if(SUM_CASHISSUEDETAIL_View5.combobox(it is the enum right) == Enum::ar)
//{sTafqeet = Global::numeralsToTxt_AR_LA(iCheckAmount); }
//if (EN_AR.selection() == EN_AR_ENUMS::ar )
// {
if(element.args().parm(‘AR’ )==Args.parm(‘AR’))
{info( ‘AR’ );
iCheckAmount = SUM_CASHISSUEDETAIL_View5.SumOfAmount ;
sTafqeet = Global::numeralsToTxt_AR_LA(iCheckAmount);}
else {
info(element.args().parm(‘EN’ ));
iCheckAmount = SUM_CASHISSUEDETAIL_View5.SumOfAmount ;
sTafqeet = Global::numeralsToTxt_EN(iCheckAmount);
}
//}
//else
//{
//iCheckAmount = SUM_CASHISSUEDETAIL_View5.SumOfAmount ;
//sTafqeet = Global::numeralsToTxt_EN(iCheckAmount);
//}
// sTafqeet = Global::numeralsToTxt_AR_LA(iCheckAmount);
CheckIssue_BeneficiaryName.alignment(1);
return sTafqeet;
}
and in report must be show it by Serial number specific i write in init function and passing from form to report
code like this
public void init()
{
;
try
{
if(element.args().parm())
{
this.query().dataSourceTable(tablenum(CheckIssue))
.addRange(fieldnum(CheckIssue,CheckIssueRef )).value(element.args().parm());
this.query().userUpdate(false);
this.query().interactive(false);
super();
}
}
catch(exception::Error)
{
// info(“Error in init method”);
}
}
//****** my problem i cant pass to the report what is inside combobox ************************************////////////////////
i hope to help me
thanks all