Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: Subreport empty, but showing with a border, on rpt Post Reply Post New Topic
Author Message
N11689
Newbie
Newbie


Joined: 13 Jun 2007
Location: United States
Online Status: Offline
Posts: 22
Quote N11689 Replybullet Topic: Subreport empty, but showing with a border, on rpt
    Posted: 30 Aug 2007 at 7:44am
I have subreports linked to the main report.  Sometimes they return data, sometimes they do not.  If they do not return data, I am suppressing the sections within the subreport as well as checking the Suppress Blank Section for each subreport section.  On the main report, I have the subreport set to Suppress Blank Subreport.
 
This subreport resides in a section with other data that will always print.
What is happening, which never did with our VB6 app, is that the report is putting a fine border around the entire subreport even though the subreport is blank and is defined with all Borders set to None.  It's as though it is showing the space where a subreport would print data.
 
I need to have the subreport suppressed totally, without any borders.  Why is it showing?
 
I have even tried moving the subreport to the section above where it noramally prints and suppressing it there..same results. 
 
We are using VB.NET 2005 and Crystal XI Release 2 (w/Service Pack 2).
We are using Crystal Reports for .NET's object models.
 
We develop our reports and CRXIR2, but use our vb.net program to run the report.
 
Any help will be appreciated.  Thank you.
IP IP Logged
N11689
Newbie
Newbie


Joined: 13 Jun 2007
Location: United States
Online Status: Offline
Posts: 22
Quote N11689 Replybullet Posted: 30 Aug 2007 at 11:03am
After doing a little more research, it is not the actual subreport that has the 'border' around it, it is the data in the subreport.
 
We have one field in the report.  It is a 'picture' type field.  It displays an image if the image exists in the database, otherwise blank. 
 
So, Crystal is displaying a blank image with a border around it.  How do I prevent this from displaying at all?  The field itself has all the border line styles set to None the Border color is set to black, but no borders should be printing at all, so the border color should not apply.
 
I don't understand why this is happening.
IP IP Logged
N11689
Newbie
Newbie


Joined: 13 Jun 2007
Location: United States
Online Status: Offline
Posts: 22
Quote N11689 Replybullet Posted: 30 Aug 2007 at 11:19am
One more thing...
 
I just tried putting a white border around the image (with all the border lines styles still set to None) and a thin black border prints around the blank image.
IP IP Logged
N11689
Newbie
Newbie


Joined: 13 Jun 2007
Location: United States
Online Status: Offline
Posts: 22
Quote N11689 Replybullet Posted: 30 Aug 2007 at 12:50pm
RESOLVED!  Sorry, after even more research discovered the following:
 
The subreport runs an SQL stored procedure.  We insert the results into a temp table.  One of the columns in the table is a bit field that will tell us whether or not rows were returned.
 
Well, rows were always getting returned even if the picture/blob/image field was blank.  Why?  The image is defined as a nullable image in the database, so it was always returning something because of the null value in the image.  So the rows returned was always true.  I needed to add an image is not null statement to the where clause in the stored procedure (or modify each subreport and add IsNull(image) to each image's suppress condition).  It was easier to modify one sql stored procedure.
 
Problem solved.  Although we never had this problem with our VB6 application...just with the .NET applications.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 30 Aug 2007 at 2:18pm
Wow. I had no idea how to comment on the original question b/c I had not seen this behavior before. Glad you got it resolved.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.