Click here to Skip to main content
15,919,749 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: FSO.FolderExists Problem Pin
Steven J Jowett27-Jun-07 5:14
Steven J Jowett27-Jun-07 5:14 
GeneralRe: FSO.FolderExists Problem Pin
Dave Kreskowiak27-Jun-07 5:29
mveDave Kreskowiak27-Jun-07 5:29 
AnswerRe: FSO.FolderExists Problem Pin
DanB198327-Jun-07 4:01
DanB198327-Jun-07 4:01 
Questiondata gride question Pin
magedhv27-Jun-07 0:40
magedhv27-Jun-07 0:40 
AnswerRe: data gride question Pin
Rupesh Kumar Swami27-Jun-07 1:26
Rupesh Kumar Swami27-Jun-07 1:26 
QuestionRe: data gride question Pin
magedhv27-Jun-07 21:42
magedhv27-Jun-07 21:42 
AnswerRe: data gride question Pin
Rupesh Kumar Swami27-Jun-07 21:46
Rupesh Kumar Swami27-Jun-07 21:46 
Questionhow to use VSprinter????? Pin
ShuklaGirish27-Jun-07 0:34
ShuklaGirish27-Jun-07 0:34 
Can anyone explain me how to use VSprinter in vb 6.0.
Actully i am not getting correct output as i want i am sending you the code pls go through it and tell me wt is wrong in this code.


Dim maindata As ADODB.Recordset
Public db As New ADODB.Connection
Dim connstring As String

Private Sub Form_Load()

connstring = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sqlserver;Password=sqlserver;Initial Catalog=master;Data Source=."
db.ConnectionString = connstring
db.Open


Set maindata = New ADODB.Recordset
maindata.CursorLocation = adUseClient
maindata.CursorType = adOpenDynamic
maindata.Open "select * from login", db, adOpenDynamic, adLockPessimistic



vp.Orientation = orLandscape

vp.PaperSize = pprA4
vp.FontName = "Courier New"
vp.MarginTop = "0.5 in"
vp.MarginBottom = "0.5 in"
vp.MarginHeader = "0.5 in"
vp.MarginLeft = "0.5 in"
vp.MarginRight = "0.5 IN"
vp.ExportFormat = vpxRTF
vp.ExportFile = App.Path + "\tempph.rtf"

vp.StartDoc
vp.Zoom = 100
Header
vp.FontSize = 11
Dim PendingQty As Double
Dim DespQty As Double
Dim totPending As Double
totPending = 0
Do While Not maindata.EOF

' vp.AddTable FormatStr, HeaderStr, maindata!dono & vbCrLf & maindata!dodate & "|" & maindata!CustName & vbCrLf & maindata!IName & "|" & maindata!dcity & vbCrLf & maindata!despdate & "|" & maindata!Unit & "|" & Format(maindata!Qty, "0.000") & "|" & Format(DespQty, "0.000") & "|" & Format(PendingQty, "0.000"), , , True
vp.AddTable formatstr, headerstr, maindata!id & vbCrLf & maindata!Name & "|" & maindata!address & vbCrLf & maindata!phone & "|" & maindata!fax & vbCrLf & maindata!email & "|" & maindata!id & "|" & Format(maindata!id, "0.000") & "|" & Format(id, "0.000") & "|" & Format(id, "0.000"), , , True

'vp.AddTable FormatStr, HeaderStr, maindata!id & maindata!Name & maindata!phone & maindata!address & email, , , True

' vp.AddTable formatstr, headerstr, maindata!phone & "|" & maindata!Name & "|" & maindata!fax, , , True
'vp.Paragraph = FormatS(maindata!Dono, 12) + " | " + FormatS(Left(maindata!custname, 30), 30) + " | " + FormatS(maindata!dcity, 13) + " | " + FormatS(maindata!unit, 6) + " | " + FormatN(maindata!qty, "#######0.000") + " | " + FormatN(DespQty, "######0.000") + " | " + FormatN(PendingQty, "####0.000")
'vp.Paragraph = FormatS(maindata!dodate, 12) + " | " + FormatS(Left(maindata!IName, 30), 30) + " | " + FormatS(" ", 13) + " | " + FormatS(" ", 6) + " | " + (" ") + " | " + (" ") + " | " + (" ")
'vp.Paragraph = FormatS(" ", 12) + " | " + FormatS(" ", 30) + " | " + FormatS(" ", 13) + " | " + FormatS(" ", 6) + " | " + (" ") + " | " + (" ") + " | " + (" ")
'totPending = totPending + PendingQty

If vp.CurrentY > vp.PageHeight - vp.MarginBottom - vp.MarginTop Then
'vp.Paragraph = String(100, "-") + " Continue........"
vp.DrawLine vp.MarginLeft, vp.CurrentY, vp.PageWidth - vp.MarginRight, vp.CurrentY
vp.NewPage
Header
End If

maindata.MoveNext

Loop
vp.DrawLine vp.MarginLeft, vp.CurrentY, vp.PageWidth - vp.MarginRight, vp.CurrentY
vp.FontBold = True
vp.AddTable formatstr, headerstr, "||||| Total |", , , True
vp.FontBold = False
vp.DrawLine vp.MarginLeft, vp.CurrentY, vp.PageWidth - vp.MarginRight, vp.CurrentY

'vp.Paragraph = String(112, "-")
'vp.FontBold = True
'vp.Paragraph = FormatS(" ", 25) + " " + FormatS(" ", 30) + " " + FormatS(" ", 6) + " " + " " + " " + " Total : " + " | " + FormatN(totPending, "####0.000")
'vp.FontBold = False
'vp.Paragraph = String(112, "-")
vp.EndDoc
'cmdExport.Enabled = True

End Sub
Private Sub Header()
vp.FontName = "Arial"
vp.TextAlign = taLeftTop
vp.FontBold = True
vp.FontSize = 20
vp.Paragraph = "Ashapura Volclay Ltd."
vp.FontSize = 14
vp.FontBold = False
vp.Paragraph = "Pending Delivery Report"
vp.FontSize = 12
'vp.Paragraph = "From : " + FormatS(TSDATE, 11) + "To : " + FormatS(TEDATE, 11)
vp.Paragraph = "From : To : "
vp.TextAlign = taLeftTop
vp.TextAlign = taRightTop
vp.Paragraph = "Page No : " & vp.CurrentPage
vp.TextAlign = taLeftTop
vp.FontSize = 10
vp.TableBorder = tbNone
formatstr = "1500|>1600|>1600|>1600|>1600|>1600"
headerstr = "Do No " & vbCrLf & "Do Date|Customer Name " & vbCrLf & "Grade|Despatch City " & vbCrLf & "Despatch Date|Unit|Ord.Qty|Desp.Qty|Pending Qty"
'headerstr = "ID|Name|Phone|Address|Fax|Email"
vp.DrawLine vp.MarginLeft, vp.CurrentY, vp.PageWidth - vp.MarginRight, vp.CurrentY
vp.FontBold = True
vp.AddTable formatstr, headerstr, "||||||||", , , False
vp.FontBold = False
vp.DrawLine vp.MarginLeft, vp.CurrentY, vp.PageWidth - vp.MarginRight, vp.CurrentY

'vp.Paragraph = "DO No " + " | " + "Customer Name " + " | " + "Despatch " + " | " + "Unit " + " | " + " Ord.Qty." + " | " + " Desp.Qty" + " | " + "Pending Qty."
' vp.Paragraph = "DO Date " + " | " + "Grade " + " | " + "City " + " | " + " " + " | " + " " + " | " + " " + " | "
'vp.FontBold = False
'vp.Paragraph = String(112, "-")
End Sub



GIRISH
Questionimage from server to image box ? Pin
porsti27-Jun-07 0:28
porsti27-Jun-07 0:28 
AnswerRe: image from server to image box ? Pin
Dave Kreskowiak27-Jun-07 5:02
mveDave Kreskowiak27-Jun-07 5:02 
QuestionTyped Dataset Pin
ShuklaGirish26-Jun-07 23:36
ShuklaGirish26-Jun-07 23:36 
Questionbutton and combobox in a Component Pin
anujose26-Jun-07 23:13
anujose26-Jun-07 23:13 
AnswerRe: button and combobox in a Component Pin
Tamimi - Code26-Jun-07 23:36
Tamimi - Code26-Jun-07 23:36 
GeneralRe: button and combobox in a Component Pin
anujose26-Jun-07 23:39
anujose26-Jun-07 23:39 
GeneralRe: button and combobox in a Component Pin
Tamimi - Code26-Jun-07 23:51
Tamimi - Code26-Jun-07 23:51 
AnswerRe: button and combobox in a Component Pin
Craster26-Jun-07 23:47
Craster26-Jun-07 23:47 
AnswerRe: button and combobox in a Component Pin
Dave Kreskowiak27-Jun-07 3:50
mveDave Kreskowiak27-Jun-07 3:50 
QuestionThere must be a better way to enter lots of strongly typed properties in a class Pin
MartyK200726-Jun-07 22:41
MartyK200726-Jun-07 22:41 
AnswerRe: There must be a better way to enter lots of strongly typed properties in a class Pin
MohammadAmiry27-Jun-07 0:41
MohammadAmiry27-Jun-07 0:41 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
MartyK200727-Jun-07 1:06
MartyK200727-Jun-07 1:06 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
Taylor Kobani27-Jun-07 1:55
Taylor Kobani27-Jun-07 1:55 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
MartyK200727-Jun-07 2:04
MartyK200727-Jun-07 2:04 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
Dave Kreskowiak27-Jun-07 3:49
mveDave Kreskowiak27-Jun-07 3:49 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
MartyK200727-Jun-07 3:53
MartyK200727-Jun-07 3:53 
GeneralRe: There must be a better way to enter lots of strongly typed properties in a class Pin
Dave Kreskowiak27-Jun-07 4:10
mveDave Kreskowiak27-Jun-07 4:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.