preethi
2nd April 2011, 07:55
Hi all,

hope some one can guide me.

presently we have a facility where all the lines present in the form are printed. now, the user wants to print only selected lines in the form.
how can we sent only selected data to report?
Are there any specific commands for this purpose?

Thanking you in advance

Hitesh Shah
2nd April 2011, 10:25
mark.table array and do.occ function can help u in this .

preethi
26th April 2011, 11:40
mark.table array and do.occ function can help u in this .

Hi Hitesh,

Thank you, i have am able to select the records. But if my records are more in number i am not able to select first & last record at the same time.

For example if i have 48 data records, the form is able to accomodate only 38 out of 48(after expanding the form). in this case if i am using mark.table i am unable to select records present in different pages. Is there any way around or is it a limitation of mark.table?

Thanking you in advance

rahul.kolhe22
26th April 2011, 12:07
Hi,

I once had came across similar requiremnt.

In this case I made it up by declaring a dynamic array and storing the key values of the selected record in the array field as soon as the record is selected.

And then scanned the complete array when reported was needed to be printed. At the same time also initialized the array to blank values.

I also tried to find out some other option to achieve the reqired output, but was not able to find any.

Hope this helps you.

Regards,
--Rahul

Hitesh Shah
26th April 2011, 19:37
Certainly mark table is only for the data on the screen . Other multiple selections running into multiple screen can be done by dynamic array or updating the same in a temp table. Using dynamic array is a better and speedy way to do this.

MilindV
26th April 2011, 20:26
One things that needs to be taken care with dynamic array is, when user wants to unselects records. Say user has selected 40-50 records, now he has to unselect 10-15, then you need to remove those records from dynamic array. For this have to traverse entire array for for every record unselected.

If possible, add a field(tgyenox/tcyesno) in table, show it on session. let user check this field for printing the record. If not, then use dynamic array keeping mind above condition.

psuryava
27th April 2011, 08:02
One things that needs to be taken care with dynamic array is, when user wants to unselects records. Say user has selected 40-50 records, now he has to unselect 10-15, then you need to remove those records from dynamic array. For this have to traverse entire array for for every record unselected.

If possible, add a field(tgyenox/tcyesno) in table, show it on session. let user check this field for printing the record. If not, then use dynamic array keeping mind above condition.

:) I think this is the best alternative to use check box for each of the reacord. You can use it as a multioccurance field. It will be easier with check box to select / unselect records to be printed. But here the drawback is that you can not select multiple check boxes at a time. eg. If you want to select 1 to 10 records then you need to select checkbox for 10 times which is quite iritating.

psuryava
27th April 2011, 08:04
:)I think this is the best alternative to use check box for each of the reacord. You can use it as a multioccurance field. It will be easier with check box to select / unselect records to be printed. But here the drawback is that you can not select multiple check boxes at a time. confused::confused:
eg. If you want to select 1 to 10 records then you need to select checkbox for 10 times which is quite iritating.:confused::

Hitesh Shah
27th April 2011, 17:32
Normally multi-select is required on dimensions / fields which are part of baan standard . In that case modifying standard tables for enabling tcyesno/tgyenox is not an advisable option.

Further editing yesno / yenox fields also are cumbersome .

We have 1 single table created for such custom selections user wise with user + field + serial in index . A front end session is created which displays all available fields and on marking /unmarking , selections are inserted /deleted in custom table . Marking as compared to editing is mre comfortable to users.

Further even with dynamic array de-selections can be done by re-assigning de-selected array value min/max value , re-sorting the and re-allocating the array with 1 less element.

Further my own remark that dynamic array method will be fast is misleading and is influenced by other fact that in-memory transformation using array far more faster that disk based data transformation . Such multi-selects are normally used to run query on transactions table . And running same query with different element values is a good disk based overhead on overall program trhoughput . Instead custom table based selections can easily be joined in transaction table reducing the sql query parse/exec overhead to one number only as against multiple number as may be required . In baan sql arrays can not be used except other wise in IN clause in dynamic query and that too may be for somewhat limited set of values . So custom table based multi-select also can give good throughput in many situations in view of this . We use multi-select substantially on many fields based on custom table and not arrays since many years though we use arrays extensively for data summarization.