In developer guide there is not any single example for use of the datasource property.
So can you give me short example of datasource ?
I am very Happy for QUICK RESPONCE to previous Problems
KamleshvGujarathi
kamlesh@itshastra.com
Can you please give datasource example ?
-
- Posts: 39
- Joined: Fri Jan 09 2004
- Location: Bombay ( INDIA)
- Contact:
Can you please give datasource example ?
Here is a small VB sample on attaching a pdf file to a database.
=========================================
Dim pdf As New ACPDFCREACTIVEX.PDFCreactiveX
With pdf
.SetLicenseKey Licensee, ActivationCode
'Create a text object
.CreateObject acObjectTypeText, "Mytext"
'Position the text
.ObjectAttribute("Mytext", "Left") = 600
.ObjectAttribute("Mytext", "Top") = 600
.ObjectAttribute("Mytext", "Right") = 700
.ObjectAttribute("Mytext", "Bottom") = 700
.ObjectAttribute("Mytext", "Text") = " GETTING INFORMATION FROM A DATABASE"
'Set the data source to an Access file
.DataSource = "University.mdb"
'Set the main table
.DataTableOrView = "Majors"
'Create a field object
.CreateObject acObjectTypeField, "Field1"
'Position Field1
.ObjectAttribute("Field1", "Left") = 1000
.ObjectAttribute("Field1", "Top") = 1000
.ObjectAttribute("Field1", "Right") = 2000
.ObjectAttribute("Field1", "Bottom") = 1500
'Set the object value to be:
'the field CreditsRequired (( multiplied by (*) the field FeesInUSD))
.ObjectAttribute("Field1", "Text") = "=Majors.FeesInUSD * Majors.CreditsRequired"
'Save the pdf file
.Save "Test2.pdf", 0
End With
Set pdf = Nothing
===================================
Hope this helps.
=========================================
Dim pdf As New ACPDFCREACTIVEX.PDFCreactiveX
With pdf
.SetLicenseKey Licensee, ActivationCode
'Create a text object
.CreateObject acObjectTypeText, "Mytext"
'Position the text
.ObjectAttribute("Mytext", "Left") = 600
.ObjectAttribute("Mytext", "Top") = 600
.ObjectAttribute("Mytext", "Right") = 700
.ObjectAttribute("Mytext", "Bottom") = 700
.ObjectAttribute("Mytext", "Text") = " GETTING INFORMATION FROM A DATABASE"
'Set the data source to an Access file
.DataSource = "University.mdb"
'Set the main table
.DataTableOrView = "Majors"
'Create a field object
.CreateObject acObjectTypeField, "Field1"
'Position Field1
.ObjectAttribute("Field1", "Left") = 1000
.ObjectAttribute("Field1", "Top") = 1000
.ObjectAttribute("Field1", "Right") = 2000
.ObjectAttribute("Field1", "Bottom") = 1500
'Set the object value to be:
'the field CreditsRequired (( multiplied by (*) the field FeesInUSD))
.ObjectAttribute("Field1", "Text") = "=Majors.FeesInUSD * Majors.CreditsRequired"
'Save the pdf file
.Save "Test2.pdf", 0
End With
Set pdf = Nothing
===================================
Hope this helps.