Precisely Speaking
May 21, 2012, 07:40:06 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: So what's news with you?  Tell us about it in "Getting To Know You"!
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Report Writer and actve select list  (Read 244 times)
bbuckley
Newbie
*
Posts: 1


« on: November 09, 2011, 09:52:04 AM »

I have a report writer report where I need to use the proc after read to do a select. How do I specify that the select in the proc is to write to a different select list?  Currently it is clobbering the active select list from the report writer selection criteria.  I have tried using both a numbered list and a named list but neither is working.
Logged
Tom Pellitieri
Rock Star
*****
Posts: 171


Tom Pellitieri - Toledo, Ohio


« Reply #1 on: November 10, 2011, 03:25:59 PM »

Not sure how to control this directly through SB+.  From UniBasic (on UniData), I can do this:

OPEN "FILENAME" TO FILEVAR...
LISTVAR = ""
EXECUTE "SELECT..."
SELECT FILEVAR TO LISTVAR
LOOP WHILE READNEXT ID FROM LISTVAR DO
 (loop stuff, including other SELECTS)
REPEAT

Is there any way you can turn the select around in Report Writer?  More details would help.

For example, if the main select was for the Order file, and your PAR needs to select some of the line items, you could change it around to select all of the line items, then use the PAR to drop the ones you don't need (by setting @RTN.FLAG=1).
Logged
precisonline
President/Chief Technologist
Administrator
Rock Star
*****
Posts: 1532



WWW
« Reply #2 on: November 19, 2011, 02:42:27 PM »

The only way I know to do this is to create a BASIC subroutine in BASICTYPE "U" that does a select to a numbered list,like maybe 9:

EXECUTE "SELECT filename TO 9"

...followed by

LOOP
   READNEXT filename.ID FROM 9 ELSE EOF = @TRUE
UNTIL EOF DO
...
REPEAT

Of course, replace "filename" with the appropriate name of the file.
Logged

-Kevin
Accidents "happen"; success, however, is planned and executed.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!