micku_100
15th March 2007, 09:13
Hi,

I have a form-2 type havine Prod Order no. on the form & its ordered/Delivered/backflushed quantity fields . A the end i have check box to select the SFC Order.

In the script how do i select only checked SFC Order.?
how can I link SFC Order record and check box.

How do I deal with check box and get the relevant selected record.?

Regards,
Nilesh

bdittmar
15th March 2007, 10:08
Hi,

I have a form-2 type havine Prod Order no. on the form & its ordered/Delivered/backflushed quantity fields . A the end i have check box to select the SFC Order.

In the script how do i select only checked SFC Order.?
how can I link SFC Order record and check box.

How do I deal with check box and get the relevant selected record.?

Regards,
Nilesh


Hello,

why a "mark" field ?

Mark the record and use "if marked" , mark occurence functions in your source.

Regards

micku_100
15th March 2007, 11:39
Thanx dear for the suggestion.. and its working.
but in report its displaying all the orders..
How do I filter them for selected (checked) records..??

this is my script..


declaration:
|**************************************************
table ttisfc001

long counter
extern domain tgyenox mark.prod

before.program:
counter = 0

form.1:
init.form:
get.screen.defaults()

choice.cont.process:
on.choice:
execute(print.data)

choice.mark.occur:
after.choice:
mark.occ(actual.occ)
counter = 1

choice.print.data:
on.choice:
if rprt_open() then
read.main.table()
rprt_close()
else
choice.again()
endif

functions:
function read.main.table()
{
message("Printing Fired.. in Main")
select tisfc001.pdno
from tisfc001
selectdo
if marked then
rprt_send()
endif

endselect
}
|***********************************************

Hitesh Shah
15th March 2007, 14:26
Use this pre-defined array in place of marked variable , and also use do.occ to get the marked SFC order . It should work .

mark_h
15th March 2007, 15:00
You code should look like this in the read.main.table:

for i = 1 to filled.occ
if mark.table(i) then
....do your stuff here....
endif
endfor

micku_100
16th March 2007, 05:00
Thanks to all and also to Mark.

Here is the code where I can print all the selected records on the form in the report for any calculation.
|**************************************************
| Print Selected Records on the form.
|*************************************************
declaration:

table ttisfc001

long start
extern domain tgyenox mark.prod

form.1:
init.form:
get.screen.defaults()

choice.cont.process:
on.choice:
execute(print.data)

choice.mark.occur:
after.choice:
mark.occ(actual.occ)

choice.print.data:
on.choice:
if rprt_open() then
read.main.table()
rprt_close()
else
choice.again()
endif

functions:
function read.main.table()
{
for start = 1 to filled.occ
if (mark.table(start)) then

do.occ (start,send_report)
endif
endfor
}

function send_report()
{
rprt_send()
}
|***************************************************

So Simple and easy no..??

Thanx to all again for help.