How to build multi-pass reports passing filter values.

KAdamsInCoKAdamsInCo Member Posts: 28
I need to build a 'multi-pass' report and I'm not sure exactly how to do this. I have taken the training classes and have looked through the training manuals, but I don't see a good example of how to get done exactly what I need to.

I understand that I can list multiple tables in the DataItem list and it will run through both record sets, the first (Constituent Ledger Entry) and then the second in its entirety (Constituent Ledger Entry2):

DataItem Name
Constituent Ledger Entry <Constituent Ledger Entry>
Constituent Ledger Entry <Constituent Ledger Entry2>


When I run the report I fill out the filter columns / values for the first table. I filter on designation number and posting date:

_______________Constituent Ledger Entry
Constituent Ledger Entry
Field Filter
Designation No. 10271
Posting Date 05/01/06..05/31/06

My question is: How do I 'pass' the filtered fields and filter values to the second table (Constituent Ledger Entry2) so that the user doesn't have to enter them again on the second tab of the parameter form and that the second table (body section) won't return every row in the table because there were no filters set?

Make sense? So for all tables in the table list (all parents, no parent/child) I only want the first table's filter values to be entered, and then have those filters applied to the other tables in the list.

How is this done?

Thanks.






[/list][/url]

Comments

  • jversusjjversusj Member Posts: 489
    Since you are just making a report, I think you could use the COPYFILTER(S) function. I know i have used that before so that the user would enter filters on the Sales Invoice Header table and then we would use COPYFILTER to set the same filters on the Sales Cr.Memo Header. In this case, you had to be specific (field to field) in the code, but I think if you use COPYFILTERS you could be more general (table to table).
    kind of fell into this...
  • KAdamsInCoKAdamsInCo Member Posts: 28
    OK,

    So I tried this statement:


    "<Constituent Ledger Entry2>".GETFILTERS("Constituent Ledger Entry")

    But I receive an error when compiling the report that 'The Return Value should be used for this function'.

    Any ideas?
  • jversusjjversusj Member Posts: 489
    GETFILTER:
    GETFILTER (FieldRef)
    Use this function to return the filter within the current filter group that are applied to a field.

    String := FieldRef.GETFILTER
    String

    Data type: text

    This string contains the filter that is applied to the field in the record.

    FieldRef

    Data type: fieldref

    The fieldref that refers to the field for which you want to return the filter.
    you lack the return value (the string) so you get the error on compile.

    My original idea was to use COPYFILTERS
    Record.COPYFILTERS(FromRecord)
    Record

    Data type: record

    The record to copy filters to.

    FromRecord

    Data type: record

    The system copies the filters from this record.
    So you'd say:
    "Constituent Ledger Entry2".COPYFILTERS("Constituent Ledger Entry");
    kind of fell into this...
Sign In or Register to comment.