Print Page | Close Window

VS ASP.net 2008 CR to display pictures dynamically

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=17681
Printed Date: 16 May 2024 at 10:59pm


Topic: VS ASP.net 2008 CR to display pictures dynamically
Posted By: zhixuen
Subject: VS ASP.net 2008 CR to display pictures dynamically
Date Posted: 03 Oct 2012 at 3:38pm

Dear All,

I need the solutions or suggestions to create a crystal report in VS ASP.net 2008 to display the pictures dynamically in the report.

Example, row 1 user upload 2 photos then 2 photos will be displayed at row 2. row 2 have 3 pictures then 3 pictures will be displayed.
and so on!!

Furthermore, do you think the pictures should be stored in database or directory is a better way?

Thanks in advance !~~




Replies:
Posted By: hilfy
Date Posted: 04 Oct 2012 at 3:31am

I don't think you can do this in a single row, although you can do it in a column.  Some of this depends on how your data is set up.  If you have one record for each picture, you definitely can't do it in a row.  If you have a single record with a field for each picture (NOT good db design!) then you could.  In this case you would put a suppression formula on the image object that is something like: IsNull({field for this picture})

 
You can either store the pics in the database or put them in the file system someplace and store the path and filename in the database. 
 
If you store them in the file system, use the properties of the image object in the report to set the image based on the value in the field.
 
If you store the pics in the database, they have to be in JPEG format and you need to either use a native database connection or an OLEDB connection - I've not had much luck getting this to work with an ODBC connection.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: lockwelle
Date Posted: 04 Oct 2012 at 4:33am
well, you could have a stored proc that would return multiple pictures per row, after all that would just be data manipulation, but coming straight out of the database, you would want the better design of 1 picture per row.



Print Page | Close Window