Move sub-reports (1 Viewer)

chuckcoleman

Registered User.
Local time
Yesterday, 19:02
Joined
Aug 20, 2010
Messages
357
Hi, I have a report with a text box that expands and contracts based on the amount of data it displays. It's Can Grow and Can Shrink are set to Yes. Immediately below the text box in the design view is a sub-report. I would like it to closely follow/be immediately below the text box and move with the text box when it expands or contracts. Right now, there is several rows of white space between the last entry in the text box and the first entry in the sub-report.

Is there a way to have the sub-report "tied" to/closely follow the text box as it expands and contracts from record to record?

Thanks,

Chuck
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 08:02
Joined
May 7, 2009
Messages
19,169
can you Filter the report not to include blank rows.
 

chuckcoleman

Registered User.
Local time
Yesterday, 19:02
Joined
Aug 20, 2010
Messages
357
Hi, I might not have been clear enough. The report will always have a record. The text box I'm referring to is a mailing address text box with one or more names, one or more street address, etc. Therefore the height of the "printed" text box will vary. I want to immediately follow the address box without any blank spaces a sub report that that can have one or more rows in it; i.e. a cell phone, landline phone, fax number. If I include those items in the main reports query, I'll get multiple rows because the sub report is based on another table.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:02
Joined
Oct 29, 2018
Messages
21,358
Hi, I might not have been clear enough. The report will always have a record. The text box I'm referring to is a mailing address text box with one or more names, one or more street address, etc. Therefore the height of the "printed" text box will vary. I want to immediately follow the address box without any blank spaces a sub report that that can have one or more rows in it; i.e. a cell phone, landline phone, fax number. If I include those items in the main reports query, I'll get multiple rows because the sub report is based on another table.
Hi. Did you already set the height of the Textbox to show only one line of data and then placed the subreport immediately right below it? If so, are you saying as the textbox grows, the subreport is not showing up on the right spot?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 08:02
Joined
May 7, 2009
Messages
19,169
my concern is you mailing textbox. how do you concatenate the addresses. maybe make the textbox height just to 1 row.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 08:02
Joined
May 7, 2009
Messages
19,169
If I include those items in the main reports query, I'll get multiple rows because the sub report is based on another table.
you can actually include them in the query without getting multiple records:
Code:
select table1.* , (select top 1 [cell phone] from table2 where table2.FK = table1.PK) 
  as [cell phone], (select top 1 [landline phone] from table2 where table2.FK = table1.PK) as [land line] 
from table1;
 

chuckcoleman

Registered User.
Local time
Yesterday, 19:02
Joined
Aug 20, 2010
Messages
357
Hi, sorry for the delayed reply. Lots of things going on. The text box's data is:

=([rTitle]+Chr(13)+Chr(10)) & ([LAddress]+Chr(13)+Chr(10)) & ([LAddress2]+Chr(13)+Chr(10)) & ([LCity] & ", " & [LState] & " " & [LZIP]+Chr(13)+Chr(10)) & (IIf([LTel] Is Not Null,"Tel: " & Format([LTel],"(000) 000-0000"))+Chr(13)+Chr(10))
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:02
Joined
Oct 29, 2018
Messages
21,358
Hi, sorry for the delayed reply. Lots of things going on. The text box's data is:

=([rTitle]+Chr(13)+Chr(10)) & ([LAddress]+Chr(13)+Chr(10)) & ([LAddress2]+Chr(13)+Chr(10)) & ([LCity] & ", " & [LState] & " " & [LZIP]+Chr(13)+Chr(10)) & (IIf([LTel] Is Not Null,"Tel: " & Format([LTel],"(000) 000-0000"))+Chr(13)+Chr(10))
Hi. Did you see my question? I was just curious for the answer. Thanks.
 

chuckcoleman

Registered User.
Local time
Yesterday, 19:02
Joined
Aug 20, 2010
Messages
357
H DBG, Sorry. I didn't see it until this morning.

I was successful by noting for the text box the TOP dimension and adding to it the HEIGHT. I used that number in the TOP dimension for the sub report and it worked.

Thank you as always.

Chuck
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:02
Joined
Oct 29, 2018
Messages
21,358
H DBG, Sorry. I didn't see it until this morning.

I was successful by noting for the text box the TOP dimension and adding to it the HEIGHT. I used that number in the TOP dimension for the sub report and it worked.

Thank you as always.

Chuck
Hi Chuck. No worries. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Top Bottom