How to ...

  • Thread starter Thread starter Alain
  • Start date Start date
A

Alain

Hi to all.

I need help on this onem, I need to reposition a subreport by code but I
alway get the error 2465
cannot gfet the field subLoansPDF referred in your expression

how can I fic this problem


If Reports![Budget Plan (New Version) PDF]![subLoansPDF].[Report].[HasData]
= 0 Then
Report![Budget Plan (New Version) PDF].[subVCPDF].Top = 180
End If


Thanks
 
Alain said:
I need help on this onem, I need to reposition a subreport by code but I
alway get the error 2465
cannot gfet the field subLoansPDF referred in your expression

how can I fic this problem


If Reports![Budget Plan (New Version) PDF]![subLoansPDF].[Report].[HasData]
= 0 Then
Report![Budget Plan (New Version) PDF].[subVCPDF].Top = 180
End If


I don't understand what you're trying to do here.

If a subreport has no data, it will be invisible, so why
move it? Maybe(?) all you need to do is set the subreport
control's CanShrink property to Yes.

OTOH, maybe the problem is that you have so many typos in
your post that I can't tell what you're doing (you are
missing a critical "s" on the second line: Reports! . . .)
 
sorry about the typos, I'm kind of stress here

my subreport is already set yo can shrink to yes, the reason I need to move
another subreport is that I have 4 sub in the main report, so if the first
sub has no data then I need to move the second one to the position of the
first one so the layout will always be the same when starting printing
meaning I do not want to see a blank spot before seing data from the seconf
report.

the error appears on the if line

thanks



Marshall Barton said:
Alain said:
I need help on this onem, I need to reposition a subreport by code but I
alway get the error 2465
cannot gfet the field subLoansPDF referred in your expression

how can I fic this problem


If Reports![Budget Plan (New Version)
PDF]![subLoansPDF].[Report].[HasData]
= 0 Then
Report![Budget Plan (New Version) PDF].[subVCPDF].Top = 180
End If


I don't understand what you're trying to do here.

If a subreport has no data, it will be invisible, so why
move it? Maybe(?) all you need to do is set the subreport
control's CanShrink property to Yes.

OTOH, maybe the problem is that you have so many typos in
your post that I can't tell what you're doing (you are
missing a critical "s" on the second line: Reports! . . .)
 
Personally, I would make each of the subreports a few pixels high on my main
forma and set the "can grow" to true. Then they will print on e after the
other. Any blanks ones will only take up a few pixels.

Rick B


Alain said:
sorry about the typos, I'm kind of stress here

my subreport is already set yo can shrink to yes, the reason I need to move
another subreport is that I have 4 sub in the main report, so if the first
sub has no data then I need to move the second one to the position of the
first one so the layout will always be the same when starting printing
meaning I do not want to see a blank spot before seing data from the seconf
report.

the error appears on the if line

thanks



Marshall Barton said:
Alain said:
I need help on this onem, I need to reposition a subreport by code but I
alway get the error 2465
cannot gfet the field subLoansPDF referred in your expression

how can I fic this problem


If Reports![Budget Plan (New Version)
PDF]![subLoansPDF].[Report].[HasData]
= 0 Then
Report![Budget Plan (New Version) PDF].[subVCPDF].Top = 180
End If


I don't understand what you're trying to do here.

If a subreport has no data, it will be invisible, so why
move it? Maybe(?) all you need to do is set the subreport
control's CanShrink property to Yes.

OTOH, maybe the problem is that you have so many typos in
your post that I can't tell what you're doing (you are
missing a critical "s" on the second line: Reports! . . .)
 
Hi Rick,

by doing so I always get a blank page in between data
Thought It would work but no success

Rick B said:
Personally, I would make each of the subreports a few pixels high on my
main
forma and set the "can grow" to true. Then they will print on e after the
other. Any blanks ones will only take up a few pixels.

Rick B


Alain said:
sorry about the typos, I'm kind of stress here

my subreport is already set yo can shrink to yes, the reason I need to move
another subreport is that I have 4 sub in the main report, so if the
first
sub has no data then I need to move the second one to the position of the
first one so the layout will always be the same when starting printing
meaning I do not want to see a blank spot before seing data from the seconf
report.

the error appears on the if line

thanks



Marshall Barton said:
Alain wrote:
I need help on this onem, I need to reposition a subreport by code but
I
alway get the error 2465
cannot gfet the field subLoansPDF referred in your expression

how can I fic this problem


If Reports![Budget Plan (New Version)
PDF]![subLoansPDF].[Report].[HasData]
= 0 Then
Report![Budget Plan (New Version) PDF].[subVCPDF].Top = 180
End If


I don't understand what you're trying to do here.

If a subreport has no data, it will be invisible, so why
move it? Maybe(?) all you need to do is set the subreport
control's CanShrink property to Yes.

OTOH, maybe the problem is that you have so many typos in
your post that I can't tell what you're doing (you are
missing a critical "s" on the second line: Reports! . . .)
 
Are you sure the subreport **Control** is named subLoansPDF?

Setting each of the subreport control's CanShrink/CanGrow
properties to Yes should squeeze out the excess white space
as long as you also have their section's CanShrink/CanGrow
also set to Yes, unless there are other controls "next"
to or overlapping the subreport controls.

Another thing that may be causing trouble with this is if
any of the subreport's sections have their ForceNewPage or
KeepTogether properties set.
--
Marsh
MVP [MS Access]


sorry about the typos, I'm kind of stress here

my subreport is already set yo can shrink to yes, the reason I need to move
another subreport is that I have 4 sub in the main report, so if the first
sub has no data then I need to move the second one to the position of the
first one so the layout will always be the same when starting printing
meaning I do not want to see a blank spot before seing data from the seconf
report.

the error appears on the if line

Alain said:
I need help on this onem, I need to reposition a subreport by code but I
alway get the error 2465
cannot gfet the field subLoansPDF referred in your expression

how can I fic this problem


If Reports![Budget Plan (New Version)
PDF]![subLoansPDF].[Report].[HasData]
= 0 Then
Report![Budget Plan (New Version) PDF].[subVCPDF].Top = 180
End If

"Marshall Barton" wrote
I don't understand what you're trying to do here.

If a subreport has no data, it will be invisible, so why
move it? Maybe(?) all you need to do is set the subreport
control's CanShrink property to Yes.

OTOH, maybe the problem is that you have so many typos in
your post that I can't tell what you're doing (you are
missing a critical "s" on the second line: Reports! . . .)
 
Back
Top