petertran123
05-07-2003, 05:48 PM
Dear All,
I have a page showing all the record from database. Now, i want to add a button call "Print Report ". According to the code below when the checkbox has being checked and i can hit the Print Report button to print out what box has being checked on through the database. Can anyone help me with that...Thank you much
& "<TABLE BORDER=0 cellspacing=""1"" cellpadding=""5"" align=""center"">" & vbCrlf
Dim iLoop
strReturn = strReturn & vbCrlf _
& " <TR>" & vbCrlf _
& " <TH class=""header""> </TH>" & vbCrlf _
& " <TH class=""header"">First Name</TH>" & vbCrlf _
& " <TH class=""header"">Last Name</TH>" & vbCrlf _
& " <TH class=""header"">Primary SSN</TH>" & vbCrlf _
& " <TH class=""header"">Check Amount</TH>" & vbCrlf _
& " <TH class=""header"">Date</TH>" & vbCrlf _
& " </TR>" & vbCrlf
Dim iCount
iCount = 0
Do While Not rsData.EOF ' If the selected report contains data, include the following code
strReturn = strReturn & vbCrlf _
& "<TR class=""standard"">" & vbCrlf _
& "<TD ALIGN=""CENTER"">" & vbCrlf _
& "<INPUT TYPE=""CHECKBOX"" NAME=""checkall"" VALUE=""" & rsData("TRANS_ID") & """>" & vbCrlf _
& "</TD>" & vbCrlf _
& "<TD>" & rsData("PrimaryNameFirst") & "</TD>" & vbCrlf _
& "<TD>" & rsData("PrimaryNameLast") & "</TD>" & vbCrlf _
& "<TD>" & rsData("PrimarySSN") & "</TD>" & vbCrlf _
& "<TD>" & rsData("CheckAmt") & "</TD>" & vbCrLf _
& "<TD>" & rsData("CheckDate") & "</TD>" & vbCrlf _
& "<INPUT TYPE=HIDDEN NAME=""" & iCount & ".TRANS_ID"" VALUE=""" & rsData("TRANS_ID") & """>" & vbCrLf _
& "</TD></TR>" & vbCrLf
'Move to the next record...
rsData.MoveNext
'Increment the count variable
iCount = iCount + 1
Loop
I have a page showing all the record from database. Now, i want to add a button call "Print Report ". According to the code below when the checkbox has being checked and i can hit the Print Report button to print out what box has being checked on through the database. Can anyone help me with that...Thank you much
& "<TABLE BORDER=0 cellspacing=""1"" cellpadding=""5"" align=""center"">" & vbCrlf
Dim iLoop
strReturn = strReturn & vbCrlf _
& " <TR>" & vbCrlf _
& " <TH class=""header""> </TH>" & vbCrlf _
& " <TH class=""header"">First Name</TH>" & vbCrlf _
& " <TH class=""header"">Last Name</TH>" & vbCrlf _
& " <TH class=""header"">Primary SSN</TH>" & vbCrlf _
& " <TH class=""header"">Check Amount</TH>" & vbCrlf _
& " <TH class=""header"">Date</TH>" & vbCrlf _
& " </TR>" & vbCrlf
Dim iCount
iCount = 0
Do While Not rsData.EOF ' If the selected report contains data, include the following code
strReturn = strReturn & vbCrlf _
& "<TR class=""standard"">" & vbCrlf _
& "<TD ALIGN=""CENTER"">" & vbCrlf _
& "<INPUT TYPE=""CHECKBOX"" NAME=""checkall"" VALUE=""" & rsData("TRANS_ID") & """>" & vbCrlf _
& "</TD>" & vbCrlf _
& "<TD>" & rsData("PrimaryNameFirst") & "</TD>" & vbCrlf _
& "<TD>" & rsData("PrimaryNameLast") & "</TD>" & vbCrlf _
& "<TD>" & rsData("PrimarySSN") & "</TD>" & vbCrlf _
& "<TD>" & rsData("CheckAmt") & "</TD>" & vbCrLf _
& "<TD>" & rsData("CheckDate") & "</TD>" & vbCrlf _
& "<INPUT TYPE=HIDDEN NAME=""" & iCount & ".TRANS_ID"" VALUE=""" & rsData("TRANS_ID") & """>" & vbCrLf _
& "</TD></TR>" & vbCrLf
'Move to the next record...
rsData.MoveNext
'Increment the count variable
iCount = iCount + 1
Loop