-
Jun 27th, 2014, 02:50 AM
#1
Thread Starter
Lively Member
[RESOLVED] Record wise printing in vb 6
Hello All
I'm Using Crystal Report to printing Records..
In VB 6 i'm using this codes to retrieve Records from access
Code:
With CR
.ReportFileName = App.Path & "\Report\A4_WN.rpt"
.ReplaceSelectionFormula "{R_Patient.regno} =" & Text1.Text & ""
.Connect = "Dsn=GK DATA;Uid=sa;pwd=admin;dsq=database"
.Destination = crptToWindow
.WindowState = crptMaximized
.Action = 1
End With
sometimes i want to print specific records.(USING LISTVIEW CONTROL(WITH CHECK BOXES))
but how can i write code(Selection formula) for this.
Please Help
Thanks .....Sorry for my English.....
-
Jun 27th, 2014, 05:02 AM
#2
Re: Record wise printing in vb 6
i have not used .ReplaceSelectionFormula so i cant say much about this. what i know it can be done is: a) set a report parameter to filter for specific records and b) assign an ado recordset as DataSource for the report and thus bypassing all database queries of the report. The latter can be done by using Report.Database.SetDataSource (CR Runtime Lib version 11)
-
Jul 14th, 2014, 12:51 AM
#3
Hyperactive Member
Re: Record wise printing in vb 6
Originally Posted by kamalkumar2023
Hello All
I'm Using Crystal Report to printing Records..
In VB 6 i'm using this codes to retrieve Records from access
Code:
With CR
.ReportFileName = App.Path & "\Report\A4_WN.rpt"
.ReplaceSelectionFormula "{R_Patient.regno} =" & Text1.Text & ""
.Connect = "Dsn=GK DATA;Uid=sa;pwd=admin;dsq=database"
.Destination = crptToWindow
.WindowState = crptMaximized
.Action = 1
End With
sometimes i want to print specific records.(USING LISTVIEW CONTROL(WITH CHECK BOXES))
but how can i write code(Selection formula) for this.
Please Help
Thanks .....Sorry for my English.....
I have done this with my own logic, your listview have checkboxes now place a button under the listview.. choose the checkboxes and press the button where as in backend in the database create a temp table which stores that data which is selected in listview ( data will be stores when you press the button so code on the button to store data from the listview to the database ) now set the datasource of the report to that table and print.. after printing use a loop to clear the table.
-
Jul 14th, 2014, 10:19 PM
#4
Thread Starter
Lively Member
Re: Record wise printing in vb 6
Thanks Mr.Hamza.. I Already solved this thread. And same method of your...
Thanks Again...
-
Jul 15th, 2014, 01:37 AM
#5
Hyperactive Member
Re: Record wise printing in vb 6
Originally Posted by kamalkumar2023
Thanks Mr.Hamza.. I Already solved this thread. And same method of your...
Thanks Again...
welcome bhai
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|