• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Sent Data Selection to a Child Section in RDA

Rauf

VIP Member
I have two sections in my report. Both have different business views.
The first section ( the parent section) have no CO field in the BV, but the child section have.

In the child section, I hard coded the data selection as CO = 00001,00002 etc. Now the user doesn't want hard coding. She wants to specify the data selection by herself like CO = 00058.

I wonder, how should I do this ?
 

johndanter

Legendary Poster
Option 1
Workfile to store the value read. I've done this in the past be 'cheating' and in your example I'd save off the unique companies I'm reading off to a workfile.

Your second section would then have a new BSVW made up of that workfile linked to your target table on the key fields. Maybe have a job number in there so it's unique and clear it down when finished.
Works well. You can even use this to pass data selection across UBEs too :)

Only draw back is the 1st section has to finish it's selection

Option 2
Use BSFN Get Runtime Data Selection to find what they entered in the 1st section (in this example I am printing what they entered)

evt_SelectCount_INT01
evt_QuitLoop_EV01
0001 //
0002 If PO cPrintRuntimeDataSel_EV01 is equal to "1"
0003 Get Runtime Data Selection
VA evt_SelectCount_INT01 <> BF nSelectCount
UNDEFINED X BF idSectionID
RV Part 1 <- BF szPart1
RV Part 2 <- BF szPart2
RV Part 3 <- BF szPart3
RV Part 4 <- BF szPart4
VA evt_QuitLoop_EV01 <- BF cQuitLoop
UNDEFINED X BF cSuppressErrorMessage
UNDEFINED X BF szErrorDataItem
UNDEFINED X BF cErrorCode
0004 If VA evt_QuitLoop_EV01 is not equal to "Y"
0005 Do Custom Section(RS Page Break)
0006 Do Custom Section(RS Runtime Data Selection Headings)
0007 While VA evt_QuitLoop_EV01 is not equal to "Y"
0008 Do Custom Section(RS Runtime Data Selection Detail)
0009 Get Runtime Data Selection
VA evt_SelectCount_INT01 <> BF nSelectCount
UNDEFINED X BF idSectionID
RV Part 1 <- BF szPart1
RV Part 2 <- BF szPart2
RV Part 3 <- BF szPart3
RV Part 4 <- BF szPart4
VA evt_QuitLoop_EV01 <- BF cQuitLoop
UNDEFINED X BF cSuppressErrorMessage
UNDEFINED X BF szErrorDataItem
UNDEFINED X BF cErrorCode
0010 End While
0011 End If
0012 End If
0013 //
 
Last edited:
Top