Options in Report Request Page

This posting shows how to add option fields to a report’s request page.

I developed a simple report on base of table Sales Header.

sh-list-1

To filter by field Posting Date you can simply add that field to report data item “Sales Header”‘s property ReqFilterFields, but in this sample we check out how to handle complex filter processing.

Add 2 global variables of type Date: StartDate, EndDate.

sh-list-2

Now edit the request page (Menu View/Request Page), add a container line, a group line and 2 field lines to the request page, set the SourceExpr in line 1 to StartDate, line 2 to EndDate.

sh-list-3

To apply the filter fields add following code to trigger Sales Header – OnPreDataItem.

sh-list-4

If both filter fields are filled, the data is filtered: StartDate<=Posting Date<=End Date.
if only StartDate has a value: StartDate<=Posting Date
if only EndDate has a value: Posting Date<=EndDate

When running the report, we get:

sh-list-5

cheers

 

Advertisements

Export captions with Nav 2009

Sometimes there can be a need to export the captions of a nav object, maybe for translation purposes. For that kind of task, there is no nice possibility in NAV. i found a fine solution for this task on mibuso.com. Thanks to Duikmeester.
With the attached report you can export the captions of a given table. An export file “export.txt” containing all or a part of the captions (filtered by field no.) is created. The report can also be printed directly.

Request Form: Table Request Form: Fields
ExportCaptions-Img1 ExportCaptions-Img2
Resulting Preview Resulting Export file
ExportCaptions-Img3 ExportCaptions-Img4

The original post.
The report Nav2009-Export-Captions for download.