Formula for dynamic image src in crystal report - crystal-reports

I have taken a OLE object selecting paint brush option. after that going in picture tab clicked x-2 button to write formula.
Wrote 2 formulas
1. "F:/BrWeb/BrWeb/QRImages/DSR2022263.jpg"
2. "~/QRImages/DSR2022263.jpg"
but image is not shown in report.
Questions
whats the mistake I have done?
How to write correct formula so that my image appears?
Can I user server path instead of static path in formula?

Try to change "F:/BrWeb/BrWeb/QRImages/DSR2022263.jpg"
to "F:\BrWeb\BrWeb\QRImages\DSR2022263.jpg"

Related

Crystal Report section details doesn't create columns

I want to print data with two columns in crystal report. For example:
enter image description here
But the problem is, I cannot create columns in crystal report. I followed the instructions like Right Click in Section Details then tick the Format Multiple Columns checkbox then adjust the Gap and detail size in Layout Tab. However, only 1 column has been created.
enter image description here
I am using the Crystal Report built in in Visual Basic.Net 2008. Thank you very much.
Probably due to page margins, page size, detail width and gap, the content can't fit as 2 columns.
Use File, Page Setup to adjust those aspects.
Another suspect is that you never actually previewed the report.
The multi-column layout is rendered during Preview.
So you must actually run the report.

How to prevent image in Crystal Reports 10 from being cut off to the second page

I'm making a Crystal Reports template. The template has some text in the header and then it has an image. If the text has a few lines, the image is normal and allowed in the first page, but if the text has many lines the image will be cut off in the first page and second page. Could it have ways to prevent the image from being cut off to the second page, such as auto-rescaling the image size?
I tried can grow and other settings in Crystal Reports 10, but it didn't work.
Report Design Picture
Make sure Keep Object Together in the properties of the image is checked. This will prevent CR to split your image across pages.
Best option in this case would be Create another section and place the image in that section instead of text and image in same section, This will force the image to go to another page if it doens't fit in first page.
For E.g, if data in report header, create one more section Report Header a and place text in that section and Report Header b and place image in this section

iReport Import Background Image

I would know how to import a background image on iReport designer 4.1.2.
These are the step I take:
choose View->Report Designer->Import Background Image...
select my png image
choose View->Report Designer->Transform Background Image
click right on image and set Fit page width and Trasparency to 100%
finally click End Transformation
The background image appears properly in the report but when launch the preview it disappears!
What's wrong? I miss something?
PS: I discarded the Background band solution because the image exceed the report margins.
Sorry, I didn't read the question carefully at first. You need to use the background band. Resize your image to be the appropriate size so you can use it. After doing that...
Export to PDF and you should see the background image. Export to XHTML and you should see the background image.
When you export to HTML background images won't display. The FAQ link on the JasperReports page explains things (like this!) that you need to consider in HTML reports.
The background image does not do what you want. It is intended to provide a background while you are editing the report in iReport. It has no effect on the final report.
It seems to be that this iReport's option (Import Background Image) does not affect on report, it is affect on GUI appearance. May be this is a bug.
I did not find ireport.background.image or ireport.background.image.properties properties usage in JR source codes.
The exported report in html format does not contain image (set in ireport.background.image).
You should use Background band for creating watermarks or something else.
I had the same problem as mentioned above. I realized that all you need to do is to:
Make sure the palette is open by selecting Windows > palette
Click on image and it will prompt you to select an image from your browser.
If you want to set the image as the background image, simply shift the image item in the report inspector to the background band.
Using Image option from (Window > Palette) is the better way to display the image in iReport. Keeping the image under Page Header helps to display the image in each page.
I think iReport Background image (view -> Report designer -> Import Background image) option is to use for Pre printed reports. When you need to print report details to pre printed page its very difficult to make alignments and create exact report. For this you can scan the pre printed page and load it as background image (view -> Report designer -> Import Background image) and then align the report parameters as scanned pre printed page. While you printing it automatically remove the inserted background. Please correct me if I'm wrong.
use the background band
Make it of preferable size
Drag the image icon in the pallet into the background band
4.position it i.e centre, lefr or right. save and preview

how to create watermark background in crystal report?

hello
i want to create watermark background in crystal report.
one way is:
1- On the Report menu, click Section Expert.
The Section Expert dialog box appears.
2- In the Sections list, click Page Header, then select the Underlay Following Sections check box.
3- Click OK to preview the report again.
but in this solution lines and boxes in report design page appear back of background image.
what is better solution?
the solution to this problem is make a subreport, the main report will only have the watermark on page header A, and the subreport on page header B
Your method is the best way to do it, as far as I know.
On your background don't forget to right-click->move->to back. That should put the background image in the back and all other report elements in the front.

Add an image with transparency to Crystal Reports

Is it really true that Crystal Reports does not support images that have transparency?
We are using it at work and the guy that does Crystal Reports told me it doesn't support transparency. I couldn't believe it so I've spent the last 20 minutes googling and think he might be right. This seems absolutely incredible in this day and age.
Can anyone please confirm whether or not CR supports transparency, and if so how you do it (we are not limited by the type of image to insert - png, gif etc).
For the record we are using CR version that comes with VS 2008 (version 10.5).
CR doesn't support transparency but you can use a wmf image to solve your problem.
I'm using CR 12 (2008), i need to put an image as signature (as a watermark) on another image.
Example:
Background_image.jpg
Signature_image.jpg
Convert Signature_image.jpg into a wmf file using "Inkscape" (freeware).
In the report, we have "Background_image.jpg" and over it the "Signature_image.wmf" image,
it works great!
Just reached over here while searching for same problem. Unfortunately this is true till this date :(
Answering this question for users who may visit again here.
Transparent background of image is not retained when adding it to Crystal Reports
I achived solution following way.
Painted transperent area with printing page color i.e. white in my case.
I would like to put image in page header and some text over it.
In CR design mode.
right click in page header section -> select section expert
select page header -> click insert
In page header a check "Underlay following sections" -> click ok.
back in design, in section "page header a" include image.
In section "page header b" include text which I would like to show over image (i.e. I am expecting to be transparent).
Hope this helps for future visitors.
There is another work around I tried and was successful. If you want the image as a watermark in your report, use your report as a sub report in the detail section of the main report and keep the image in a main report page header and use the option 'Underlay Following Sections' in the Section Expert. All the lines and texts will appear properly on top of the image.
As AR_Italy said, confirmed that wmf files are the way to go, even though SAP site says transparent images are not supported, so thank you to AR_Italy.
The only thing I would add is that these can be Exported from Adobe Illustrator as well (make sure your image has a transparent background first).
If your Image has a white background AND your lazy just check this out:
Rightclick on your report, select Report and Report options and Check "Retain Original Image Color Depth