Popup PDF on the enterprise portal

Hi guys,

I’m trying to create PDF report on the webportal after clicking a button in AX 4.0 SP2.

So far, I was successful to generate the report PDF file after clicking the button, using EPSendDocument class (with fixed MS Bug). Simply by calling the class within web button’s click method.

Now, I have the generated PDF file somewhere in “program files/ …/…/…” on a server and i would like to pop it up in acrobat reader within a new browser window or force the browser to popup the file download.

Still, have no idea how to achieve it.

I also tried to use EPSendDocument form to show PDF on EP, but had no clue how should i pass the newly created file to it (i tried that throught menu item without success).

Any ideas or hints?

Thanx much!!!

So far, I was able to show page with the report download. However, i still have no clue how to force the EPSentDocument form to show the PDF on the page…

This code is implemented in the click method on the webform button and causes that the PDF report in PDF is prepared for download.

void clicked()
{
EPSendDocument epSendDocument;
Args args = new Args();

WebMenuFunction menuFunction;
WebLink webLink;
WebArgs webArgs = new WebArgs();
;

epSendDocument = new EPSendDocument(ledgerJournalTable);
epSendDocument.makeDocument();

menuFunction = new WebUrlMenuFunction(weburlitemstr(EPSendDocument));

webLink = new WebLink();
webLink.record(ledgerJournalTable);

webLink.menufunction(menuFunction);
webSession().redirect(webLink);

super();
}

However, much better would be if the PDF file appeared “embeded” in the page