How to name a pdf_report file yourself?

Hi All,

I have a pdf_report, and when a user goes to save the report from the web browser, I would like to name the file myself, but I cannot find a setting to do that.

I do have a macro called sc_pdf_output() which does allow me to do just that, except that on a line report, it prints the first line item, and then stops, as the sc_pdf_output() issues a close() command after the first line is printed.

I can work around it but it is a pain.

  1. I can do a sc_lookup() on the SQL script that gets the records that are to be printed.
  2. Then I can do a count() to see how many rows there are.
  3. I can then get unique details of the last record.
  4. In the code section of the report I can place sc_pdf_output() inside an if() clause that only allow access when the last record has been printed.

Does anyone have an alternative? or if I am blind, point me to the right section to make up the name?

Thanks

tony

Apparently this is a bug, and has been handed back to the development team

Try with

$this->Pdf->Output('myfile');

I use the TCPDF all the time…(it’s located in /prod/third on your installation directory).

Something like this:

$pdf = new TCPDF…(Many online examples)

$htlm =