ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #46  
Old May 13th, 2008, 04:02 AM
richyrich's Avatar
richyrich richyrich is offline
Contributing User
ASP Free Specialist (4000 - 4499 posts)
 
Join Date: Jun 2004
Location: Somewhere only we know...
Posts: 4,192 richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)  Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Months 1 Week 1 Day 17 h 21 m 25 sec
Reputation Power: 1209
Off the top of my head, I think you set a value for the checkbox in the PDF. Export value I think it's called and then in your code, if you want the checkbox checked, you set the value of it to this Export value.

Code:
output.FDFSetValue "checkbox1", "value_of_the_pdf_checkbox", false
Hope that helps.
__________________
Policy Check

I'd rather have a full bottle in front of me, than a full frontal lobotomy...

Reply With Quote
  #47  
Old May 13th, 2008, 04:22 AM
jesushax jesushax is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Aug 2007
Posts: 640 jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 12 h 30 m 32 sec
Reputation Power: 18
so maybe something like

Code:
<%
if recordset("CheckField1") = "1" then
output.FDFSetValue "checkbox1", "Yes", false
else
output.FDFSetValue "checkbox1", "No", false
End If

Reply With Quote
  #48  
Old May 13th, 2008, 05:08 AM
richyrich's Avatar
richyrich richyrich is offline
Contributing User
ASP Free Specialist (4000 - 4499 posts)
 
Join Date: Jun 2004
Location: Somewhere only we know...
Posts: 4,192 richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)  Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Months 1 Week 1 Day 17 h 21 m 25 sec
Reputation Power: 1209
Try this:-
Code:
if recordset("CheckField1") = "1" then output.FDFSetValue "checkbox1", "Yes", false

Assuming the value of the checkbox in the PDF is "Yes" and the default is it's unchecked. There's no need to set it to unchecked as it's defaulted to do this anyway. May as well save yourself some code. Also assumes your CheckField1 is a character field. If it's an integer, you may need to remove the quotes ie = 1 then

I would consider whether it's more likely to be checked than unchecked. Then set it to the most likely value in the PDF. You can then use code to either check it or uncheck it.
To uncheck I believe you need to set it to "Off":-
Code:
if not recordset("CheckField1") = "1" then output.FDFSetValue "checkbox1", "Off", false
Hope that helps.

Last edited by richyrich : May 13th, 2008 at 05:12 AM.

Reply With Quote
  #49  
Old May 13th, 2008, 05:08 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
Click here for more information.
 
Join Date: Sep 2004
Location: Israel
Posts: 26,969 Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 8th Grade (Above 100000 Reputation Level)  Folding Points: 342040 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342040 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342040 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342040 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342040 Folding Title: Super Ultimate Folder - Level 1Folding Points: 342040 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 1 Week 5 Days 15 h 9 m 16 sec
Reputation Power: 1556
syntax looks fine, bit better coding would be:
Code:
Dim strCheckBoxValue
If recordset("CheckField1") = "1" Then
   strCheckBoxValue = "Yes"
Else  
   strCheckBoxValue = "No"
End If
output.FDFSetValue "checkbox1", strCheckBoxValue, False

Reply With Quote
  #50  
Old May 14th, 2008, 03:48 AM
jesushax jesushax is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Aug 2007
Posts: 640 jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 12 h 30 m 32 sec
Reputation Power: 18
Question

thanks got that going, but this is wierd now, infact its ridiculous

my code

Code:
<!--#include virtual='/includes/dbconnection.inc'--> 
<%
ID = request.querystring("ID")
SQL = "SELECT * FROM tblRegistrations WHERE UserID="& ID
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open SQL, adoCon

If rs.EOF Then
response.Write "That ID Does not exist"

Else

set fdf = Server.CreateObject("FdfApp.FdfApp")

set output = fdf.FDFCreate

'from a recordset
output.FDFSetValue "Name",rs("UName"), false
output.FDFSetValue "Address1",rs("add1"), false
output.FDFSetValue "Address2",rs("add2"), false
output.FDFSetValue "Address3",rs("add3"), false
output.FDFSetValue "Address4",rs("add4"), false
output.FDFSetValue "Postcode",rs("Postcode"), false
output.FDFSetValue "Tel",rs("Tel"), false
output.FDFSetValue "Mobile",rs("Mobile"), false
output.FDFSetValue "Email",rs("Email"), false
output.FDFSetValue "NINO",rs("NINO"), false
output.FDFSetValue "DOB", rs("DOB"), false

error message:
Quote:
Microsoft VBScript runtime error '800a000d'

Type mismatch: 'output.FDFSetValue'

/vivergo/registrees.asp, line 27


line 27 is in red, how can i have a type mismatch if ive it works on the lines before it?
its exactly the same in everyway but it wont let me add DOB or NINO

no matter where i put them i get that message
but i dont understand how it can give me that message
if it works on 200+ other lines of code :S

Reply With Quote
  #51  
Old May 14th, 2008, 04:14 AM
richyrich's Avatar
richyrich richyrich is offline
Contributing User
ASP Free Specialist (4000 - 4499 posts)
 
Join Date: Jun 2004
Location: Somewhere only we know...
Posts: 4,192 richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)  Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Months 1 Week 1 Day 17 h 21 m 25 sec
Reputation Power: 1209
What type of fields are rs("NINO") and rs("DOB")?

Reply With Quote
  #52  
Old May 14th, 2008, 04:41 AM
jesushax jesushax is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Aug 2007
Posts: 640 jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 12 h 30 m 32 sec
Reputation Power: 18
text fields, just like the rest
:S

Reply With Quote
  #53  
Old May 14th, 2008, 04:51 AM
richyrich's Avatar
richyrich richyrich is offline
Contributing User
ASP Free Specialist (4000 - 4499 posts)
 
Join Date: Jun 2004
Location: Somewhere only we know...
Posts: 4,192 richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)  Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Months 1 Week 1 Day 17 h 21 m 25 sec
Reputation Power: 1209
Are they NULL on the record you're getting the details for?

Reply With Quote
  #54  
Old May 14th, 2008, 04:53 AM
jesushax jesushax is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Aug 2007
Posts: 640 jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 12 h 30 m 32 sec
Reputation Power: 18
yes, this matter?

Reply With Quote
  #55  
Old May 14th, 2008, 05:02 AM
richyrich's Avatar
richyrich richyrich is offline
Contributing User
ASP Free Specialist (4000 - 4499 posts)
 
Join Date: Jun 2004
Location: Somewhere only we know...
Posts: 4,192 richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)  Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1Folding Points: 117793 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 2 Months 1 Week 1 Day 17 h 21 m 25 sec
Reputation Power: 1209
Yes. You cannot pass NULL values to the FDF.

Try this:-
Code:
if not isnull(rs("NINO")) then output.FDFSetValue "NINO",rs("NINO"), false
if not isnull(rs("DOB")) then output.FDFSetValue "DOB", rs("DOB"), false
In fact, you should use this check on all the fields you're retrieving.

Reply With Quote
  #56  
Old May 14th, 2008, 05:13 AM
jesushax jesushax is offline
Contributing User
ASP Free Novice (500 - 999 posts)
 
Join Date: Aug 2007
Posts: 640 jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level)jesushax User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 12 h 30 m 32 sec
Reputation Power: 18
thats the trick, that does it!
much appreciated
ill add to the rest of the fields to check now

i dont think ill have any more problems with this now, thank god lol

but i just want to thank you for all your help and assistance
youve been really patient and helpful
and youve helped me alot

for this a thank you
alot!

thanks again

Reply With Quote
  #57  
Old May 14th, 2008, 05:18 AM
richyrich's Avatar
richyrich richyrich is offline
Contributing User
ASP Free Specialist (4000 - 4499 posts)
 
Join Date: Jun 2004
Location: Somewhere only we know...
Posts: 4,192 richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)richyrich User rank is General 4th Grade (Above 100000 Reputation Level)