I need on almost all of my reports to have vertical lines all the time printed...to show columns.
How can I make the lines always be printed...even if a record is not printed?
I think I somehow need to count how many lines there are, and something like that, but I truely have no idea..
Can anyone help? 8-[
0
Comments
Second of all... STILL DO NOT DO THIS!!!
Final option:
First you will need to know howmany line you can print on a page. Let's say this is 22 lines.
The you will need to count the line you already have printed. So code a counter in the already existing dataitems. Say you printed 12 lines.
You will need to make a "filler" dataitem that loops 10 times.
Create an "Integer" dataitem and filter it's number field in the OnPreDataItem like so :
Print your columns in the body of this dataitem.
Now test is... It could be you will need to print a line less to lose the "newpage" feature....
Good Luck
If it was hard to write, it should be hard to understand."
Thank you 8-[
records are printed in Sales Invoice Line Body section.
I added a dummy data item after Sales Invoice Line Data Item.
On Pre Data item of Sales Invoice Line I wrote:
Counters := 0;
MaxNum := 22;
On After Get Record f Sales Invoice Line I wrote:
Counters := Counters + 1;
MaxNum := MaxNum - Counters;
On Pre Data Item of my Dummy I wrote:
SETRANGE(Number,Counters, MaxNum);
I added lines in my dummy section and nothing printed out.
My sales invoice line also has a footer section... I want the lines to end before the footer section. My dummy section, however, comes after the sales invoice line bodies and footers. So, how can it add lines, if it is after?
Please help me.. thank you
First.....
On Pre Data item of Sales Invoice Line I wrote:
Counters := 0;
MaxNum := 22;
On After Get Record f Sales Invoice Line I wrote:
Counters := Counters + 1;
MaxNum := MaxNum - Counters;
1st loop: Counter = 1, MaxNum = 22 - 1 (21)
2nd loop : Counter = 2, MaxNum = 21 - 2 (19)
3rd loop : Counter = 3, MaxNum = 19 - 3 (16)
4th loop : Counter = 4, MaxNum = 16 - 4 (12)
ect...
Do you see what is going wrong there? Two more lines, and your MaxNum is 0.
Just make a counter, that's it. Name it NumRecsPrinted instead of Counter. Counter could be anything, you need variable names that make sence!
When finished printing your lines you will see the number of lines you print will be in the NumRecsPrinted variable.
Then your Integer loop is needed. In the OnPre set a filter:
* 22 was only an example. You can probably not print more then 10 on a header lines report like an invoice or order.
Is this a bit more clear?
If it was hard to write, it should be hard to understand."
HOWEVER> the problem is here:
records are printed in Sales Invoice Line Body section.
I added a dummy data item after Sales Invoice Line Data Item.
I added lines in my dummy section and they printed out below the footer section of the Sales Invoice Line Footer...
I don't want them below... I want the lines printed in the body of the Sales Invoice Line section...
do you understand me now?
No problem! Just keep it the way it is, and move the the things you are printing in the line footer to a new dataitem (integer).
If it was hard to write, it should be hard to understand."
I really appreciate your help
If it was hard to write, it should be hard to understand."
I added the integer and it looks good if nothing is printed but the lines.
I wrote IF CurrReport.PAGENO < 2 THEN
SETRANGE(Integer,1,(14 - PrintedLines));
I have two body sections and then the dummy integer section.
in the first section I have 3 text boxes, which I have drawn lines next to each text box so that each time a record is printed, so is a line. I also have lines in my dummy integer section.
If 2 rows are printed then it goes to the next page and starts printing lines there... on top of having the lines already from the dummy section, it takes them from the actual records too...
I can't do this for some reason... it's just not working!!
Maybe you should do somethinglike this.
If you would print 50 lines in total and only 20 lines per page fit. Then you could calculate the number of lines left on the next page like so:
50 mod 20 = 10.
So. NumRecsPrinted mod MaxRecsOnPage = LinesToFill
SETRANGE(Number, NumRecsPrinted mod 20, 20)
You should test this, i'm not sure you this works in all posible cases. What happens if NumRecsPrinted is 20 or less forinstance...
If it was hard to write, it should be hard to understand."
I don't know...
If it was hard to write, it should be hard to understand."
Please send to my e-mail so that I can see what I am doing wrong...
Or if anyone can help..
I appreciate it
But you need to do me one favour, read the link below to know what!
Keep you eye on the forum!
If it was hard to write, it should be hard to understand."
I finished a sample....
Should be :
Gimme that mail address and i'll send the sample to you!!
If it was hard to write, it should be hard to understand."
Hopefully I didn't make it for nothing...
If it was hard to write, it should be hard to understand."