Showing posts with label aspx. Show all posts
Showing posts with label aspx. Show all posts

Tuesday, March 27, 2012

A data source instance has not been supplied for the data source

Hi Guys,

I have create a report and it works in development mode. But when I call this report from aspx page it give me above error message. Please let me know how can I setup datasource of this report at runtime. Below is my code

Regards

ReportParameter[] rptPara = new ReportParameter[1];

rptPara[0] = new ReportParameter("rDate", WebDateChooser1.Text, false);

ReportViewer1.LocalReport.ReportPath = @."C:Business\RPT585.rdl";

ReportViewer1.LocalReport.SetParameters(rptPara);

ReportViewer1.LocalReport.Refresh();

Please anybody could let me guide here....

|||

This is how you can provide DataSource information to report at runtime.

Example:

ObjectDataSource objAdventureWorks = new ObjectDataSource("MyData", "GetDataAddress");

objAdventureWorks.ID = "Adventureworks";

this.Controls.Add(objAdventureWorks);

this.ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("AdventureWorks2000", "Adventureworks"));

|||

I have added the datasource of my report but still keep getting this error message. Please let me guide how to fix this error. adn how to set data source instance. Below is my code

ReportParameter[] rptPara = new ReportParameter[1];

rptPara[0] = new ReportParameter("rDate", WebDateChooser1.Text, false);

ReportViewer1.LocalReport.ReportPath = @."C:\business\RPT528.rdl";

ReportViewer1.LocalReport.SetParameters(rptPara);

ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("dsCustomers"));

ReportViewer1.LocalReport.Refresh();

|||

http://blogs.msdn.com/bimusings/archive/2005/07/01/434659.aspx

I think this article should answer your question. I was experiencing the same error and Russell's work-around fixed it.

TF

Thursday, March 22, 2012

A connection could not be made to report server

Hi,
:Every time I try to Deploy report I get this error
A connection could not be made to report server
http:// localhost/reports/pages/folder.aspx
I have already tried:
1. Define my user
2. I can see the report manager from the browser
3. change to asp.net 2
4. find out that the IIS user is not anonymous
!Please help me , I am trying to solve this problem for weeks
Thank you
AviIn the VS 2005 Report Project properties dialog what's the value for the
TargetServerURL property?
http://localhost/ReportServer?
Steve MunLeeuw
"AB" <savi176@.yahoo.com> wrote in message
news:1160682021.955195.311490@.h48g2000cwc.googlegroups.com...
> Hi,
> :Every time I try to Deploy report I get this error
> A connection could not be made to report server
> http:// localhost/reports/pages/folder.aspx
> I have already tried:
> 1. Define my user
> 2. I can see the report manager from the browser
> 3. change to asp.net 2
> 4. find out that the IIS user is not anonymous
> !Please help me , I am trying to solve this problem for weeks
> Thank you
> Avi
>|||:the TargetServerURL property is
http:// localhost/reports/pages/folder.aspx
Steve MunLeeuw =D7=9B=D7=AA=D7=91:
> In the VS 2005 Report Project properties dialog what's the value for the
> TargetServerURL property?
> http://localhost/ReportServer?
> Steve MunLeeuw
> "AB" <savi176@.yahoo.com> wrote in message
> news:1160682021.955195.311490@.h48g2000cwc.googlegroups.com...
> > Hi,
> > :Every time I try to Deploy report I get this error
> >
> > A connection could not be made to report server
> > http:// localhost/reports/pages/folder.aspx
> >
> > I have already tried:
> > 1. Define my user
> > 2. I can see the report manager from the browser
> > 3. change to asp.net 2
> > 4. find out that the IIS user is not anonymous
> >
> > !Please help me , I am trying to solve this problem for weeks
> >
> > Thank you
> >
> > Avi
> >|||Try:
http:// localhost/reportserver
Steve MunLeeuw
"AB" <savi176@.yahoo.com> wrote in message
news:1160684262.288244.239240@.i42g2000cwa.googlegroups.com...
:the TargetServerURL property is
http:// localhost/reports/pages/folder.aspx
Steve MunLeeuw ?:
> In the VS 2005 Report Project properties dialog what's the value for the
> TargetServerURL property?
> http://localhost/ReportServer?
> Steve MunLeeuw
> "AB" <savi176@.yahoo.com> wrote in message
> news:1160682021.955195.311490@.h48g2000cwc.googlegroups.com...
> > Hi,
> > :Every time I try to Deploy report I get this error
> >
> > A connection could not be made to report server
> > http:// localhost/reports/pages/folder.aspx
> >
> > I have already tried:
> > 1. Define my user
> > 2. I can see the report manager from the browser
> > 3. change to asp.net 2
> > 4. find out that the IIS user is not anonymous
> >
> > !Please help me , I am trying to solve this problem for weeks
> >
> > Thank you
> >
> > Avi
> >|||!Thank you
.It was the problem.
Steve MunLeeuw =D7=9B=D7=AA=D7=91:
> Try:
> http:// localhost/reportserver
> Steve MunLeeuw
> "AB" <savi176@.yahoo.com> wrote in message
> news:1160684262.288244.239240@.i42g2000cwa.googlegroups.com...
> :the TargetServerURL property is
> http:// localhost/reports/pages/folder.aspx
>
> Steve MunLeeuw ?:
> > In the VS 2005 Report Project properties dialog what's the value for the
> > TargetServerURL property?
> > http://localhost/ReportServer?
> >
> > Steve MunLeeuw
> >
> > "AB" <savi176@.yahoo.com> wrote in message
> > news:1160682021.955195.311490@.h48g2000cwc.googlegroups.com...
> > > Hi,
> > > :Every time I try to Deploy report I get this error
> > >
> > > A connection could not be made to report server
> > > http:// localhost/reports/pages/folder.aspx
> > >
> > > I have already tried:
> > > 1. Define my user
> > > 2. I can see the report manager from the browser
> > > 3. change to asp.net 2
> > > 4. find out that the IIS user is not anonymous
> > >
> > > !Please help me , I am trying to solve this problem for weeks
> > >
> > > Thank you
> > >
> > > Avi
> > >sql