Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 29 JUN 2004 09:50:10PM Marty Rosenbloom wrote:

Hi,

I have created an RList statement that will run in the system editor but I can't get it to display to the screen using a button and the "click" event. What is the correct syntax so that I can do this?

RUN RLIST 'LIST SALES DEPARTMENT CLASS TOTAL FINAL_SALE TOTAL LINE_COMMISSION WITH WEEK_ENDING EQ "07/03/04" ',1

This works in the sytem editor.

TIA,

Marty


At 29 JUN 2004 11:22PM Richard Bright wrote:

You could call a script containing subroutine

/* Code Snipit - See Help for more info OIv7.01 */

Report_Name='

List_Statement=MyRlistStatement

Run_report(Rpt_Name,ListStatement)

Otherwise you could do something with oiview32

Richard Bright

BrightIdeas New Zealand


At 30 JUN 2004 01:21PM Richard Hunt wrote:

Marty,

You might want to check out the RECEIVER property and the SEND_DYN method.

The SEND_DYN method is just a simple call statement. SEND_DYN(MESSAGE).


At 30 JUN 2004 06:36PM Marty Rosenbloom wrote:

Hi Richard,

Thanks for the response.

I like Run_Report but I would like to change the selection criteria dynamically. The key is "Reservation" and the selection critreria is "Week_Ending". I have created a popup for the week ending and I can select the the proper reservations but I cannot get them to display on the report for the selected time period. When the report displays now, all reservations appear.

Marty


At 01 JUL 2004 01:16AM Richard Bright wrote:

Marty,

You do your filter first and make the resultant an anctive cursor then call your Rlist Statement so as to use the active cursor.

I have a predefined report template (which is what you are doing, in effect). I have a select filter tool to generate the select and then call the report.

Works like a charm.

If you need two or three lines of code to be more specific, let me know.

Richard Bright

BrightIdeas New Zealand


At 01 JUL 2004 03:14PM Marty Rosenbloom wrote:

Richard,

I'm making the transition from OI2.61 to OI7.01 so some of this is new to me. Some sample code including the run_report call would be great. I am having trouble getting the filters that I have done to work.

For future reference, where can I find help on run_report and oiview32?

Thanks,

Marty


At 01 JUL 2004 08:10PM Richard Bright wrote:

Marty,

Below is a rather long winded layout of code - could probable cut down to a few lines but not the time to do….

Help on the Run_Report, well highlight in sytem editor and press F1. ORMAIN32 may be there also. OIv7.01 has good docs - have come a long way.

/* Section of code from a script called from a Button Click event. Information is gathered from a record (Find) specifying default information on report to do and other information gathered on the fly */

/* part of code gathering info from editable to determine select and sort */

Case Find=2 ; * Table driven

      Select_Tab=Get_Property(Win:'.SELECT_TABLE','ARRAY')
  • Replace all occurances of 'OPTION' in Sel_Tab
      If Index(Select_Tab,'OPTION',1) then
         Swap 'OPTION' with '= in Select_Tab
      End 
  • Note 'with' must be followed by 'and with'; embedded or must invoke paretheses …
      Select='
      Sel_Cnt=Count(Select_Tab,@vm) + (Select_Tab NE '')
      For N=1 to Sel_Cnt While Select_Tab
  • Select_Row=Select_Tab :' ':Select_Tab:' ':Select_Tab :' ':Select_Tab :' ':Select_Tab:' '
          Select_Row=Find :' ':Select_Tab:' ':Select_Tab :' ':Select_Tab :' ':Select_Tab:' '  
          If Select_Tab then
  • Addin paraentesis
            Join=Select_Tab
            Swap 'WITH' with '( WITH' in Join
            Select := Trim(Join:' ':Select_Row):' ) '
          End Else
            Select := Trim(Select_Tab:' ':Select_Row):' '
          End  
      Next N
      Sort_Tab=Get_Property(Win:'.SORT_TABLE','ARRAY')
      Sort='
      Sort_Cnt=Count(Sort_Tab,@vm) + (Sort_Tab NE '')
      For N=1 to Sort_Cnt While Sort_Tab
          Sort_Row=Sort_Tab:' ':Sort_Tab 
          Sort := Trim(Sort_Row):' '
      Next N
  • Print Options
      UserArg=Get_Property(Win:'.PRINT_OPTIONS':@RM:Win:'.REPORT_PATH':@RM:Win:'.REPORT_COPIES','VALUE':@RM:'TEXT':@RM:'TEXT')
      Convert @RM to @fm in UserArg
Type    =Find ;*  RetVal 
Rpt_Name=Find ;*RetVal
Table   =Find ;*RetVal
Output  =Find ;*RetVal
  • Save off SelectList
Find=Date():'.':Time()
Find    =SELECT ":Table:" ":Sort :" ":Select
Begin Case 
  CASE Type=RB' ;* RList Builder Cataloged Report
     Stat=Utility("CURSOR","H")
	  GoSub Make_Save_List
	  if Get_Status(status_code) then
               Call MSG(Win,"Cant make select list: ":status_code) 
               Return
            end Else	
 	      Activate_Save_Select(Database:'*':@STATION)
 	  End
 	    Run_report(Rpt_Name,'')
  CASE Type=RD' ;* Report Designer – Select ……

(Code continues)

Make_Save_List:

If table then
   Status=Set_Status(0)  ;* Clear status
   Targetname=Database:'*':@STATION
   	 Rlist("SELECT ":Table:" ":Sort :" ":Select, TARGET_SAVELIST$, TargetName,'','')
  	 if Get_Status() then
 	     * Have problem
 	     Call Msg(Win,'Have problem with selection')
 	 End
end Else
  • Set error status
   Status=1
   End

Return


At 03 JUL 2004 12:17PM Marty Rosenbloom wrote:

Hi Richard,

That is rather long but I was able to adapt and condense for my own needs. I knew that I had to use @STATION but was at a loss in this version. Got it to work nicely for me, though.

THANK YOU!

Marty

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/58e12a9672f0847185256ec3000a162b.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1