` Printed Icetips Article

Icetips Article



Par2: User selection of any key for a report
2001-10-25 -- Mark
 
try this out...
AT ThisWindow.Init Priority 8505
  !
  ! Prompt the user for which sort order they wish to use.
  ! If appropriate, prompt them for range and selection data.
  !
Case Popup('By Key_1|By Key_2 (Ranged) By Key_2 (Ranged and summary)')
Of 1
    LOC:Var = TRUE !Print Details
    ThisReport.AddSortOrder(PRE:Key)
Of 2
    LOC:Var = TRUE !Print Details
    RangePromptForm(Desired:Minimum,Desired:Maximum)
    IF GLOBALRESPONCE = RequestCancelled THEN RETURN.
    ThisReport.AddSortOrder(PRE:Key)
    ThisReport.AddRange(PRE:Field,Desired:Minimum,Desired:Maximum)
Of 3
    RangePromptForm(Desired:Minimum,Desired:Maximum)
    IF GLOBALRESPONCE = RequestCancelled THEN RETURN.
    LOC:Var = FALSE !Don't print the details, just kick out the summary.
    ThisReport.AddSortOrder(PRE:Key)
    ThisReport.AddRange(PRE:Field,Desired:Minimum,Desired:Maximum)
END
ThisReport.SetSort(2) !Go ahead and apply the "2nd" sort that you have just
picked.

This lets you run the report on ANY key in the file. Real handy when you
would
otherwise be writing 17 identical reports...



Printed November 21, 2024, 7:10 am
This article has been viewed/printed 35215 times.