Solved

Problem with making Qreport ?

Posted on 2004-03-26
9
590 Views
Last Modified: 2007-12-19
Hi Guys
I will explain my project then you will tell me where is the problem :

I have a form ( form1) with two Tmemo components and some of Tedit components
The other form ( form2 ) has : Tquickrep
 I put on it QRBand1(property bandtype=rbPageHeader) , QRBand1 has two Tqrimage . ( no problem with QRBand1 )

Then I put QRBand2 (property bandtype=rbdetail ) , QRBand2 has two TQRmemo
One for memo1 and the other for memo2 ( in form1 )
With some qrlabels get the same values of edits in form1

THE PROBLEM : when I write in memos and edits (on form1) then call the instruction (form2.qreport1.Preview; ) , I show what I wrote on edits and memos
But if the information is too long ( and here is the problem ) the qreport don't  open new pages for it and information is cut at the bottom of first page .

This is my problem , I hope you find the solution and explain it for beginner with  QREPORTS .

THANKS .
0
Comment
Question by:peruzzi
[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
9 Comments
 
LVL 17

Expert Comment

by:mokule
ID: 10685856
The problem is: property bandtype=rbPageHeader.
PageHeader cannot be longer then page it can't be realized.
Change bandtype
0
 
LVL 17

Expert Comment

by:mokule
ID: 10686014
It is also the problem with qrmemo.
Try something like this
Put QRStringsband1 and QRExpr1 on it.
Then Edit property Expression of QRExpr and choose variable QRSTRINGBAND1.
You should also set Items of QRStringsband

Hope this helps
0
 

Author Comment

by:peruzzi
ID: 10690553
Hi
makule, nothing changed
I wish you explain more
what I have to do with QRSTRINGBAND1.items

thanks
0
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!

 
LVL 17

Accepted Solution

by:
mokule earned 100 total points
ID: 10690892
So,
Two forms.
On Form1 Memo1 and Button1.
On Form2 QuickRep1, QRStringsBand1 and QRExpr1 on this band
Select QRExpr1 property Expression. You've got Expression Wizard. Click button Variable.
Select QRSTRINGBAND1 from the list. Click OK and OK once more.

procedure TForm1.Button1Click(Sender: TObject);
begin
  Form2.QRStringsBand1.Items := Memo1.Lines;
  Form2.QuickRep1.Preview;
end;

That's it. You can run program
0
 
LVL 1

Expert Comment

by:psycho_cat_69
ID: 10691466
When you create your TQRMemo, you set a height and a width on your component.  A component cannot be splitted on different pages of a QuickReport.  So when your text is larger then your component, you text doesn't appear on the QR.  

You should assign you TMemo.Lines[x] manually.  So when you'll hit the end a the page...You'll be able to generate a new page and continue the display of your Memo!
0
 
LVL 19

Expert Comment

by:Limbeck
ID: 10693880
Somethign that will probably help is :
Add a TClientdataset
Define the fileds you want in it
in your code :
   createdataset
  Fill the fields/records with data

then use this Clientdataset as datasource for your Quickreport

grt
Ed
0
 

Author Comment

by:peruzzi
ID: 10696347
Hi guz....
makule , thanks for your good example
now , I understand well, but I want to put some qrlabel components between the two qrstringbands
how can I do that ?

I am waining

peruzzi
0
 
LVL 17

Expert Comment

by:mokule
ID: 10696381
Put another qrstringband, and qrlabel on it
0
 

Author Comment

by:peruzzi
ID: 10731530
Hi
Mokule , thanks for your help ,now every thing go well
thanks again
and thanks for all who try to answer this question

peruzzi
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
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…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

624 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