<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: Print selection criteria on report?</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>JP advised:</FONT>
</P>
<P><FONT SIZE=2>> Dan Snyder propounded (on Fri, Mar 19, 2004 at 04:19:23PM -0500):</FONT>
<BR><FONT SIZE=2>> | </FONT>
<BR><FONT SIZE=2>> | We have many outputs/reports that our users load saved selections</FONT>
<BR><FONT SIZE=2>> | for and then change the "value" field in the selection to choose the</FONT>
<BR><FONT SIZE=2>> | specific records that they want. Is there an easy way to have the</FONT>
<BR><FONT SIZE=2>> | selection criteria print on the output form? </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> It seems rather obvious that if you set a global variable stuffed with</FONT>
<BR><FONT SIZE=2>> the selection criteria, you can readily print it on the report.</FONT>
<BR><FONT SIZE=2>> </FONT>
</P>
<P><FONT SIZE=2>Here is a simple code that may point you in the right direction.</FONT>
<BR><FONT SIZE=2>Please notice that this does not account for use of selector</FONT>
<BR><FONT SIZE=2>sentence. Below code I just typed in an input table, pressed </FONT>
<BR><FONT SIZE=2>S and it showed me neat listbox with extracted criteria ...</FONT>
</P>
<P><FONT SIZE=2>Good luck!</FONT>
</P>
<BR>
<P><FONT SIZE=2>@keys ! If: </FONT>
<BR><FONT SIZE=2> Then: dim selSetG(5)(5,*); dim selSetF(15)(3,*) </FONT>
<BR><FONT SIZE=2> 27 ------- - - - - - - - - - - - - -</FONT>
<BR><FONT SIZE=2> ! If: </FONT>
<BR><FONT SIZE=2> Then: dim selSetO(15)(3,*); dim selSetV(15)(50,*) </FONT>
<BR><FONT SIZE=2> 28 ------- - - - - - - - - - - - - -</FONT>
<BR><FONT SIZE=2> ! If: </FONT>
<BR><FONT SIZE=2> Then: dim selSetD(15)(45,*); dim selTable(15) </FONT>
<BR><FONT SIZE=2> 29 ------- - - - - - - - - - - - - -</FONT>
<BR><FONT SIZE=2> ! If: </FONT>
<BR><FONT SIZE=2> Then: fn="/appl/filepro/somefile/sel.SELTABLE"; sn(2,.0)="0"</FONT>
<BR><FONT SIZE=2> 30 ------- - - - - - - - - - - - - -</FONT>
<BR><FONT SIZE=2>READSEL! If: </FONT>
<BR><FONT SIZE=2> Then: import ascii sel = (fn) f=: r=\n </FONT>
<BR><FONT SIZE=2> 31 ------- - - - - - - - - - - - - -</FONT>
<BR><FONT SIZE=2> ! If: not sel </FONT>
<BR><FONT SIZE=2> Then: goto ENDSEL </FONT>
<BR><FONT SIZE=2> 32 ------- - - - - - - - - - - - - -</FONT>
<BR><FONT SIZE=2> ! If: </FONT>
<BR><FONT SIZE=2> Then: sa(5,*)=sel(1) ; sb(3,*)=sel(2) ; sc(3,.0)=sb </FONT>
<BR><FONT SIZE=2> 33 ------- - - - - - - - - - - - - -</FONT>
<BR><FONT SIZE=2> ! If: sb eq "" </FONT>
<BR><FONT SIZE=2> Then: goto READSEL </FONT>
<BR><FONT SIZE=2> 34 ------- - - - - - - - - - - - - -</FONT>
<BR><FONT SIZE=2> ! If: </FONT>
<BR><FONT SIZE=2> Then: sn=sn+"1"; selSetG(sn)=sel(1); selSetF(sn)=sel(2) </FONT>
<BR><FONT SIZE=2> 35 ------- - - - - - - - - - - - - -</FONT>
<BR><FONT SIZE=2> ! If: sc ge "1" </FONT>
<BR><FONT SIZE=2> Then: selSetD(sn)=fieldname(-,sc) </FONT>
<BR><FONT SIZE=2> 36 ------- - - - - - - - - - - - - -</FONT>
<BR><FONT SIZE=2> ! If: 'If sc is lets than 1, it is likely that using </FONT>
<BR><FONT SIZE=2> Then: 'system field and not real fields </FONT>
<BR><FONT SIZE=2> 37 ------- - - - - - - - - - - - - - </FONT>
<BR><FONT SIZE=2> ! If: </FONT>
<BR><FONT SIZE=2> Then: selSetO(sn)=sel(3); selSetV(sn)=sel(4) </FONT>
<BR><FONT SIZE=2> 38 ------- - - - - - - - - - - - - - </FONT>
<BR><FONT SIZE=2> ! If: </FONT>
<BR><FONT SIZE=2> Then: sd=selSetG(sn)&":"&selSetF(sn)&":"&selSetD(sn)&":" </FONT>
<BR><FONT SIZE=2> 39 ------- - - - - - - - - - - - - - </FONT>
<BR><FONT SIZE=2> ! If: </FONT>
<BR><FONT SIZE=2> Then: sd=sd&selSetO(sn)&":"&selSetV(sn) ; selTable(sn)=sd </FONT>
<BR><FONT SIZE=2> 40 ------- - - - - - - - - - - - - - </FONT>
<BR><FONT SIZE=2> ! If: </FONT>
<BR><FONT SIZE=2> Then: goto READSEL </FONT>
<BR><FONT SIZE=2> 41 ------- - - - - - - - - - - - - - </FONT>
<BR><FONT SIZE=2>ENDSEL ! If: </FONT>
<BR><FONT SIZE=2> Then: xx(2,.0)=listbox(selTable,"1",sn) </FONT>
<BR><FONT SIZE=2> 42 ------- - - - - - - - - - - - - - </FONT>
<BR><FONT SIZE=2> ! If: </FONT>
<BR><FONT SIZE=2> Then: end </FONT>
<BR><FONT SIZE=2> 43 ------- - - - - - - - - - - - - - </FONT>
</P>
<BR>
<P><FONT SIZE=2>Hope this helps!</FONT>
</P>
<BR>
<P><FONT SIZE=2>Jose Lerebours</FONT>
</P>
</BODY>
</HTML>