Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get rid of extra line spaces in a report?

Status
Not open for further replies.

udik

MIS
Jan 26, 2003
9
IN
Hi all,

Anyone has an idea how to get rid of extra line spaces in a report? I need to do it after the report is done, not by editing it in a design mode - cause the extra space lines are created dynamically and you can see them only in preview or print modes.

So I need something like:

sub On_Page

Report!"my_report".lines(12).delete

End sub
 
Can you trim the text in the field that is causing the spaces?


I.E.

make a query of your source table and then enter an expression to trim the field,

I.E. lean_comment:=trim([comment])

then point your report to the query and redirect the text box for comment to lean_comment.
 
Hi ETID,

You are correct. I'm using text box with an IIF(X=Y,A,"") as a Control Source, and when it fails it introduces the extra space. To be more detailed, I have 3 boxes like that in the same row ..:)

I tried to put nothing instead of the "" but still got the extra space. Is there a "delete row" or "trim row" statement that I can put instead of this "" field ?

It seems impossible to handle report objects in VB code, something which is so easy for forms ...:)

Thanks,
Udi
 
Have you tried

IIF(X=Y,A,null)

or

IIF(X=Y,A,is null)
 
or set the criteria in your query for that field to <>&quot;&quot;
 
Hi ETID,

Thanks, tried it now but it doesn't work :(

I can't use the <>&quot;&quot;, my query is horribly complex:
=IIf([feature_b]=[feature_name] And [feature_a]<>[feature_name],[feature_a],&quot;&quot;)

This is actually inside a subreport, and I have another subreport just after this one with similar line, if you can understand what this deranged thing means ..:)

Do you know of any reference to managing reports or subreports in VB?

Bye,
Udi
 
a shot in the dark...


=IIf([feature_b]=[feature_name] And [feature_a]<>[feature_name],[feature_a],&quot;NO_FEATURE&quot;)

then criteria:

<>&quot;NO_FEATURE&quot;
 
Hi ETID,

Thanks! simple and elegant! won't save the space, but I'll use this, so at least we won't have an ugly space in the middle of the report ... :)

Bye,
Udi (udi_kl@hotmail.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top