Solved

Quick Report Question

Posted on 1998-07-05
4
155 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
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 this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

705 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