Print selection criteria on report?

Lerebours, Jose Jose.Lerebours at EagleGL.com
Fri Mar 19 15:36:56 PST 2004


JP advised:

> Dan Snyder propounded (on Fri, Mar 19, 2004 at 04:19:23PM -0500):
> | 
> | We have many outputs/reports that our users load saved selections
> | for and then change the "value" field in the selection to choose the
> | specific records that they want.  Is there an easy way to have the
> | selection criteria print on the output form? 
> 
> It seems rather obvious that if you set a global variable stuffed with
> the selection criteria, you can readily print it on the report.
> 

Here is a simple code that may point you in the right direction.
Please notice that this does not account for use of selector
sentence.  Below code I just typed in an input table, pressed 
S and it showed me neat listbox with extracted criteria ...

Good luck!


@keys  ! If:                                                    
       Then: dim selSetG(5)(5,*); dim selSetF(15)(3,*)          
 27  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
       ! If:                                                    
       Then: dim selSetO(15)(3,*); dim selSetV(15)(50,*)        
 28  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
       ! If:                                                    
       Then: dim selSetD(15)(45,*); dim selTable(15)            
 29  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
       ! If:                                                    
       Then: fn="/appl/filepro/somefile/sel.SELTABLE"; sn(2,.0)="0"
 30  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
READSEL! If:                                                    
       Then: import ascii sel = (fn) f=: r=\n                   
 31  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
       ! If: not sel                                            
       Then: goto ENDSEL                                        
 32  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
       ! If:                                                    
       Then: sa(5,*)=sel(1) ; sb(3,*)=sel(2) ; sc(3,.0)=sb      
 33  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
       ! If: sb eq ""                                           
       Then: goto READSEL                                       
 34  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
       ! If:                                                    
       Then: sn=sn+"1"; selSetG(sn)=sel(1); selSetF(sn)=sel(2)  
 35  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
       ! If: sc ge "1"                                          
       Then: selSetD(sn)=fieldname(-,sc)                        
 36  -------   -   -   -   -   -   -   -   -   -   -   -   -   -
       ! If: 'If sc is lets than 1, it is likely that using 
       Then: 'system field and not real fields

 37  -------   -   -   -   -   -   -   -   -   -   -   -   -   -  
       ! If:                                                      
       Then: selSetO(sn)=sel(3); selSetV(sn)=sel(4)               
 38  -------   -   -   -   -   -   -   -   -   -   -   -   -   -  
       ! If:                                                      
       Then: sd=selSetG(sn)&":"&selSetF(sn)&":"&selSetD(sn)&":"   
 39  -------   -   -   -   -   -   -   -   -   -   -   -   -   -  
       ! If:                                                      
       Then: sd=sd&selSetO(sn)&":"&selSetV(sn) ; selTable(sn)=sd  
 40  -------   -   -   -   -   -   -   -   -   -   -   -   -   -  
       ! If:                                                      
       Then: goto READSEL                                         
 41  -------   -   -   -   -   -   -   -   -   -   -   -   -   -  
ENDSEL ! If:                                                      
       Then: xx(2,.0)=listbox(selTable,"1",sn)                    
 42  -------   -   -   -   -   -   -   -   -   -   -   -   -   -  
       ! If:                                                      
       Then: end                                                  
 43  -------   -   -   -   -   -   -   -   -   -   -   -   -   -  


Hope this helps!


Jose Lerebours
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.celestial.com/pipermail/filepro-list/attachments/20040319/c481d984/attachment-0001.htm


More information about the Filepro-list mailing list