| | |
Re: How to Create A Report In VB
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
I can think of 2 function that could able to help you.
#1 Printing by IE
#2 Print Any kind of File
' #1 Print By IE
#2 PrintFile Function
#1 Printing by IE
#2 Print Any kind of File
' #1 Print By IE
vbnet Syntax (Toggle Plain Text)
Dim oIE Dim FileName FileName = "c:\myfile.txt" ' or .html or .xml depending on where you stored the data you want to print oIE = CreateObject("InternetExplorer.Application") oIE.Visible = True ' You can change this to False oIE.Navigate2 (FileName) While oIE.ReadyState <> 4 Wend oIE.ExecWB 6, 0 ' Print 'oIE.ExecWB 7, 0 ' Print Preview
#2 PrintFile Function
vb.net Syntax (Toggle Plain Text)
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _ (ByVal hwnd As Long, _ ByVal lpOperation As String, _ ByVal lpFile As String, _ ByVal lpParameters As String, _ ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long FileName = "c:\myfile.txt" ' Any kind of file (xls doc xml html ) nRetVal = ShellExecute(0, "Print", FileName, "", "", 0)
It is vb6 but I did not know what is [ code=What? ] [ /code ] to write in vb6 syntax 
Actually I don't have any vb code to share.
The above 2 examples are my code in Visual foxpro, and I convert them to vb6 when I saw this message
Did you try the above example and they did not work?
What do you need to know more ?

•
•
•
•
do u have any vb code to share?
The above 2 examples are my code in Visual foxpro, and I convert them to vb6 when I saw this message

•
•
•
•
please support this thread even it 2 year old posted. ^_^
What do you need to know more ?
![]() |
Similar Threads
- generating one report from multiple tables (Visual Basic 4 / 5 / 6)
- Vb report generation (Visual Basic 4 / 5 / 6)
- Creating a form that display a continuous collection of pics (MS Access and FileMaker Pro)
- printing several objects (VB.NET)
- Help in understanding Adwords conversion tracking report (Search Engine Optimization)
- Network access ksh (Shell Scripting)
- Problems with VB6 and excel (Visual Basic 4 / 5 / 6)
- Creating dynamic Reports (ASP.NET)
- Coldfusion MX Report Builder Pagination (ColdFusion)
- Winsock and looping issues unsure how to resolve (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Insert Background Image in Excel Sheet
- Next Thread: Uploading/downloading
Views: 3959 | Replies: 6
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp c++ calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sort sql sql2008 sqlserver struct subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






