Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Cache image that is shown on every page. Post Reply Post New Topic
Author Message
Stooge
Newbie
Newbie
Avatar

Joined: 06 Apr 2012
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote Stooge Replybullet Topic: Cache image that is shown on every page.
     Posted: 06 Apr 2012 at 4:31am
Hello I have a report that is around 1000 pages and on every page it loads two images from urls. And on every page it has to download the images again and again. Any solution to this problem? I am wondering if I put the images in subreports will this be repeated?

Is there a way to avoid the downloading of every image on every page, but instead caching the image inside the report?

Edited by Stooge - 06 Apr 2012 at 4:31am
-.-
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 09 Apr 2012 at 3:27am
subreports basically work the same as the main report, so the subreports would download the image. 
You could put the image as part of the data, perhaps as a second datatable. Doing this would:
a) only download once
b) would not lead to large dataset memorywise.
 
Hope this helps, or at least leads to a solution.
IP IP Logged
Stooge
Newbie
Newbie
Avatar

Joined: 06 Apr 2012
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote Stooge Replybullet Posted: 09 Apr 2012 at 9:35pm
Hello, thanks for your respond.
I am not understanding how to "put the image as part of the data, perhaps as a second datatable"?
-.-
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 10 Apr 2012 at 7:49am
if you are selecting your data from a stored procedure, then you would select the picture(s) you desire into the dataset returned.
 
To cut down on the repeated data of the picture, you could do a second select which would create a second table.
 
If you are not using a stored procedure...then disregard what I wrote...you will need to get the picture everytime...but that is how CR would do it.
 
Sorry, I didn't consider that you wouldn't be using a stored proc, even though many posters on this forum don't.  It's how I was taught to write Reports and how I have been writing them for the past 10 years or so.
IP IP Logged
Stooge
Newbie
Newbie
Avatar

Joined: 06 Apr 2012
Location: United Kingdom
Online Status: Offline
Posts: 3
Quote Stooge Replybullet Posted: 11 Apr 2012 at 1:56am
Actually it loads the image every time only if its in a group header/footer if its in a page header it loads it only once.

Edited by Stooge - 11 Apr 2012 at 1:57am
-.-
IP IP Logged
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