Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: Sub Reports - Getting them to work how they SHOULD Post Reply Post New Topic
Page  of 2 Next >>
Author Message
Jasey
Newbie
Newbie


Joined: 27 Aug 2007
Location: United Kingdom
Online Status: Offline
Posts: 11
Quote Jasey Replybullet Topic: Sub Reports - Getting them to work how they SHOULD
    Posted: 27 Aug 2007 at 9:10am
I have a number of reports that require the customers Logo to appear at the top. They have 3 divisions with different logos.
 
Up until now we've been putting these logos into each report and supressing the logos as required.
 
We noticed the other day that the .rpt files were very large and it was these logos causing the problem.
 
Easy we thought - We'll put the logos in a sub-report and simply call the subreport - that way there wont be all these copies of these damned logos.
 
But no - Inserting a sub report would appear to create a copy of the sub report and insert that into the report Angry
 
Is there any way to simply insert a sub report so it will just run it and not make copies of it ?
 
Using Visual Studio 2003 and the version of crystal reports that came with it - presumably because it wouldn't sell on it's own !!!!
 
ps Apologies - Hello there - my name's Jason and I'm in Sunny Aberdeen, Scotland - Just about to go home Smile


Edited by Jasey - 27 Aug 2007 at 9:13am
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 27 Aug 2007 at 10:01am
All subreports are embedded in a report. Can't do anything about it. What you need to do is change the resolution on your logo. You can do this in Photoshop (or other program) and not lose the quality of the logo. I've done this before and it will shrink the file size greatly.
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
Jasey
Newbie
Newbie


Joined: 27 Aug 2007
Location: United Kingdom
Online Status: Offline
Posts: 11
Quote Jasey Replybullet Posted: 27 Aug 2007 at 11:30pm
Thanks for that Brian - you've saved me a few more hours pulling what little hair I have left trying to achieve the un-achievable Smile.
 
Will see if I can get the Logos reduced.
IP IP Logged
Jasey
Newbie
Newbie


Joined: 27 Aug 2007
Location: United Kingdom
Online Status: Offline
Posts: 11
Quote Jasey Replybullet Posted: 28 Aug 2007 at 12:09am
Hmmm.
 
I've done what you suggested and got the files down from approx 1.5mb to about 30kbBig%20smile.
 
However - When I put the Images into the sub report - which basically only houses these Images the file size of the rpt file is 944kb.
 
Now - that is better than the original 2.2mb for each report but still not Ideal - Is there a way to tell Crystal Reports not to increse the file size by a factor of 30 for small files Confused
IP IP Logged
Jasey
Newbie
Newbie


Joined: 27 Aug 2007
Location: United Kingdom
Online Status: Offline
Posts: 11
Quote Jasey Replybullet Posted: 28 Aug 2007 at 12:20am

More info Dead

Inserting compressed jpg files total size 30kb resulted in a rpt file size of 944kb.
 
Inserting compressed bmp files total size 120kb resulted in a rpt file size of 192kb
 
Shocked


Edited by Jasey - 28 Aug 2007 at 12:21am
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 28 Aug 2007 at 6:49am
I have not done this, so it is more of a thought than something I know will work. Would it be possible to use an OLE Object to link to the pictures/images outside of the file? As I understand it, the image would be pulled from its source and not stored within the report itself. If it would work then your report file sizes should see a sizeable drop. Since there are three different logos, assuming this would work, you would have to create some logic to deal with those different images.
 
 
Regards,
 
John W.
 
 
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 28 Aug 2007 at 11:50am
This is an interesting thread. I have to ask the question as to why are you still using subreports? I thought you were only doing this in the attempt to remove the images from the main file. But you see that this doesn't actually work. Plus, there is more overhead with storing a new report inside of an existing report. Why don't you get rid of the subreports and just put the new compressed BMPs into the main report?

Also, I find it interesting that small jpgs result in a larger file than bigger BMPs. I'm going to have to flag this one for future research. I never expected that. There must be additional overhead in storing JPGs internally. If you have more stats for us re this, that would be great.
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
Jasey
Newbie
Newbie


Joined: 27 Aug 2007
Location: United Kingdom
Online Status: Offline
Posts: 11
Quote Jasey Replybullet Posted: 29 Aug 2007 at 12:09am
Originally posted by jkwrpc

I have not done this, so it is more of a thought than something I know will work. Would it be possible to use an OLE Object to link to the pictures/images outside of the file? As I understand it, the image would be pulled from its source and not stored within the report itself. If it would work then your report file sizes should see a sizeable drop. Since there are three different logos, assuming this would work, you would have to create some logic to deal with those different images.
 
 
Regards,
 
John W.
 
 
Hi John,
Yep this does work - we've the code somewhere for it - and I wish I'd done this but when it comes to problems I'm like a dog with a bone Smile - I believe in CR11 it's included. We didin't want to use this method for this project as the customer is very fussy Angry and we need to have absolute control over the Images - but I might go back and do it properly one day.
 
IP IP Logged
Jasey
Newbie
Newbie


Joined: 27 Aug 2007
Location: United Kingdom
Online Status: Offline
Posts: 11
Quote Jasey Replybullet Posted: 29 Aug 2007 at 12:17am
Originally posted by BrianBischof

This is an interesting thread. I have to ask the question as to why are you still using subreports? I thought you were only doing this in the attempt to remove the images from the main file. But you see that this doesn't actually work. Plus, there is more overhead with storing a new report inside of an existing report. Why don't you get rid of the subreports and just put the new compressed BMPs into the main report?

Also, I find it interesting that small jpgs result in a larger file than bigger BMPs. I'm going to have to flag this one for future research. I never expected that. There must be additional overhead in storing JPGs internally. If you have more stats for us re this, that would be great.
I decided on a subreport beacause we are controlling the display of the image using the format formula - and I know that we are going to have to add additional Images in the future and I had wanted to be able to update the Images once and propogate through all the other reports without having to hand crank code or do too much copy & paste & testing.
 
Also - when we find out how to include the v small jpegs without it creating large rpt files I can update it all in one place - now all we need is an "update this report everywhere it appears as a subreport" button and I'll be happy Big%20smile
 
The small jpgs v big bmps was a bit of a suprise for me too - still I've spent most of the day creating the 7 or so reports using the reduced size images and I've had enough of CR for this week.
 
Got a few days off to go and see the Braemar Gathering of the clans Smile
 
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 29 Aug 2007 at 1:20am
Wow. That looks like quite an event.

Well, if that's the only reason for using a subreport, what about using a database field. Some other way to store it rather than a subreport.

Have fun at the gathering!
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
Page  of 2 Next >>
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.027 seconds.