I want to get selected grid rows in report?

Nagendra226

Member
Hi all,

Actually i am working on an application which when selected grid rows randomly in Find/Browse form must be inserted into table when the UBE is called through Report Interconnect in row exit in button clicked event.
Like this

View attachment 17908

In grid properties I used multiple select option for selecting multiple records.

And when i click on row exit the report will be called.

But it is selecting only the first record and displaying it in pdf.

I used row is selected(web) in grid event rules.

is it possible to insert randomly selected records from application via report into table?

The application i am using here is Headerless detail. I t can be possibly through find/browse also.


Help me...

i struck there itself.
 

craig_welton

Legendary Poster
In your row exit event Button Clicked, select the Options menu and turn on Repeat for Grid. Not sure what you are looking to do with the Row is Selected event.

Craig
 

Nagendra226

Member
Hi craig,

Thanks for the reply. Okay i will write the event in find/browse(select button) Button clicked event. when i click on select button it should go call an UBE.

when i select randomly grid rows in a form it should be displayed in report. this is what i am trying to do?
 

Rauf

VIP Member
Nagendra,

In the table, you will add one more column, say Batch Selection Number.

In the select button you can write the following events,
1. Generate a next number (you can use GetNextUniqueID system function).
2. Update the generated number for the selected rows.
3. Next call the UBE. Pass the generated number to the UBE.
4. In the UBE, write code to select only the passed Batch Selection Number.

Hope you got the idea.
 

Nagendra226

Member
Rauf,

Thanks.

But I am using E910. In there is no system function. Only System function is Get Unique ID.

But there is business function X00022.

Could please help me on R470412 Report? EDI Batch process?
 

Rauf

VIP Member
No problem.
You can use X00022 GetNextUniqueKeyID. Pass your table and get next new number.
1. Place a button named 'Update Selected Rows Batch No'.
2. In the Button Clicked Event, write the update ER.
Then goto "Options", check "Repeat for Grid"
3. In the Post Button clicked event, call your report and pass the generated number.
4. Write logic in your report to select the records corresponding to the new generated number.
 

johndanter

Legendary Poster
Don't put it in the find browse as that clears any selected grids

You need this code

Get Selected Grid Row Count(FC Grid, VA frm_SelectedCount_LNID)

If VA frm_SelectedCount_LNID is greater than Zero

Get Selected Grid Row Number(FC Grid, VA frm_GridRowNumber_INT01)

While VA frm_GridRowNumber_INT01 is greater than Zero

Get Grid Row(FC Grid, VA frm_GridRowNumber_INT01)

Get Next Selected Row(FC Grid, VA frm_GridRowNumber_INT01,
VA frm_GridRowNumber_INT01)

Insert into your workfile with a grouping UKID

End While
End If

Call your UBE using the UKID as data selection

Or this

Get Next Selected Row(FC Grid, <Before First Row>, evt_iLineOut_INT01)

While evt_iLineOut_INT01 is greater than evt_iLineIn_INT01

Get Grid Row(FC Grid, evt_iLineOut_INT01)

// do something with the GC

evt_iLineIn_INT01 = evt_iLineOut_INT01

Get Next Selected Row(FC Grid, evt_iLineIn_INT01, evt_iLineOut_INT01)


End While

*NB this only works on the THIN client emulation, not on FAT
 
Last edited:
Top