Save Filter

HsinChuMarkHsinChuMark Member Posts: 14
Dear All

On monthly/weekly basis, users have to submit report on various topics. While all the needed data is in NAV, they have to set often complex filter criteria, or export data to Excel and use pivot tables (or worse, they ask me to create reports...).

Now, is there a possibility to save a filter setting? How would I have to code it? Has anybody encountered similar requirements?

Would it be a good idea to create a table (Keys: UserID, TableView, Description) and save all filter criteria as text? Could I save it to the ZUP file?

Thanks is advance for your replies.
M.

Comments

  • SavatageSavatage Member Posts: 7,142
    Two easy ways I can Think of.

    1) If the report always & only uses a complex list of filters. You could change the DataItemTableView & set many of the filters in stone all except ones that need monthly/weekly adjusting (perhaps a date) for example.

    2) if the report is used for other things too you may not want to hard code some filters. In that case you could do as above and save the report with a new name & number perhaps calling it Monthly "Some Report"

    3)using the Aged Account Receivable report as an example. You can create a request form that has check boxes and a date field "say you call it" Apply monthly filters or Apply weekly filters. With code set those filters based on which check box is used.
  • HsinChuMarkHsinChuMark Member Posts: 14
    Dear Harry,

    thanks for your reply. Indeed, hard coding filters does not do the trick. And I created Request form criteria, but this is a lot of work, especially when it comes to testing.

    So I wonder if there is a way to 'personalize' a filter, or to store a set of filters for different purposes in a central table and fetch criteria from there when calling the report.

    Cheers
    Mark
  • MalajloMalajlo Member Posts: 294
    Example of putting filter on No. (first field) '000', and it should not be difficult to create table and code behind to fill at any change on Request Form(close) or PreDataItem.

    Variables:
    Name	DataType	
    Fld	FieldRef		
    rcrd	RecordRef		
    
    
    rcrd.OPEN(27) ;
    Fld := rcrd.FIELD(1) ;
    SETVIEW('SORTING('+Fld.CAPTION+') WHERE('+Fld.CAPTION+'=FILTER(000))') ;
    
Sign In or Register to comment.