Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 09-03-2003, 01:59 AM
hossein hossein is offline
Member
 
Join Date: Oct 2002
Posts: 77
Default print dbgrid

hello
I want to print dbgrid information in delphi ,
Can i print it ?
If you have any other component that i can print it's information , please tell me.
I'm waiting ...
Best regards
Bye...
h o s s e i n
Reply With Quote
  #2  
Old 09-03-2003, 02:33 AM
kalifat kalifat is offline
Senior Member
 
Join Date: Apr 2003
Posts: 623
Default RE: print dbgrid

Its not hard

Probably your DbGrid is connected with some DataSet like TTable or TQuery (via DataSource).

Then use QuickReport for this

1. create new form and add from Delphi component QReport page
- QuickRep1:TQuickRep;
- QRBand1:TQRBand;
- some TQRDBText (count = number of DbGrid columns) on QRBand1

2. QRBand1.BandType:=rbDetail; // rbDetail - call for each record

3. use unit with DataSource1
4. code your TQRDBTexts
- choose property DataSet f.e(Query1)
- choose property DataField f.e.(IDCol)

5. you can use following metods on your main form
- preview FormQR.QuickRep1.Preview; or PreviewModal;
- print FormQR.QuickRep1.Print;

or property
- setting page size and margins - QuickRep1.Page
- setting printing parameters - QuickRep1.PrinterSetting or QuickRep1.Printer


<cr>Accept if it helps</cr>
Reply With Quote
  #3  
Old 09-03-2003, 02:37 AM
mshkolnik mshkolnik is offline
Senior Member
 
Join Date: Jul 2001
Posts: 4,195
Default RE: print dbgrid

Check the TSMPrintData component from SMReport Autogenerated: http://www.scalabium.com/smr

This component allow to print any linked dbgrid/dataset (any wide).

Support macros (so you may add a logo in header, for example), custom preview form (so you may integrate with your current report engine - QR< RB, FR etc), automatical data grouping, calculation sub-totals, highlights (for example, to print in bold if customer is from USA), export generated report in different formats (XLS, CSV, Text, HTML, XML, PDF...) etc

With best regards, Mike Shkolnik
http://www.scalabium.com
Reply With Quote
  #4  
Old 09-03-2003, 01:00 PM
johnjces johnjces is offline
Senior Member
 
Join Date: Oct 2001
Posts: 444
Default RE: print dbgrid

Try...

http://www.delphipages.com/edit/count.cfm?ID=3418

(Search TPrintGrid on DelphiPages and you will find this)

John Jarrett
Reply With Quote
  #5  
Old 09-04-2003, 03:31 AM
douglas douglas is offline
Senior Member
 
Join Date: Jul 2001
Posts: 7,695
Default RE: print dbgrid

Its not hard

Probably your DbGrid is connected with some DataSet like TTable or TQuery (via DataSource).

Then use QuickReport for this

1. create new form and add from Delphi component QReport page
- QuickRep1:TQuickRep;
- QRBand1:TQRBand;
- some TQRDBText (count = number of DbGrid columns) on QRBand1

2. QRBand1.BandType:=rbDetail; // rbDetail - call for each record

3. use unit with DataSource1
4. code your TQRDBTexts
- choose property DataSet f.e(Query1)
- choose property DataField f.e.(IDCol)

5. you can use following metods on your main form
- preview FormQR.QuickRep1.Preview; or PreviewModal;
- print FormQR.QuickRep1.Print;

or property
- setting page size and margins - QuickRep1.Page
- setting printing parameters - QuickRep1.PrinterSetting or QuickRep1.Printer
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:40 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.