Passing combobox have ENUMTYPE from a form to a report

first thing in the init() method of the report yout getting the combobox value…check that once…

sorry for late

how i getting the combobox value…check

which function i need to write in init() method

thanks for help

hi mr Naresh Kolli

i don’t no u said when i declare the s in class declaration i can use the s value and it read from init() method

if u remember we write like this in parameter function

S = element.args().parm();

i hope to help

thanks for u help

hi Naresh Kolli

could pls answer my last 2 question

thanks for ur help

Naresh Kolli

maybe i find what the wrong

in click void clicked()

we have 2 parameter

1- args.parm(EN_AR.valueStr()); combobox parameter

2- args.parm(CheckIssue.CheckIssueRef); serial_no parameter

in our code we Write like this

void clicked()
{ str sNote_Ref ;
str sEnum ;
int nCoun_Check ;

CHECK_NUMBER_TABLE CHECK_NUMBER_TABLE1;

SUM_CASHISSUEDETAIL_View5 CheckIssue1 ;
Args args = new args();

ReportRun reportRun;
;

while select * from CHECK_NUMBER_TABLE1
where CHECK_NUMBER_TABLE1.CheckNumber == CheckIssue.CheckNumber

nCoun_Check=CHECK_NUMBER_TABLE1.count_check ;

if ( nCoun_Check >= 1 )

{
if(EN_AR.valueStr() ==‘EN’){
box::warning(“This Report Was Print.”,“PRINT”,“Help text”);
}
else
{
box::warning(‘تم طباعة هذا التقرير مسبقاً’,‘الطباعة’);
}
}
else
{
while SELECT CheckIssueRef from CheckIssue1 where CheckIssue1.CheckIssueRef==CheckIssue.CheckIssueRef

sNote_Ref = CheckIssue.CheckIssueRef ;

//+
args.parm(EN_AR.valueStr()); -----------\\\ first argoment from combobox ----------- ------ ------ ----- -

args.parm(CheckIssue.CheckIssueRef); -----------\\\ sec argoment from serial_no----------- ------ ------ ----- -
nfo(args1.parm());
// info(EN_AR.text()) ;
// info(num2str(EN_AR.,0,0,0,0));

// if(EN_AR.valueStr() ==‘EN’){
args.name(reportstr(CHECKISSUE_Report));
// }
// else {args.name(reportstr(CHECKISSUE_Report));}

reportRun = classFactory.reportRunClass(args);
reportRun.init();
reportrun.run();

super();
}}

in code reading last argoment-parm mean secn

i make test whith info to see i put info function like this

args.parm(EN_AR.valueStr()); -----------\\\ first argoment from combobox ----------- ------ ------ ----- -

info(args1.parm());

args.parm(CheckIssue.CheckIssueRef); -----------\\\ sec argoment from serial_no----------- ------ ------ ----- -

in messag box give me value from combobx

but if i put info function after 2 argment like this give me sec argment

args.parm(EN_AR.valueStr()); -----------\\\ first argoment from combobox ----------- ------ ------ ----- -

args.parm(CheckIssue.CheckIssueRef); -----------\\\ sec argoment from serial_no----------- ------ ------ ----- -

info(args1.parm());

in messag box give me value from serial -no

that mean parameter s pass the serial no becuse when i made if statement give me only after else it readin the parameter from s

serial -no field not from combobox

how we can read the 2 parameter from form to report 1 from combobox to s

other one from serial -no field together and send to report

thanks for help

HI Bas,

Hi Bas,

in the clicked method…

args.parm(comboBox.valustr()); //passing the combobox value

args.record(CheckIssue) // passing the table record so in the init method you can get the table buffer so there you use tablename.checkIssueRef

in the init method

s = element.args.parm() //getting the combobox value and storing in the global variable

locCheckIssue = element.args.record; //declare the table buffer of [CheckIssue locCheckIssue] in the init method and assigning the record to that buffer…

**this.query().dataSourceTable(tablenum(CheckIssue)) .addRange(fieldnum(CheckIssue,CheckIssueRef )).value(**locCheckIssue .CheckIssueRef);

try this it will work…

Naresh Kolli…

First, I’m sorry to bother you

but i have problem maby i have something miss understand

i make tow reports to give me the right resault

1 - first report reading AR from cobobox in arabic

iCheckAmount = SUM_CASHISSUEDETAIL_View5.SumOfAmount ;
sTafqeet = Global::numeralsToTxt_AR_LA(iCheckAmount);

2 - sec report reading EN from cobobox

iCheckAmount = SUM_CASHISSUEDETAIL_View5.SumOfAmount ;
sTafqeet = Global::numeralsToTxt_EN(iCheckAmount);

2 repot i want to but in function pls help to found miss understand u said for me

i can use s from Declaration class to use

if statmen like this

if (s =‘AR’)

{

iCheckAmount = SUM_CASHISSUEDETAIL_View5.SumOfAmount ;
sTafqeet = Global::numeralsToTxt_AR_LA(iCheckAmount);

}

else

{

iCheckAmount = SUM_CASHISSUEDETAIL_View5.SumOfAmount ;
sTafqeet = Global::numeralsToTxt_EN(iCheckAmount);

}

but s coming empty and reding only after else

i am sorry again to bother you

but i need ur help & finsh this problem

thank for ur help

hi Naresh Kolli…

hi mr

i change every thing u write here

in the clicked method…

args.parm(comboBox.valustr()); //passing the combobox value

args.record(CheckIssue) // passing the table record so in the init method you can get the table buffer so there you use tablename.checkIssueRef

in the init method

s = element.args.parm() //getting the combobox value and storing in the global variable

locCheckIssue = element.args.record; //declare the table buffer of [CheckIssue locCheckIssue] in the init method and assigning the record to that buffer…

**this.query().dataSourceTable(tablenum(CheckIssue)) .addRange(fieldnum(CheckIssue,CheckIssueRef )).value(**locCheckIssue .CheckIssueRef);

try this it will work…

about display str amt2txt() the problem it in this function we i call report

no need to change any thing in this function

public class ReportRun extends ObjectRun

{

str S ; here i declare S to make value and to complected call parameter (args.parm(comboBox.valustr());) in display str amt2txt()

} to S

display str amt2txt()

{str ParmCaller ;

str sTafqeet;

int iCheckAmount ;

while SELECT SumOfAmount from SUM_CASHISSUEDETAIL_View5

where SUM_CASHISSUEDETAIL_View5.CheckIssueRef==CheckIssue.CheckIssueRef

if (S==‘AR’){

iCheckAmount = SUM_CASHISSUEDETAIL_View5.SumOfAmount ;

sTafqeet = Global::numeralsToTxt_AR_LA(iCheckAmount);

}

else

{

iCheckAmount = SUM_CASHISSUEDETAIL_View5.SumOfAmount ;

sTafqeet = Global::numeralsToTxt_EN(iCheckAmount);

}

CheckIssue_BeneficiaryName.alignment(1);

return sTafqeet;

}

pls if u see any change need to add in this function send to me to make right function

thank u for every help and i am so sorry agian

i am a new in this lang becu i have many question and miss under stand

hi mr .Naresh Kolli…

hi mr .Naresh Kolli…

did u check my question no need to change in 2 this function

if function is right way no result

thanks for help

hi mr .Naresh Kolli…

hi mr .Naresh Kolli…

i thing this will last question here pls

this will last step in this question

maybe u have more Experience in this language u

why no answer

thanks for ur help

Hi.

To get combobox selected value, try it by writing your code in combobox modified method as

public boolean modified()
{
boolean ret;

ret = super();
info(this.valueStr());
return ret;
}