0

"Advanced" NL function with various filters

Hi there,


I am having a bit trouble creating a JetReport and was hoping to get some help here ;-)


The problem is that I need to create a quite long NL function with lots of filters - more filters then JetReports is apparently able to process (at least the version we use here, which is 5.2.9 Build 1661 (Jan 30th 2007) on a Navision 3.7 environment).

There are 2 databases, one called Servicehead, the other Serviceitemline.

These are the fields / filters I need to use:

Servicehead:
- ID
- Serviceordertype
- Incoming date
- Outgoing date
- Warranty
- Startdate X

Serviceitemline:
- repID
- Repair Code (in first entry of the service case, based on Servicehead.ID)
- RowNo


With less filters I would use a "=LINK" function like:

In words: "Show me every entry in the servicehead with the outgoing date of November 2nd, the Service Order Type XYZ where there is an incoming date set, where there is warranty = yes and where the startdate X is empty. Additionally, the repair code, which is found in the table ServiceItemLine, must be 01 or 02. The connection between those 2 tables is ID and repID. repID can have several entries, so please only check the repair code in line 10.

=NL("ROWS","Servicehead",,+"Outgoing date";"021109";"Serviceordertype","XYZ","Incoming date",">''","Warranty","yes";"Startdate X","@@","LINK=","Serviceitemline","repID","=ID","RowNo",10,"Repair Code","<>01&<>02")


This NL function is working - theoretically. But unfortunately after the use of 5 or 6 (not sure about the absolute number) filters, the limit is reached and I only get an error.



After the standard NL function, I have tried several other ways to get the data.
One was to use the NP("UNION", , ,) function, the other was using a NL("FILTER",…) instead of the LINK.
But neither worked for me (maybe I was just doing it the wrong way !?)


This is how I have tried to used the UNION function:
Cell A1:
=NL("ROWS","Servicehead",,+"Outgoing date";"021109";"Serviceordertype","XYZ","Incoming date",">''","Warranty","yes";"Startdate X","@@")

Cell B1:
=NL("ROWS",Serviceitemline",,"RowNo",10,"Repair Code","<>01&<>02")

Cell C1:
=NP("UNION",A1,B1)

It did not show an error, but also the result was showing lines including repair code 01 or 02… and also it searches through the whole table, which is really slow and nothing I can do in this environment.


If there is someone out there willing to read through my problem and also maybe able to give me some hints, I would be very thankful ;-)


Thanks in advance

7 comments

Please sign in to leave a comment.