|
-
Aug 21st, 2000, 06:00 PM
#1
Thread Starter
Fanatic Member
Is there anyway of printing a DBGrid with line's and headings and content, at present I am sending the information to a RTB and printing from there not very good as the content gets out of shape etc
Cheers
Spud
-
Aug 22nd, 2000, 01:36 AM
#2
Member
Chrystal report
I don't know how to print a dbgrid directly to the printer, but can't you print it with crystal reports?
-
Aug 22nd, 2000, 04:04 PM
#3
Thread Starter
Fanatic Member
Red Thread, I'm new at this can you help on the crystal reports ive found it in VB but havent a clue what to do!
Does it let you print off reports in your application that you have made or does it just allow you to print reports within crystel report itself?
Spud
-
Aug 22nd, 2000, 04:32 PM
#4
Thread Starter
Fanatic Member
Sorry Red, read up on crystal reports just the thing I need sort off, question the reason i was trying to print the dbgrid was because it contained a search result in it is it posible to do this with crystel reports
Cheers
Spud
(going to post this as a new thread)
-
Aug 22nd, 2000, 04:41 PM
#5
-
Aug 22nd, 2000, 04:52 PM
#6
Thread Starter
Fanatic Member
Cheers Red
Im going to log of now and give it a try and I will get back to you thanks for helping out!
Spud
-
Aug 23rd, 2000, 11:17 AM
#7
Member
Read This...
Ok, lets start....
1) make your report the way you want... BUT when you save, DON'T select the "Save data with report". Your report may not contain data. Whe are going to do that...
2) How? Well, send your sql string along !
In the code below you see how is it done. In my sql i state that i will have all artikels where the name the same is as the one in my textbox.
report1.ReportFileName = App.Path & "\detailreport.rpt"
report1.SelectionFormula = "{ARTIKELS.AT_NAME} = '" & txt_name.text & "'"
report1.PrintReport
With this you normally have everything you need to know.
Good luck.
-
Aug 23rd, 2000, 01:21 PM
#8
Thread Starter
Fanatic Member
Sorry to be a pain Red but can you look at this:
CrystalReport1.ReportFileName = App.Path & "\RecruitSG\new.rpt"
CrystalReport1.SelectionFormula = "{LastName} = '" & Text1.Text & "'"
CrystalReport1.PrintReport
Nothing happens, I dont realy understand the SelectionFormula bit of the code could you help?
Report file: new.rpt
Search textbox: text1.text
Colum to search: LastName
Data Control: data1
Thanks again
-
Aug 23rd, 2000, 03:53 PM
#9
Member
Euhh...
Look fine at first look, but it will be usefull i've you send me you project. So i can look in detail myself.
I see you only use lastname, but you must write the databasetabel also. ex tabel1.lastname
-
Aug 23rd, 2000, 05:01 PM
#10
Thread Starter
Fanatic Member
Your correct!!!
Thats what was wrong I didnt put the table name in but its working fine now, I hope one day I can return the help Red as this has helped me out a grate deal.
Once again thanks!
Spud
-
Aug 23rd, 2000, 05:30 PM
#11
Member
No thx...
pleasure to help.
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
|