I have created a report which works fine and have developed some Requestfilter field for the Sales Header.No and the Sales Line.Line No.
With the syntax below, I have two problems, 1) on the request page both fields do not facilitate a dropdown page from where the choice can be made and 2) I am not able to filter the Sales Line.Line No field based on the value selected in the Sales Header.No filter.
report 60128 riemetiket
{
ApplicationArea = All;
Caption = 'Riemetiketten';
UsageCategory = Documents;
DefaultRenderingLayout = riemetiketsmal;
PreviewMode = PrintLayout;
dataset
{
dataitem(CopyLoop; Integer)
{
DataItemTableView = sorting(Number);
column(Number; Number)
{
}
dataitem(/Sales Header/; /Sales Header/)
{
DataItemTableView = sorting(/Document Type/, /No./) where(/Document Type/ = const(Order));
RequestFilterFields = /No./;
column(No_SalesHeader; /No./)
{
IncludeCaption = true;
}
column(ExternalDocumentNo; /Sales Header/./External Document No./) { }
dataitem(SalesLine; /Sales Line/)
{
DataItemLink = /Document Type/ = field(/Document Type/), /Document No./ = field(/No./);
DataItemTableView = sorting(/Document Type/, /Document No./, /Line No./) where(type = const(Item));
RequestFilterFields = /Line No./;
RequestFilterHeading = 'Verkoopregel';
column(Line_No_; /Line No./)
{
}
column(Description; Description)
{
}
column(Description2; /Description 2/)
{
}
column(No; /No./)
{
}
column(DocumentNo; /Document No./)
{
}
column(DocumentType; /Document Type/)
{
}
dataitem(Item; Item)
{
DataItemLink = /No./ = field(/No./);
DataItemLinkReference = SalesLine;
column(Common_Item_No; /Common Item No./)
{ }
column(Barcode; EncodedText)
{ }
trigger OnAfterGetRecord()
begin
GenerateBarcode();
end;
}
}
}
trigger OnPreDataItem()
begin
SetRange(Number, 1, NoOfCopies + 1);
end;
}
}
requestpage
{
SaveValues = true;
layout
{
area(content)
{
group(Opties)
{
field(/Aantal Exemplaren/; NoOfCopies)
{
ApplicationArea = All;
Caption = 'Aantal kopies';
ToolTip = 'Hoeveel kopies van een exemplaar er afgedrukt worden';
}
}
}
}
actions
{
area(processing)
{
}
}
}