?
Solved

Two invoices for page with Quick Report

Posted on 1998-06-25
13
Medium Priority
?
769 Views
Last Modified: 2010-04-04
In a program developed in DELPHI 2.0, I need to print invoices they be she correspondents to the customers of a company. Using Quick Report 1.1, a report Master Detail was created, being:  
- Master: Data of the company that is using the system.  
- Detail: Data of the Customer that will receive the invoice.  
- Sub-Detail: Data of the acquired products or of the rendered services.  
As the number of products or rendered services are small, the company wants that in a page, be made the 2 customers' invoices.  
I should increase that each invoice should occupy half of the page, that already comes pré-printed, that is, the data of the band sub-detail have a fixed size of 20 lines, after the one which, a band group, gives the total of the invoice in a fixed field.    Unhappily, I didn't get to find any property, event or method that it turns fixed the size of the band sub-detail.
Using Quick Report normal methods, or he prints the several customers' invoices for page, or he prints 1 invoice for page using the property 'force new page'.  
As to solve the problem (2 invoice for page).
0
Comment
Question by:gaona
[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
13 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1355901
Hi gaona,

What about using a internal counter? It counts to 2 and when 2 is reached force new page will be set?

Regards, ZiF.
0
 

Author Comment

by:gaona
ID: 1355902
Dear ZifNAB,  
 
Thank you for the comment, but the proposal of its comment was already tried without success, for the following reason:  
When he/she said that 2 invoices should be printed by page, I forgot to say that each invoice should occupy half of the page, that already comes pré-printed, that is, the data of the band sub-detail have a fixed size of 20 lines, after the one which, a band group, gives the total of the invoice in a fixed field.  
Unhappily, I didn't get to find any property, event or method that it turns fixed the size of the band sub-detail.
0
 

Author Comment

by:gaona
ID: 1355903
Edited text of question
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 8

Expert Comment

by:ZifNab
ID: 1355904
Hi gaona,

 An idea, much work but I think you can't do it another way.... Maybe you should manually give the data to the bands in the OnNeedData event (if lesser than 20 products, just send a space). You assign the datafields to a TQRLabel on the bands... This way you've got a way to have a fixed size.


Regards, Zif.

0
 
LVL 1

Expert Comment

by:Greedy
ID: 1355905
I'm can't figure out what you want...can you translate this into english?  Maby Ziffy can put it into other words?  I'll try to explain what I think you want but I'm probably wrong...

The main thing that I got from reading your question and the comments is that you want 2 detail level bands to print on one page and you want to force only 2 to print on it...What I don't understand is that you say you can't make this band the same size...can't you set the Band.Size.Height property at design time to be 1/2 of the page height...or even do that in a BeforePrintEvent.

MyDetailBand.Size.Height := (0.5 * MyQReport.Page.Length)

I think you want to do something like put the data from the subdetail into the detail band...I would use the BeforePrint event of the Detail do do a Preform to create the Sub-Detail band information and incorperate it into your detail...


0
 

Author Comment

by:gaona
ID: 1355906
Dear ZifNab  
 
I believe that its idea until he/she can give right, even so, when I tried to use the event OnNeedData to send the data of the band manually Detail, the system printed the band, without passing for the routine that I created to send the data manually.  
Because?  
 
Regards, Gaona.
0
 

Author Comment

by:gaona
ID: 1355907
Dear Greedy  
 
I really already tried setar the property height of the band Detail, so that independently of the ítens number that has the invoice, he is proportional to 20 lines of impression of characterses with height the same to 17 pixels (standard size that I am using to print).  
It happens that in this case, the space among the lines will be variable (it depends on the number of ítens of the invoice), and I don't fasten in 17 pixels.  
It also happens, that for each printed line, I am using a shape of the type qrsVertLine, to separate the columns of the invoice with height it fastens of 17 pixels.  
Excuse me, if I didn't get myself to do to understand, but, my reading of English is much better than my writing.
0
 

Author Comment

by:gaona
ID: 1355908
Dear ZifNab  
 
As you said, its last idea on the use of the event OnNeedData, would be difficult (I passed the dawn implementing), but it worked.  
I got to print two invoices for page with fixed dimensions, using shapes type besides VerLine to separate the columns of the itens of the invoice.  
Like you just sent a comment, he would like to know as I can transfer the points for you.  
 
Greetings Gaona
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1355909
Gaona, sorry that I don't understand you. Is it working and are you asking me to answer this question, so you can grade this answer? ...Can you explain me more of this VerLine? What so you mean by that?
Regards, Zif.
0
 

Author Comment

by:gaona
ID: 1355910
Dear ZifNab  
 
The one that I meant is that got to print the two invoice in a page with fixed spacing, as you proposed, for this reason, it is that I asked as I could transfer the points for you, since the one that you did was a comment and not an answer.  
With relationship to the shape VerLine, I meant that am printing a vertical line with fixed spacing among the columns in the band DETAIL of the invoice.  
 
Thankful for the help, Gaona
0
 
LVL 2

Expert Comment

by:hrizal
ID: 1355911
On the last band, on the properties.
set align to bottom = true.

if any band above last band and below on 'band sub-detail'
also set align to bottom = true.

0
 

Author Comment

by:gaona
ID: 1355912
Hi hrizal  
 
After analyzing its answer, lament to inform that she doesn't assist the question that I did entirely, therefore she just works partially.  
If you test in the way that it was indicated, he will see that same just printing two invoices for page, the location of the line that prints the total of the invoice is variable, and it doesn't fasten as I am wanting.  
I should also inform, that the last comment of ZifNab (and my comment to proceed), it solved the problem. In case you want the solution, it is enough to send me an e-mail.  
 
Thankful, Gaona
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 200 total points
ID: 1355913
Hi gaona,

I just copied my last comment as an answer. I'm sorry that I couldn't find a better solution, but this one works, maybe some day we'll find a better, easier solution.

        An idea, much work but I think you can't do it another way.... Maybe you should manually give the data to the bands in the OnNeedData event
       (if lesser than 20 products, just send a space). You assign the datafields to a TQRLabel on the bands... This way you've got a way to have a
       fixed size.


Best regards, Zif.
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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

741 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