<%@ Language=VBScript %> <% Option Explicit Dim objConn, rs %> Batch Print QR Codes <% Dim strSQL strSQL = "SELECT p.printerid, p.printercsfname, p.printerwindowsname, p.ipaddress, m.modelnumber " & _ "FROM printers p LEFT JOIN models m ON p.modelid = m.modelnumberid " & _ "WHERE p.isactive = 1 " & _ "ORDER BY COALESCE(NULLIF(p.printercsfname, ''), p.printerwindowsname, CONCAT('Printer-', p.printerid))" Set rs = objConn.Execute(strSQL) %>

Batch Print Printer QR Codes

Select printers to print (6 per page):

<% Dim displayName Do While Not rs.EOF displayName = rs("printercsfname") & "" If displayName = "" Then displayName = rs("printerwindowsname") & "" End If If displayName = "" Then displayName = "Printer-" & rs("printerid") End If %>
, '<%=Server.HTMLEncode(Replace(rs("printercsfname") & "", "'", "\'"))%>', '<%=Server.HTMLEncode(Replace(rs("printerwindowsname") & "", "'", "\'"))%>', '<%=Server.HTMLEncode(Replace(rs("ipaddress") & "", "'", "\'"))%>', '<%=Server.HTMLEncode(Replace(rs("modelnumber") & "", "'", "\'"))%>')"> ">
<% rs.MoveNext Loop rs.Close Set rs = Nothing objConn.Close %>
Selected: 0 printers (0 pages)