?
Solved

Call NewPage when field value changes QuickReport

Posted on 2001-08-26
3
Medium Priority
?
585 Views
Last Modified: 2013-11-22
Hi,

How can I go to another page using QuickReport when one field value changes.
eg.

f1     f2     f3
aaa  bbb  ccc
aaa  bbb  ccc
aaa  bbb  ccc
-----------------
When f3 changes(from ccc to ddd),
it's printed in another page.

f1     f2     f3
aaa  bbb  ddd
aaa  bbb  ddd
aaa  bbb  ddd

Hope to be clear

thanks
Paulo
0
Comment
Question by:paulo_psa
[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
3 Comments
 
LVL 2

Expert Comment

by:PeterLarsen
ID: 6427843
Yo Paulo,

Something like this ??!!

/Peter


unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
    FText : TStringList;
    procedure SetText(Index : integer; Text : string);
  public
    { Public declarations }
    property Text[index : integer] : string write SetText;
  published
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

{ TForm1 }


procedure TForm1.SetText(Index: integer; Text: string);
begin
 While FText.Count-1 < Index do
  FText.Add('');
 //
 FText[Index]:=Text;
 //
 //check here to see whether you should change page or not !!!
 //
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
 FText:=TSTringList.Create;
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
 FText.Free;
end;

end.
0
 
LVL 10

Accepted Solution

by:
Jacco earned 300 total points
ID: 6442141
Hi Paulo,

You could use a GroupBand

The components on the QuickReport are as follows:

GroupHeader
DetailBand

The GroupHeader is a TQRGroup

Set the QRGroup1.Expression to Query1.f3

Set QRGroup1.ForceNewPage to True

Regards Jacco
0
 

Author Comment

by:paulo_psa
ID: 6442869
That's what I need.

thanks
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

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…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

649 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