This is a migrated thread and some comments may be shown as answers.

Display image in report

1 Answer 455 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Maliwan
Top achievements
Rank 1
Maliwan asked on 14 Feb 2013, 02:30 AM
Hello,
I'm new to telerik reporting and programming
Now i have problem about display image in report
this is my image path  http://xxxxxx/upload/Companies/Contact/Fields.CompID
/Fields.ContactImgPath

I try this article http://blogs.telerik.com/telerikreportingteam/posts/09-02-20/telerik-reporting-using-the-picturebox-item.aspx
it work If I put this function in PictureBox
= Format("http://xxxxxx/upload/Companies/Contact/7/{0}",Fields.ContactImgPath)
but number 7 it should be Fields.CompID from database like Fields.ContactImgPath
How i do?

PS. Sorry for my english


1 Answer, 1 is accepted

Sort by
0
Maliwan
Top achievements
Rank 1
answered on 14 Feb 2013, 10:52 AM
I found a solution alraedy
I create this user functions

public static string CompLogoPath(int CompID,string ImgName)
        {
            string Url = url + "Companies/Logo/" + CompID + "/" + ImgName;
            return string.Format("{0}", Url);
        }

and call this function in PictureBox
I'm starting understand and have fun with telerik report :D
Tags
General Discussions
Asked by
Maliwan
Top achievements
Rank 1
Answers by
Maliwan
Top achievements
Rank 1
Share this question
or