Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Quick Report Question

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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

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…
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 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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

598 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