UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Maintaining The Detail Lines In Report Template, Access 2007    
 
   
phil_andre
post Nov 10 2017, 01:56 AM
Post#1



Posts: 123
Joined: 7-December 16



Hi Support,

Could you please look into on my attachment and advise how to maintain the blank lines without manually adding blank record when you entered one line with value.

Example: I am going to generate one requisition form contains of 5 items. and in my rpt_requisition would need extra 10 lines in order to display with full lines same as attached.

So what i did is, i am adding extra blank lines in my requsition form sub details just to display the template with all lines... i need to be automatic specially when the sub details field set to can grow - yes.

I believe it was asked before from somebody... but i don't know the update after that.
Attached File(s)
Attached File  sample.JPG ( 83.18K )Number of downloads: 10
 
Go to the top of the page
 
projecttoday
post Nov 10 2017, 07:56 AM
Post#2


UtterAccess VIP
Posts: 8,616
Joined: 10-February 04
From: South Charleston, WV


I suggest creating a table with blank records and UNION it with your table in the report's record source. Add a constant field to the query for sorting, say 0 for the main table query and 1 for the blanks table query. The number of records is the maximum number of blanks. You can number the blank records and calculate the number of needed blanks and check against a counter in the blanks table to print the exact number desired. Or you can print them all and the user can throw any excess away.

You could add blank records to the main table but then you would have to check the table for a flag every time you use it.

--------------------
Robert Crouser

My company's website
Go to the top of the page
 
phil_andre
post Nov 10 2017, 08:21 AM
Post#3



Posts: 123
Joined: 7-December 16



Thank you for your quick feedback and appreciated.

If you don't mind, can you me a favor to create small table with that scenario for quick understanding if you can spare time..

thanks in advance.
Go to the top of the page
 
projecttoday
post Nov 10 2017, 08:36 AM
Post#4


UtterAccess VIP
Posts: 8,616
Joined: 10-February 04
From: South Charleston, WV


You will have to create this table. Copy the existing table and give it a name like tblTransactionBlanks or something. Delete all the records except leave enough for the needed blank lines. Then blank out the fields.

--------------------
Robert Crouser

My company's website
Go to the top of the page
 
theDBguy
post Nov 14 2017, 11:55 AM
Post#5


Access Wiki and Forums Moderator
Posts: 71,037
Joined: 19-June 07
From: SunnySandyEggo


Hi Phil,

Please see attached demo based on Robert's suggestion.

Hope it helps...

Attached File(s)
Attached File  ReportSampleByDBG.zip ( 32.37K )Number of downloads: 8
 

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
phil_andre
post Nov 14 2017, 02:18 PM
Post#6



Posts: 123
Joined: 7-December 16



Hi DB, thanks a lot for the demo.

What about if the field st to can grow yes and i am entering records more than 25 lines sometime.

I tried your demo with can grow and long text description... Then line 25 on the page 2 with blank lines on the bottom.
Go to the top of the page
 
theDBguy
post Nov 14 2017, 02:21 PM
Post#7


Access Wiki and Forums Moderator
Posts: 71,037
Joined: 19-June 07
From: SunnySandyEggo


Hi Phil,

It would be easier to understand the situation you're describing if you repost the demo with the changes you made, so we can actually see what you tried and how it affected our suggestions.

Cheers!

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
projecttoday
post Nov 14 2017, 03:25 PM
Post#8


UtterAccess VIP
Posts: 8,616
Joined: 10-February 04
From: South Charleston, WV


I took a look at thedbGuy's sample. You need to remove TOP 25 and the sub query. What if there are more than 25 records. Also, you need a way to insure the blank lines follow the other lines. I suggested a '0' and '1' in the query. You add a sort on this field in the report.

SELECT tblSample.Description, tblSample.Unit, tblSample.Qty, tblSample.Rate, tblSample.Remarks, Total, '1' AS SORTSEQ
FROM tblSample
UNION ALL SELECT Null, Null, Null, Null, Null, Null, '2' AS SORTSEQ
FROM tblNumbers;

It is important to add the sort field to the report.

--------------------
Robert Crouser

My company's website
Go to the top of the page
 
phil_andre
post Nov 15 2017, 05:14 AM
Post#9



Posts: 123
Joined: 7-December 16



Hi DB,

thanks for your usual support..

I have made one table for your kind checking... you will find out three report inside and i want the same output without adding manually blank line as you can see on the table sub details just to fit the rows with lines on the report...

- note, the report are set to grow to true.

appreciate much if this can be answered by returning back the accdb.

thanks a lot.
This post has been edited by phil_andre: Nov 15 2017, 05:17 AM
Attached File(s)
Attached File  Phil_Demo.zip ( 49.52K )Number of downloads: 7
 
Go to the top of the page
 
theDBguy
post Nov 18 2017, 01:25 PM
Post#10


Access Wiki and Forums Moderator
Posts: 71,037
Joined: 19-June 07
From: SunnySandyEggo


Hi Phil,

Thanks. I think I understand what you mean. Unfortunately, I believe this will require some code to accomplish. Here's my idea...

1. Determine the position of the last row on a full report and save it as a constant variable.
2. When the form opens, calculate the number of records and save this value in a variable.
3. In the print event, as the report prints each record, check if the current record is the last record based on the count calculated earlier.
4. When you get to the last record, check if the current position is lower than the maximum position saved previously in a constant variable.
5. If there's more room left on the report, add a blank line by setting the NextRecord property to False and setting all font colors to white.

Hope it helps...

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Microsoft Access MVP | Access Website | Access Blog | Email
Go to the top of the page
 
phil_andre
post Nov 18 2017, 11:52 PM
Post#11



Posts: 123
Joined: 7-December 16



Hi Mr. DB,

Can you please check this out below link on the last update from Mr. Joe.

http://www.UtterAccess.com/forum/index.php...2046373&hl=


thanks.
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    24th November 2017 - 07:46 AM