Solved

Quick Report Question

Posted on 1998-07-05
4
154 Views
Last Modified: 2010-04-04
I have a Qreport Form like This :
(S=Start Line , E=End Line of page)

S [Name] [Address] [Phone] E

now i want to do this in runtime

S [Name     ] [Phone     ] E

any ideas ? =)


0
Comment
Question by:k6__
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Expert Comment

by:michaue
ID: 1357111
When you design your report set TQRDBText.AutoSize = False

Elfrieda :)

0
 
LVL 2

Author Comment

by:k6__
ID: 1357112
Did That Didn't work.. i want to cover the space left
from disabling the middle Label with the First And The Last
Label.. =)

0
 

Expert Comment

by:mdima
ID: 1357113
use QRExpr component from QuickReport page.
0
 

Accepted Solution

by:
maslopes earned 50 total points
ID: 1357114
I did make a program which solve this problem. If you have some doubts ask me. Sorry my poor english.

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  quickrpt, Qrctrls, ExtCtrls;

type
  TForm1 = class(TForm)
    QuickRep1: TQuickRep;
    DetailBand1: TQRBand;
    QRLabel1: TQRLabel;
    QRLabel2: TQRLabel;
    QRLabel3: TQRLabel;
    procedure QuickRep1BeforePrint(Sender: TQuickRep;
      var PrintReport: Boolean);
    procedure QuickRep1NeedData(Sender: TObject; var MoreData: Boolean);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  uItemCorrente : integer;

implementation

{$R *.DFM}

procedure TForm1.QuickRep1BeforePrint(Sender: TQuickRep;
  var PrintReport: Boolean);
begin
  uItemCorrente := 0;
end;

procedure TForm1.QuickRep1NeedData(Sender: TObject; var MoreData: Boolean);

var s : string;
    i : integer;

begin
  Inc(uItemCorrente);
  s := IntToStr(uItemCorrente);
  QRLabel1.Caption := 'NOME: ' + s;
  QRLabel2.Caption := 'END.: ' + s;
  QRLabel3.Caption := 'TEL.: ' + s;
  if uItemCorrente = 2 then
  begin
    QRLabel2.Enabled := False;
    i := StrToInt(FloatToStr(Int((QRLabel3.Left + QRLabel3.Width - QRLabel1.Left)/ 2)));
    QRLabel3.Left  := QRLabel3.Left + QRLabel3.Width - i;
    QRLabel1.Width := i;
    QRLabel3.Width := i;
  end;
  MoreData := (uItemCorrente < 5);
end;

procedure TForm1.FormShow(Sender: TObject);
begin
  QuickRep1.Preview;
end;

end.


The idea is resize the first and the third field and disable the second field, if you not understand some part of my program ask me and I'll answer for you.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question