?
Solved

Quick Report Question

Posted on 1998-07-05
4
Medium Priority
?
156 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 150 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

Independent Software Vendors: 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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month9 days, 13 hours left to enroll

762 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