Preview Button Save PDF instead of previewing

Hi,

I have just created a page and report extension in order to choose my report layout before printing . My problem is after installing this extension when I click on preview button on request page it download a pdf file instead of previewing . does anyone have any solution for this it is driving me crazy.

here is my code

this is the page code :

page 50109 “Email Body Selection”
{
PageType = List;
UsageCategory = None;
SourceTable = “Custom Report Layout”;
Editable = false;

layout
{
area(Content)
{
repeater(Newrep)
{
field(Description; rec.Description)
{
ApplicationArea = all;
}
}

}

}
}

and this is my report extension

reportextension 50109 “EmailBody-Extension” extends “Transfer Order”
{

trigger OnPreReport()

var
RLS: Record “Report Layout Selection”;

begin

layout2.SetRange(“Report ID”, 5703);
if page.RunModal(50109, Layout2) = Action::LookupOK then
RLS.SetTempLayoutSelected(Layout2.Code);
if CurrReport.Preview then
UseRequestPage(true)

else
Error(‘Please Select A Layout!’);

end;

var

Layout2: Record “Custom Report Layout”;

}