Forums

This topic is locked

printing one record from repeat region

Posted 28 Sep 2002 08:05:36
1
has voted
28 Sep 2002 08:05:36 Dave Clarke posted:
Hi

I have a page/pages with a repeat region showing 5 records at a time, how can i add a button/image that when clicked would print one record, no backgrounds, menus, buttons or anything just the record in question??

Dave

Replies

Replied 28 Sep 2002 09:45:06
28 Sep 2002 09:45:06 Dave Thomas replied:
Lo Dave,

I saw something for this a while back and it was definatley a Javascript.
Will have a look and try and find it again for ya <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Regards,
Dave

UD4 || Flash || Access ||Web Hosting
Replied 28 Sep 2002 17:42:44
28 Sep 2002 17:42:44 Jeremy Conn replied:
Easiest way I coulc think of would to be to link the default MX "Go to Detail Page" behavior to some little print icon next to each item of the recordset. Then, send that to a blank page that is filtered by the ID being passed from the "Go to Detail Page" behavior.

Your result will be whichever item you selected in a blank page. You can them print or make the page print when it loads.

If you wanted to create a print button, it could look like this:
<font color=green>&lt;form&gt;
&lt;input name="Print" onClick="window.print();return false" type="button" value="Print Schedule"&gt;
&lt;/form&gt;</font id=green>


(DWMX|IIS5|WXP|ASP/VB)
*Connman21*
www.conncreativemedia.com
Replied 29 Sep 2002 05:35:14
29 Sep 2002 05:35:14 Dave Clarke replied:
thanks Dave & connman

the create new page and print it out onload is what i was thinking about myself connman, might give it a go.

Dave
Replied 29 Sep 2002 07:57:25
29 Sep 2002 07:57:25 Dave Clarke replied:
hi

I've done it, when the user clicks on the "Print" button image it opens up a new window which contains the detail page of that record, just a blank page with the record on it, this starts to print onload, then closes automatically once printing has started or the user cancels the print.
used <b>window.print()</b> and <b>window.close()</b>

Dave

Edited by - Davecl on 29 Sep 2002 08:03:42
Replied 30 Sep 2002 07:32:48
30 Sep 2002 07:32:48 Jeremy Conn replied:
Glad to hear that worked for you...

(DWMX|IIS5|WXP|ASP/VB)
*Connman21*
www.conncreativemedia.com

Reply to this topic