Print by passing ID

Print by passing ID

johnwjohnw Posts: 13Questions: 5Answers: 0

I'm new to Data Table, so please point me in the right direction.

I'm using Coldfusion to generate a customized report in PDF. At the Datatable, I would like to print a one page report for each of the records. So instead of printing one report at a time, I would like to have a button next to the 'excel' button called 'custom print' that would call the coldfusion file and perform a batch print by passing all of the ID's to the test_page.cfm page. What is the best way of doing this. Thanks.

For each row, my code is shown below.

{ "data": "ID",
"fnCreatedCell": function (nTd, sData, oData, iRow, iCol) {
$(nTd).html("<a href='test_page.cfm?p="+oData.ID+"'>"+"Schedule"+"</a><br><a href='dd1970.cfm?comid="+oData.ID+"' target='_blank' >"+"Print DD 1970"+"</a>"); }
},

Replies

  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin

    You would need to create a custom button that would do what you are looking for - there isn't a built in way of doing it.

    What I would suggest is simply opening a new window in the browser, pointing it to a print specific URL, which you can then use CF to render as you need for the print view required.

    Allan

  • johnwjohnw Posts: 13Questions: 5Answers: 0

    Thanks Allan!

This discussion has been closed.