Showing posts with label image. Show all posts
Showing posts with label image. Show all posts

Wednesday, March 21, 2012

Dynamic Linking - Crystal XI - Image doesnt change

Im using desktop Crystal XI - connecting to a SQL database via ODBC connection.

Here is the problem: I would like to display a different excel file with each record in the report using dynamic linking.

Each record has a related document (xls) that is stored on a different server than the database. I have access to the folder on the server that contains all of the documents (I connect to this server by mapping a drive via windows explorer). I can manually add a document from the folder but the document doesnt change for each record, it just repeats the document that was added manually.

Ive created a formula field (based on records in the SQL db) to generate the link/document location:

"E:\LCM-" + cstr({mwebDocument.Doc_Ent_ID}, 0, "") + "\" + ({mwebDocument.Doc_File_Name}) + "_" + cstr({mwebDocument.Doc_ID}, 0, "") + "_1.xls"

(example return: E:\LCM-289\KC 2554 Testing Backup NOPAs_9609_1.xls)

I then reference the formula field in the graphic location.

So I know I can access the server/files since I can manually add a file.
I know that the file does display because the manually added file displays for each record (even though it doesnt change).
I know that the link is changing for each record because Ive made it a separate field and can verify its correctness.

Can anyone think of a reason why the object/file is not changing for each record?

Appreciate the help.Why don't u use the formula directly in detail section as a hyperlink..|||Thanks for the response - The major reason for not using a hyperlink is that we would like to distribute this report to people outside of our company (who wouldn't have access to the server/files). This was the initial reason to display the file in the report.

Monday, March 19, 2012

Dynamic Images in report body

I need to insert a small graphic into a report's cell based on the underlying data. I can get the image into the cells, but have not been successful in having it change depending on the data. I was planning on using the IIF() function to select one of two images. How do I add the link to the images? I haven't been able to get the correct syntax so far.

Any help?

Thanks

Will

If i understand you good you need to display image to acknowlage the states of each elemnet in this report

the best way is to implement dynamic image in the reporting serveice which will depend on a value of one filed from you data source

for example if value is 1 then display image1 else if 1 then display image 2 and so on for a complete example and steps read this article

http://blog.toddtaylor.com/PermaLink,guid,b1517702-ad4b-48e1-a6e3-b736e8a982cb.aspx

|||

That's exactly what I am looking for. I will try this out this morning.

My heart-felt appreciation to you.

Regards,

Will

|||

You welcomeSmile,

Could you please mark the answer which helps you

Thanks,

|||

OK, I finally got it working. Thanks again.

Will

Dynamic images at runtime

I have a report that comes with one main image and 15 other images that needs to be visible as needed at fixed position to the main image. Adding all the images is easy but managing the visibility is not working. What is the best way to do it? I am looking for sample but have come up empty.

When using a url, you can leverage the expression property to have the dynamic image location.

Or are you meaning a dynamic number of images? That would be tough - probably need to build the rdl yourself w/ .net

|||Thanks for replying I don't have the option to use url, the application will an exe, factory safety related one main image and 15 smaller images added as needed in fixed position relative to the original image.|||it's still hard to figure out exactly what you want to do here. can you give more details in order to better help people answer your question?|||What I am trying to do turns out to be complicated but I have found two samples from the Reporting services news group posted by Microsoft employee Bruce Johnson [MSFT] of how to create it. I have an image and I need to add 15 smaller images to that image at runtime. The two samples I found are Simulated Dynamic Visibility.rdl and ConditionallyDisplayAnImage.RDL. These are doing what I have in mind I could not load the rdl into VS Team suites so I have to create mine based on the content of these two files. I had assumed this should be simple task but it comes with tricks which I just found today. Thanks again for your help.|||

This problem is solved the main part was a cursor yea but my code was due by the close of business, the numeric values representing the images were passed by a cursor in a stored proc which is added to the expression. It works in my box, I will know by Monday if it blows. If you know a better solution please let me know.

Dynamic image size on rdlc report

Hi.

How to set the image size (height and width) dynamically? Size of the image will be obtained from a data field. I tried to edit the source but found no luck:

<TableCell> <ReportItems> <Image Name="img3"> <Sizing>Clip</Sizing> <Source>External</Source> <Style> <BorderStyle> <Default>Solid</Default> </BorderStyle> <BorderColor> <Default>Red</Default> </BorderColor> </Style> <Width>0.12in</Width> <Value>file:///c:\barbetter.bmp</Value> </Image> </ReportItems> </TableCell>

I hope someone can help me with this.. Thanks

Raniel L.

I don't think this can be done unless you're generating the report in XML on the fly.

Dynamic image in my header

HI ,

I need to change the image in my header and footer depending on the sectionid. Is it possible ? how ?

thanks in advance

Chk out this blog on loading images

http://technoblab.blogspot.com

.........................................................................................

remember to "Mark As Answer" if the post helped you

|||

you do this easily in reporting service bu IIf statement check this article for complete example

http://blog.toddtaylor.com/PermaLink,guid,b1517702-ad4b-48e1-a6e3-b736e8a982cb.aspx

Friday, March 9, 2012

Dynamic embedded image...

Hey all,

I am trying to add an image object to a report that has its value property set dynamically and am not being very successful. I have two images embedded in the report called greyFlag and orangeFlag. When I try to add the condition:
...
=IIf(Fields!DateFilled.Value >= DateTime.Now.AddMonths(-12), "orangeFlag", "greyFlag")
...
I get the error:
...
The value of the value property for the image ‘image2’ is "greyFlag", which is not a valid value.

...

What am I doing wrong here?

Regards,

Stephen.

You need to put the code in the visible expression field.

in the Hidden for Greyflag field add the expression

=IIf(Fields!DateFilled.Value >= DateTime.Now.AddMonths(-12), true, false)

ANd do the opposite for the orangeFlag

=IIf(Fields!DateFilled.Value >= DateTime.Now.AddMonths(-12), false,true)

|||

OK. I was hoping to use just one image and replace its source, but I've used your technique by overlaying two images.

Thanks for the help!

Regards,

Stephen.