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

x
?
Solved

Two invoices for page with Quick Report

Posted on 1998-06-25
13
Medium Priority
?
788 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
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.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
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

609 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