Crystal Reports image loading on runtime - image

I have some reports with many records. Those records have images. They were coming from a .NET Dataset object.
I was initially making the approach of getting the images' contents into the records using System.Byte[] Columns, but the reports took up too much time to load.
I did time profiling. It is not the dataset construction that takes too much.
I put on the table the hypothesis of the images being slowing the process.
So I tried a different approach: Instead of having pictures directly into the tables, I have filepaths.
Following the practic described in Crystal Reports User Guide, I inserted a OLE object of "Paintbrush Picture Type" and its Image's Graphic Location was ser to a database table field. Additionally I also defined a file hyperlink to be the same field.
I tried, it didn' t show the image. But clicking the hyperlink was OK.
So I added more two OLE object items in the report for testing: the first's Graphic location and hyperlink have the filepath of the first record's image. It is a .jpg file.
I created additionally a .bmp copy of that image and set the second item's filepaths to point to this image.
Tested again, hyperlinks work Ok, but no images shown directly in report .
When I click Preview on Visual Studio 2010 Crystal Reports designer I can see the images, but not in runtime.
So, what am I missing for the images to show?
additional info:
VS 2010 premium
.Net framework 4
Windows 7 64 bits
Crystal reports is integrated on Visual Studio
Thanks in advance,
Sérgio

After some frustrating times, it seems I have found a solution in 3 easy steps:
Uninstall every component of Crystal Reports for VS 2008
Reopen Visual Studio 2010
Clean & Rebuild Solution
If you are using CR as a component, during runtime you will notice that the top bar of the component is different: the icons have different design and at right it will say "SAP CRYSTAL REPORTS"

Related

How to fix problem with text not showing in Preview mode for SSRS 2019 using Microsoft Visual Studio Community 2019?

I just got the latest versions today for working with SSRS: SSRS 2019, Visual Studio Community 2019 (Version 4.8.03752) with SSRS Templates (Microsoft SQL Server Reporting Services Designers Version 15.0.1659.0).
I have a textbox with the report title which doesn't show in preview (both in header or body) and a textbox in footer with page counts that doesn't show. In the body I have a Table with a few columns that don't show values but do show the table cells. I noticed that values did show for returned records on first try but not for column headers; however, when I resized one cell, no values were shown at all for anything. Now, no text values show at all in Preview mode.
When I export report to PDF, everything shows (title, body, footer). This also works when I published to the Portal.
Here is what I tried without success:
Changed the font color to all texts to red but text values still don't show.
Deleted the report data files (.data) but text values still don't show.
Open the report file (.rdl) with Report Builder but text values still don't show.
So, it is in the editors (VS and Report Builder) that the problem only exists as rendering (PDF, Word) works and running in Report Portal works.
Thanks.
My issue was resolved by unticking the "Allow height to increase" check box for the text box.
enter image description here
I faced this same issue using the standalone Report Builder application, and I resolved it by placing the textbox inside a rectangle. From then on, it rendered in preview mode as expected. However, I'm not sure how that would affect auto-growth.

Dynamic image in a report SSRS (Visual Studio 2013 Report Designer)

I'm building a report in the report designer from Visual Studio 2013. There is a section in the report where I need to add an image, this image has to be data-bound (I already achieved this). The only problem is, that sometime this image has a null value, so no image is been rendered. If that happen I supposed to display an image that says "Coming Soon", the only problem is this image is not in the data base, so I have to add it from the archive directly.
My question is:
Is there a way to change how I add an image to a report during execution?
I mean, Can I have an expression to set a different source instead of a Database, either Embedded or External?
I will appreciate any help.
Ultimately you are looking for a dynamic image; I recommend setting to External and in the image source field, create an expression with an IsNothing check against your image source path (assuming it is the path you are supplying and not the image itself).
For example: Iif(IsNothing(Fields!ImageSource.Value), "ComingSoonImagePathOrName", Fields!ImageSource.Value)
A similar question and solution was presented here: Want to show dynamic image in SSRS report

Text over an image in an rdlc in VS2010

In VS2010, I've created an rdlc report that I want to view using the reportviewer. On the report, I want to use a scanned image underneath all the text (since it must look like the agency's letterhead), and this image must take up the whole page. The problem is that the text boxes on the report are all bumped down beneath the image. Can someone help me figure out how to make this work?
Right click the image, select Layout, Send to Back.
I'm doing this in VS 2012 now, but I think it's the same in VS 2010.
Right click the body of your report (in design mode),
Select "Body Properties..." and from there you can specify a Background Image.
You can place text above the image at design time. When ReportViewer display the report, it will look bad, but if you export the report in PDF format will look the same as you wish.
I know my answer does not resolve the problem. After working a lot on the subject, it is all I could get.
I have now tried in VS2013. No change.

Crystal Reports will insert certain images but not others

Are there specific requirements for images that are to be inserted into CR?
I’m trying to insert an image into Crystal reports, but nothing happens after I select my file. I have a different image that I’ve used for testing that inserts with no problems so I’m assuming that it has something to do with the JPG file settings when saving the image. Note that this is just a static logo for a page header – nothing is being dynamically loaded.
I know that GIFs cannot be used, so I’ve tried JPG and PNG to no avail. I’ve even saved my “working” image again through Photoshop and it will insert. I’ve then used those settings to save the non-working image, but that image wont insert. I’ve used Crystal Reports a lot in the past and this is the first time I’ve come across this issue and my searches lead me to a variety of resources for dynamic image inclusion, but nothing to for this hopefully simple issue.
I’m using Crystal Reports for Visual Studio 2010.
Link to images used in testing
After messing with this problem all day, I found out it’s a bug in the Crystal Reports IDE.
Here’s how to duplicate the issue:
Right click on your report and select Insert >> Picture
Double-click on the image that you wish to insert.
Depending on your image and how the image was saved in Photoshop, it may or may not insert into the report. I’ve had mixed results and apparently some images work and some do not. I haven’t quite figured out the pattern yet, but I believe it has to do with the color profiles of the image. I probably won’t waste any more time investigating it, because the following resolution has worked for me every time and I can import every image that I’ve created in Photoshop regardless of how the image was saved and the settings used to save the images. (Assuming that they’re all JPGs, of course.)
Resolution:
Right click on your report and select Insert >> Picture
SINGLE-click on the image that you wish to insert to select it.
Click “Open”
The image should insert into the report properly.
It’s a subtle difference, but I hope this saves someone else a few hours of debugging.
Dave
Worked AOK for me. Check if you have all the latest patches. I've attached a screenshot in Crystal 2011 and saved the .rpt for you to try and open in Visual Studio 2010: http://speedy.sh/RGgfg/crimages.zip
The reason is because the format is not supported, I had exactly the same problem but when I saved the file as JPG it started working perfectly!.
i think crytal report does not accept some image formats but what i did when i encountered the problem was to
1. open the image with coreldraw
2. copy the image content of the image and paste it in the crystal report instead of using the insert tool on crystal report and it worked
hope this will also be helpul.

sql server 2008 reporting design layout

I have set up a reporting tool using sql server 2008 R2 with a single report containing 4 datasets on a single page. Each dataset is basically a table and a chart. I would like to have it set up in such a way as to have two datasets on one page of the report and the others on the next page.
Is there anyway to format the layout of a single report or would I have to design a second report and call that from the first somehow and if so how do I do that?
These reports will be later binded to a web application using the reportviewer but not sure if this is possible with visual studio 2010.
Add a page break. You'll maybe need to add an extra rectangle per page to hold the table and chart controls for that page (been some time since I designed a report, sorry)

Resources