Solved

Quick Report Question

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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 seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now