E9.2 use data sel/seq from a section affects Set User Selections?

adrian.varela

Member
Hello everyone,

I'm developing a report that creates a txt file with multiple lines,

I need to separate the report in two sections with the same BSVW because I need to print lines with 2 diferent user selections, I made an example with SQL code:

WHERE (DELN = 0 AND DRQJ > TODAY - 30 days)
OR (DELN <> 0 AND ADDJ > TODAY - 30 days)

I put the first part (DELN = 0 AND DRQJ > TODAY - 30 days) in the first section, and I need to put the second part in another one, but keeping the data selection using use data sel/seq from a section.

My question is, This system function affects the user selection too?

Thanks for your help :)
 
I think the system function will pull whatever data selection is set at runtime regardless of how it was set. Having said that, it should be easy enough to test. Anytime I am dealing with any type of WHERE clause that is even remotely complex or I have questions about I get in the habit of turning on the debug log and pulling the SQL statement so I can analyze it and confirm that it is doing what I want it to do.
 
Hi

I played with this before and I think it only copies whats 'coded' not whats added at runtime
This kind of confrms it too (pasted below - This section does not have to be in the current report) so that must mean it's looking at code in order to get that

When I have needed to do this in the past I have eiter marked the forst sections records with a spare flag/value and then pick that in the 2nd and clear it. Or write the keys found to a workfile and read over that

UseDataSel/SeqFromASection

UseDataSel/SeqFromASection​


Last Modified: B733​


UseDataSel/SeqFromASection retrieves the data selection and/or the data sequencing for a given section in a report and use it for the current section. This section does not have to be in the current report, it can be any valid section from any report. The source section must be attached to a business view that is compatible with the business view of the current section
 
I have not used the system function as much as I have the C API ubeSection_GetDataSelection and it does grab what ever the data selection is at run-time even if set interactively by the user via data selection prompt. I thought the system function did the same but would have to go test it to be sure. OP could test and report back.
 
Back
Top