Some Report Questions

afrancisafrancis Member Posts: 43
Hi all,

I have some questions regarding reports:

1) Is there a way to restrict the no. of fields in the report request form? The user should not be able to add new fields from the underlying dataitem in the request from when they run the report. Is this possible?

2)Will COPYFILTERS copy the filters set at the report request form by the user?

3)If not, is there a way to get these filters?
I read that you can do this using GETFILTER(S), but what if the user sets filters on say only 2 fields in the first report run, 3 fields in the next run & so on? I need to get these filters set in the report request form & set it on another rec. variable. Is there a way out?

Thanks & Regards,
Anse

Comments

  • krikikriki Member, Moderator Posts: 9,118
    1) it is not possible

    2) COPYFILTERS,GETFILTERS,GETFILTER("Some Field") will work, but only in the "OnPreReport"-trigger, not in the "OnPreDataItem"-triggers.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • DenSterDenSter Member Posts: 8,307
    1)
    What you could do is capture the filters that the user sets on fields, and then only use the ones that you want to use.

    Say the user sets a filter on posting date as well as document date, but you don't allow filters on document dates. You could either one of two things:
    * remove the filter on the document date (SETFILTER or SETRANGE without a filter value)
    * do a RESET and set only the filters on the fields that you allow. In that case you'd have to capture the filters first, then do RESET, and then apply the saved filters to the selected fields only.

    The only thing is that the user can still enter the filters, and might think they apply. So you should really display the filter values on the report.
  • Arjan_SomersArjan_Somers Member Posts: 64
    Or create a Request Form with only the options your uses should have access to.
Sign In or Register to comment.