Showing posts with label local. Show all posts
Showing posts with label local. Show all posts

Wednesday, March 21, 2012

Image from Business Object property?

Hello!
I'm using the local reporting services engine within a WinForm
application. I have a Business Object that contains a field which returns a
Bitmap. The Bitmap is created from other values within the same business
object. An example of the properties are below.
I'm binding my report to my BusinessObject and everything is going quite
well with the exception of displaying the graph bitmap within an Image
ReportItem. I've tried different Source types for the Image properties -
Database, Embedded, External but none seem to like the Bitmap within a
property on the Object Data Source.
I saw a few ways to develop a CustomerReportItem and will head down that
road but it seems like I'm missing something really simple. Any thoughts or
helpful tips are welcome.
Thanx,
Mike Q
public class MyBusinessObject
{
public decimal IndexValue
{
get
{
some calculations;
}
}
public Bitmap IndexGraph
{
get
{
Bitmap Result = Bitmap.FromFile("GraphTemplate.bmp");
Graphics g = Graphics.FromImage(Result);
Pen RedPen = new Pen(Brushes.Red, 5);
g.DrawLine(RedPen, 40, 0, 40, 50); // These values are calculated based on
the Index value.
return Result;
}
}
}I found the answer - instead of returning a Bitmap - return a byte[] from
the business object property
Thanx,
-q
"Mike Q" <MQuinn_q@.Yahoo.com> wrote in message
news:OMHy2SVrIHA.4280@.TK2MSFTNGP02.phx.gbl...
> Hello!
> I'm using the local reporting services engine within a WinForm
> application. I have a Business Object that contains a field which returns
> a Bitmap. The Bitmap is created from other values within the same
> business object. An example of the properties are below.
> I'm binding my report to my BusinessObject and everything is going quite
> well with the exception of displaying the graph bitmap within an Image
> ReportItem. I've tried different Source types for the Image properties -
> Database, Embedded, External but none seem to like the Bitmap within a
> property on the Object Data Source.
> I saw a few ways to develop a CustomerReportItem and will head down that
> road but it seems like I'm missing something really simple. Any thoughts
> or helpful tips are welcome.
> Thanx,
> Mike Q
>
> public class MyBusinessObject
> {
> public decimal IndexValue
> {
> get
> {
> some calculations;
> }
> }
> public Bitmap IndexGraph
> {
> get
> {
> Bitmap Result = Bitmap.FromFile("GraphTemplate.bmp");
> Graphics g = Graphics.FromImage(Result);
> Pen RedPen = new Pen(Brushes.Red, 5);
> g.DrawLine(RedPen, 40, 0, 40, 50); // These values are calculated based
> on the Index value.
> return Result;
> }
> }
> }

Friday, March 9, 2012

IIS issue

I just installed IIS on my windows xp pro machine and when I try to access a
website on the local IIS server, I get the following error message:

"You are not authorized to view this page"

I have enabled "Anonymous access" inside Directory Security option of IIS
and I also granted full NTFS permissions to all users so that the IIS root
directory is readily accessible. However, I am still not able to access any
website that resides on the localhost.

Please help.

Thanks.
JessIs this a SQL Server question?