[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

a question about QuicReport

i have a data table,it only has one
field ,the field name is 'A1'. now i want to print all data in this table in  QuickReport . In the report i need two colunms,the first column print 'A1' and the other column print column 'A1' too. For example the first column print record 1--20,the other column print record 21--40. who can tell me how to do this? thank you very much in advance.  
0
zhangyunchao
Asked:
zhangyunchao
  • 3
  • 2
1 Solution
 
kretzschmarCommented:
hi zhangyunchao,

in quickrep1 (TQuickRep) change the property page->columns to 2. drop a detailband on the left side, place your field in the detailband. ready.
(i do so that the database-entries are already done)

meikl
0
 
zhangyunchaoAuthor Commented:
i will test it after a while thank you!
0
 
kretzschmarCommented:
well ok, zhangyunchao, no problem,

one appendix, as i suggest, the report prints first the left side down on one page until page-end and then the right side.

if you will force a coloumn-change after a specific count you can use the beforeprint-event where you increase a record counter and if a specific value is reached, you can call the newcolumn-method. in code it looks like

procedure TForm1.QRBand1BeforePrint(Sender: TQRCustomBand;
  var PrintBand: Boolean);
begin
  Inc(count);
  if Count = 20 then
  begin
    quickrep1.NewColumn;
    count := 1;
  end;
end;

meikl
0
 
zhangyunchaoAuthor Commented:
yes that's ok!
please answer it and i can add points to you. thank you.
0
 
kretzschmarCommented:
hi zhangyunchao,

glad to helped you
good luck again

meikl ;-)
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now