I am getting the following error when I call. Any help would be appreciated.
ReportViewer1.ServerReport.Render(format, devInfo, out mimeType, out
encoding, out extension, out streamIds, out warnings);
Error:
"Client found response content type of '', but expected 'text/xml'"
below is the code I use.
MyRS.ReportViewerCredentials rvwCreds = new
MyRS.ReportViewerCredentials(userName, pass,"");
ReportViewer1.ServerReport.ReportServerCredentials = rvwCreds;
ReportViewer1.ServerReport.ReportServerUrl = new
System.Uri(ConfigurationManager.AppSettings.Get("rsUrl"));
ReportViewer1.ServerReport.ReportPath = "/benefit reports/Employee
Roster?sys_id=16&effdt=" +
HttpContext.Current.Request.QueryString.Get("asof").ToString();
string encoding = "";
string mimeType;
Microsoft.Reporting.WebForms.Warning[] warnings;
string[] streamIds;
string format = "HTML4.0";
string extension = "";
string devInfo = @."<DeviceInfo>" +
"<Toolbar>True</Toolbar>" +
"<Parameters>True</Parameters>" +
"<DocMap>True</DocMap>" +
"<Zoom>100</Zoom>" +
"</DeviceInfo>";
ReportViewer1.ServerReport.Render(format, devInfo, out mimeType, out
encoding, out extension, out streamIds, out warnings);using the SOAP access you can't provide the parameters in the reportpath
property.
its not an URL access.
the reportpath property must contain ONLY the report path (ie: "/benefit
reports/Employee Roster"
you have to use the parameters objects to send your parameters to the
report.
"dgator" <dgator@.discussions.microsoft.com> wrote in message
news:3DC2CCC0-569F-421B-9D6F-61E0B9459B6B@.microsoft.com...
>I am getting the following error when I call. Any help would be
>appreciated.
> ReportViewer1.ServerReport.Render(format, devInfo, out mimeType, out
> encoding, out extension, out streamIds, out warnings);
> Error:
> "Client found response content type of '', but expected 'text/xml'"
> below is the code I use.
> MyRS.ReportViewerCredentials rvwCreds = new
> MyRS.ReportViewerCredentials(userName, pass,"");
> ReportViewer1.ServerReport.ReportServerCredentials = rvwCreds;
> ReportViewer1.ServerReport.ReportServerUrl = new
> System.Uri(ConfigurationManager.AppSettings.Get("rsUrl"));
> ReportViewer1.ServerReport.ReportPath = "/benefit reports/Employee
> Roster?sys_id=16&effdt=" +
> HttpContext.Current.Request.QueryString.Get("asof").ToString();
> string encoding = "";
> string mimeType;
> Microsoft.Reporting.WebForms.Warning[] warnings;
> string[] streamIds;
> string format = "HTML4.0";
> string extension = "";
> string devInfo = @."<DeviceInfo>" +
> "<Toolbar>True</Toolbar>" +
> "<Parameters>True</Parameters>" +
> "<DocMap>True</DocMap>" +
> "<Zoom>100</Zoom>" +
> "</DeviceInfo>";
>
> ReportViewer1.ServerReport.Render(format, devInfo, out mimeType,
> out
> encoding, out extension, out streamIds, out warnings);
>|||I did as you said and still get this message
"Client found response content type of '', but expected 'text/xml'.\r\nThe
request failed with an empty response."
It throws the error on the SetParameters line now. If I comment out the
setting of parameters, it throws the same error on the "Render" command.
Here is my code
string userName = ConfigurationManager.AppSettings.Get("rptUser").ToString();
string pass =ConfigurationManager.AppSettings.Get("rptPassword").ToString();
MyRS.ReportViewerCredentials rvwCreds = new
MyRS.ReportViewerCredentials(userName, pass,"");
ReportViewer1.ServerReport.ReportServerCredentials = rvwCreds;
ReportViewer1.ServerReport.ReportServerUrl = new
System.Uri(ConfigurationManager.AppSettings.Get("rsUrl"));
ReportViewer1.ServerReport.ReportPath = "/benefit reports/Employee
Roster";
string sys_id =HttpContext.Current.Request.QueryString.Get("sys_id").ToString();
string asof =HttpContext.Current.Request.QueryString.Get("asof").ToString();
ReportParameter param1 = new ReportParameter("sys_id", sys_id);
ReportParameter param2 = new ReportParameter("effdt", asof);
ReportViewer1.ServerReport.SetParameters(new ReportParameter[] {
param1, param2 });
string encoding = "";
string mimeType;
Microsoft.Reporting.WebForms.Warning[] warnings;
string[] streamIds;
string format = "HTML4.0";
string extension = "";
string devInfo = @."<DeviceInfo>" +
"<Toolbar>True</Toolbar>" +
"<Parameters>True</Parameters>" +
"<DocMap>True</DocMap>" +
"<Zoom>100</Zoom>" +
"</DeviceInfo>";
ReportViewer1.ServerReport.Render(format, devInfo, out mimeType, out
encoding, out extension, out streamIds, out warnings);
"Jéjé" wrote:
> using the SOAP access you can't provide the parameters in the reportpath
> property.
> its not an URL access.
> the reportpath property must contain ONLY the report path (ie: "/benefit
> reports/Employee Roster"
> you have to use the parameters objects to send your parameters to the
> report.
>
> "dgator" <dgator@.discussions.microsoft.com> wrote in message
> news:3DC2CCC0-569F-421B-9D6F-61E0B9459B6B@.microsoft.com...
> >I am getting the following error when I call. Any help would be
> >appreciated.
> >
> > ReportViewer1.ServerReport.Render(format, devInfo, out mimeType, out
> > encoding, out extension, out streamIds, out warnings);
> >
> > Error:
> > "Client found response content type of '', but expected 'text/xml'"
> >
> > below is the code I use.
> >
> > MyRS.ReportViewerCredentials rvwCreds = new
> > MyRS.ReportViewerCredentials(userName, pass,"");
> > ReportViewer1.ServerReport.ReportServerCredentials = rvwCreds;
> >
> > ReportViewer1.ServerReport.ReportServerUrl = new
> > System.Uri(ConfigurationManager.AppSettings.Get("rsUrl"));
> > ReportViewer1.ServerReport.ReportPath = "/benefit reports/Employee
> > Roster?sys_id=16&effdt=" +
> > HttpContext.Current.Request.QueryString.Get("asof").ToString();
> >
> > string encoding = "";
> > string mimeType;
> > Microsoft.Reporting.WebForms.Warning[] warnings;
> > string[] streamIds;
> > string format = "HTML4.0";
> > string extension = "";
> > string devInfo = @."<DeviceInfo>" +
> > "<Toolbar>True</Toolbar>" +
> > "<Parameters>True</Parameters>" +
> > "<DocMap>True</DocMap>" +
> > "<Zoom>100</Zoom>" +
> > "</DeviceInfo>";
> >
> >
> > ReportViewer1.ServerReport.Render(format, devInfo, out mimeType,
> > out
> > encoding, out extension, out streamIds, out warnings);
> >
> >
>
>|||do you use RS 2005?
the new reportviewer control works with RS2005 only.
the devinfo parameters are optional, because the control provides a lot of
properties like zoom, showdocmap etc...
also this control do the rendering by himself, there is no need to call the
render method.
Put the control on your asp.net page, change the parameters and options, run
the page and you'll see the result or a more detailed error.
but, maybe there is a problem at the reportserver virtual directory himself.
"dgator" <dgator@.discussions.microsoft.com> wrote in message
news:C0581095-ED38-4960-87C3-E478454B9D33@.microsoft.com...
>I did as you said and still get this message
> "Client found response content type of '', but expected 'text/xml'.\r\nThe
> request failed with an empty response."
> It throws the error on the SetParameters line now. If I comment out the
> setting of parameters, it throws the same error on the "Render" command.
> Here is my code
> string userName => ConfigurationManager.AppSettings.Get("rptUser").ToString();
> string pass => ConfigurationManager.AppSettings.Get("rptPassword").ToString();
> MyRS.ReportViewerCredentials rvwCreds = new
> MyRS.ReportViewerCredentials(userName, pass,"");
> ReportViewer1.ServerReport.ReportServerCredentials = rvwCreds;
> ReportViewer1.ServerReport.ReportServerUrl = new
> System.Uri(ConfigurationManager.AppSettings.Get("rsUrl"));
> ReportViewer1.ServerReport.ReportPath = "/benefit reports/Employee
> Roster";
> string sys_id => HttpContext.Current.Request.QueryString.Get("sys_id").ToString();
> string asof => HttpContext.Current.Request.QueryString.Get("asof").ToString();
> ReportParameter param1 = new ReportParameter("sys_id", sys_id);
> ReportParameter param2 = new ReportParameter("effdt", asof);
> ReportViewer1.ServerReport.SetParameters(new ReportParameter[] {
> param1, param2 });
>
> string encoding = "";
> string mimeType;
> Microsoft.Reporting.WebForms.Warning[] warnings;
> string[] streamIds;
> string format = "HTML4.0";
> string extension = "";
> string devInfo = @."<DeviceInfo>" +
> "<Toolbar>True</Toolbar>" +
> "<Parameters>True</Parameters>" +
> "<DocMap>True</DocMap>" +
> "<Zoom>100</Zoom>" +
> "</DeviceInfo>";
>
> ReportViewer1.ServerReport.Render(format, devInfo, out mimeType,
> out
> encoding, out extension, out streamIds, out warnings);
>
> "Jéjé" wrote:
>> using the SOAP access you can't provide the parameters in the reportpath
>> property.
>> its not an URL access.
>> the reportpath property must contain ONLY the report path (ie: "/benefit
>> reports/Employee Roster"
>> you have to use the parameters objects to send your parameters to the
>> report.
>>
>> "dgator" <dgator@.discussions.microsoft.com> wrote in message
>> news:3DC2CCC0-569F-421B-9D6F-61E0B9459B6B@.microsoft.com...
>> >I am getting the following error when I call. Any help would be
>> >appreciated.
>> >
>> > ReportViewer1.ServerReport.Render(format, devInfo, out mimeType, out
>> > encoding, out extension, out streamIds, out warnings);
>> >
>> > Error:
>> > "Client found response content type of '', but expected 'text/xml'"
>> >
>> > below is the code I use.
>> >
>> > MyRS.ReportViewerCredentials rvwCreds = new
>> > MyRS.ReportViewerCredentials(userName, pass,"");
>> > ReportViewer1.ServerReport.ReportServerCredentials = rvwCreds;
>> >
>> > ReportViewer1.ServerReport.ReportServerUrl = new
>> > System.Uri(ConfigurationManager.AppSettings.Get("rsUrl"));
>> > ReportViewer1.ServerReport.ReportPath = "/benefit
>> > reports/Employee
>> > Roster?sys_id=16&effdt=" +
>> > HttpContext.Current.Request.QueryString.Get("asof").ToString();
>> >
>> > string encoding = "";
>> > string mimeType;
>> > Microsoft.Reporting.WebForms.Warning[] warnings;
>> > string[] streamIds;
>> > string format = "HTML4.0";
>> > string extension = "";
>> > string devInfo = @."<DeviceInfo>" +
>> > "<Toolbar>True</Toolbar>" +
>> > "<Parameters>True</Parameters>" +
>> > "<DocMap>True</DocMap>" +
>> > "<Zoom>100</Zoom>" +
>> > "</DeviceInfo>";
>> >
>> >
>> > ReportViewer1.ServerReport.Render(format, devInfo, out mimeType,
>> > out
>> > encoding, out extension, out streamIds, out warnings);
>> >
>> >
>>|||Yes, I use rs 2005.
I have reduced the code to the following and still get the issue.
ReportViewer1.ServerReport.ReportServerUrl = new
System.Uri(ConfigurationManager.AppSettings.Get("rsUrl"));
ReportViewer1.ServerReport.ReportPath = "/benefit reports/ppl";
ReportViewer1.ProcessingMode = ProcessingMode.Remote;
ReportViewer1.ServerReport.Refresh();
Any other thoughts? What about the settings on the virtual directory. I
have tried this on two different development machines.
Thanks
"Jéjé" wrote:
> do you use RS 2005?
> the new reportviewer control works with RS2005 only.
> the devinfo parameters are optional, because the control provides a lot of
> properties like zoom, showdocmap etc...
> also this control do the rendering by himself, there is no need to call the
> render method.
> Put the control on your asp.net page, change the parameters and options, run
> the page and you'll see the result or a more detailed error.
> but, maybe there is a problem at the reportserver virtual directory himself.
> "dgator" <dgator@.discussions.microsoft.com> wrote in message
> news:C0581095-ED38-4960-87C3-E478454B9D33@.microsoft.com...
> >I did as you said and still get this message
> >
> > "Client found response content type of '', but expected 'text/xml'.\r\nThe
> > request failed with an empty response."
> >
> > It throws the error on the SetParameters line now. If I comment out the
> > setting of parameters, it throws the same error on the "Render" command.
> >
> > Here is my code
> >
> > string userName => > ConfigurationManager.AppSettings.Get("rptUser").ToString();
> > string pass => > ConfigurationManager.AppSettings.Get("rptPassword").ToString();
> >
> > MyRS.ReportViewerCredentials rvwCreds = new
> > MyRS.ReportViewerCredentials(userName, pass,"");
> > ReportViewer1.ServerReport.ReportServerCredentials = rvwCreds;
> >
> > ReportViewer1.ServerReport.ReportServerUrl = new
> > System.Uri(ConfigurationManager.AppSettings.Get("rsUrl"));
> > ReportViewer1.ServerReport.ReportPath = "/benefit reports/Employee
> > Roster";
> >
> > string sys_id => > HttpContext.Current.Request.QueryString.Get("sys_id").ToString();
> > string asof => > HttpContext.Current.Request.QueryString.Get("asof").ToString();
> >
> > ReportParameter param1 = new ReportParameter("sys_id", sys_id);
> >
> > ReportParameter param2 = new ReportParameter("effdt", asof);
> >
> > ReportViewer1.ServerReport.SetParameters(new ReportParameter[] {
> > param1, param2 });
> >
> >
> > string encoding = "";
> > string mimeType;
> > Microsoft.Reporting.WebForms.Warning[] warnings;
> > string[] streamIds;
> > string format = "HTML4.0";
> > string extension = "";
> > string devInfo = @."<DeviceInfo>" +
> > "<Toolbar>True</Toolbar>" +
> > "<Parameters>True</Parameters>" +
> > "<DocMap>True</DocMap>" +
> > "<Zoom>100</Zoom>" +
> > "</DeviceInfo>";
> >
> >
> > ReportViewer1.ServerReport.Render(format, devInfo, out mimeType,
> > out
> > encoding, out extension, out streamIds, out warnings);
> >
> >
> > "Jéjé" wrote:
> >
> >> using the SOAP access you can't provide the parameters in the reportpath
> >> property.
> >> its not an URL access.
> >>
> >> the reportpath property must contain ONLY the report path (ie: "/benefit
> >> reports/Employee Roster"
> >>
> >> you have to use the parameters objects to send your parameters to the
> >> report.
> >>
> >>
> >> "dgator" <dgator@.discussions.microsoft.com> wrote in message
> >> news:3DC2CCC0-569F-421B-9D6F-61E0B9459B6B@.microsoft.com...
> >> >I am getting the following error when I call. Any help would be
> >> >appreciated.
> >> >
> >> > ReportViewer1.ServerReport.Render(format, devInfo, out mimeType, out
> >> > encoding, out extension, out streamIds, out warnings);
> >> >
> >> > Error:
> >> > "Client found response content type of '', but expected 'text/xml'"
> >> >
> >> > below is the code I use.
> >> >
> >> > MyRS.ReportViewerCredentials rvwCreds = new
> >> > MyRS.ReportViewerCredentials(userName, pass,"");
> >> > ReportViewer1.ServerReport.ReportServerCredentials = rvwCreds;
> >> >
> >> > ReportViewer1.ServerReport.ReportServerUrl = new
> >> > System.Uri(ConfigurationManager.AppSettings.Get("rsUrl"));
> >> > ReportViewer1.ServerReport.ReportPath = "/benefit
> >> > reports/Employee
> >> > Roster?sys_id=16&effdt=" +
> >> > HttpContext.Current.Request.QueryString.Get("asof").ToString();
> >> >
> >> > string encoding = "";
> >> > string mimeType;
> >> > Microsoft.Reporting.WebForms.Warning[] warnings;
> >> > string[] streamIds;
> >> > string format = "HTML4.0";
> >> > string extension = "";
> >> > string devInfo = @."<DeviceInfo>" +
> >> > "<Toolbar>True</Toolbar>" +
> >> > "<Parameters>True</Parameters>" +
> >> > "<DocMap>True</DocMap>" +
> >> > "<Zoom>100</Zoom>" +
> >> > "</DeviceInfo>";
> >> >
> >> >
> >> > ReportViewer1.ServerReport.Render(format, devInfo, out mimeType,
> >> > out
> >> > encoding, out extension, out streamIds, out warnings);
> >> >
> >> >
> >>
> >>
> >>
>
>|||have you impersonate your application?
does RS works fine? (http://localhost/reportserver?/benefit reports/ppl)
"dgator" <dgator@.discussions.microsoft.com> wrote in message
news:CDC10304-8DEE-4938-B624-84DAE034F43E@.microsoft.com...
> Yes, I use rs 2005.
> I have reduced the code to the following and still get the issue.
> ReportViewer1.ServerReport.ReportServerUrl = new
> System.Uri(ConfigurationManager.AppSettings.Get("rsUrl"));
> ReportViewer1.ServerReport.ReportPath = "/benefit reports/ppl";
> ReportViewer1.ProcessingMode = ProcessingMode.Remote;
> ReportViewer1.ServerReport.Refresh();
> Any other thoughts? What about the settings on the virtual directory. I
> have tried this on two different development machines.
> Thanks
> "Jéjé" wrote:
>> do you use RS 2005?
>> the new reportviewer control works with RS2005 only.
>> the devinfo parameters are optional, because the control provides a lot
>> of
>> properties like zoom, showdocmap etc...
>> also this control do the rendering by himself, there is no need to call
>> the
>> render method.
>> Put the control on your asp.net page, change the parameters and options,
>> run
>> the page and you'll see the result or a more detailed error.
>> but, maybe there is a problem at the reportserver virtual directory
>> himself.
>> "dgator" <dgator@.discussions.microsoft.com> wrote in message
>> news:C0581095-ED38-4960-87C3-E478454B9D33@.microsoft.com...
>> >I did as you said and still get this message
>> >
>> > "Client found response content type of '', but expected
>> > 'text/xml'.\r\nThe
>> > request failed with an empty response."
>> >
>> > It throws the error on the SetParameters line now. If I comment out
>> > the
>> > setting of parameters, it throws the same error on the "Render"
>> > command.
>> >
>> > Here is my code
>> >
>> > string userName =>> > ConfigurationManager.AppSettings.Get("rptUser").ToString();
>> > string pass =>> > ConfigurationManager.AppSettings.Get("rptPassword").ToString();
>> >
>> > MyRS.ReportViewerCredentials rvwCreds = new
>> > MyRS.ReportViewerCredentials(userName, pass,"");
>> > ReportViewer1.ServerReport.ReportServerCredentials = rvwCreds;
>> >
>> > ReportViewer1.ServerReport.ReportServerUrl = new
>> > System.Uri(ConfigurationManager.AppSettings.Get("rsUrl"));
>> > ReportViewer1.ServerReport.ReportPath = "/benefit
>> > reports/Employee
>> > Roster";
>> >
>> > string sys_id =>> > HttpContext.Current.Request.QueryString.Get("sys_id").ToString();
>> > string asof =>> > HttpContext.Current.Request.QueryString.Get("asof").ToString();
>> >
>> > ReportParameter param1 = new ReportParameter("sys_id", sys_id);
>> >
>> > ReportParameter param2 = new ReportParameter("effdt", asof);
>> >
>> > ReportViewer1.ServerReport.SetParameters(new ReportParameter[] {
>> > param1, param2 });
>> >
>> >
>> > string encoding = "";
>> > string mimeType;
>> > Microsoft.Reporting.WebForms.Warning[] warnings;
>> > string[] streamIds;
>> > string format = "HTML4.0";
>> > string extension = "";
>> > string devInfo = @."<DeviceInfo>" +
>> > "<Toolbar>True</Toolbar>" +
>> > "<Parameters>True</Parameters>" +
>> > "<DocMap>True</DocMap>" +
>> > "<Zoom>100</Zoom>" +
>> > "</DeviceInfo>";
>> >
>> >
>> > ReportViewer1.ServerReport.Render(format, devInfo, out mimeType,
>> > out
>> > encoding, out extension, out streamIds, out warnings);
>> >
>> >
>> > "Jéjé" wrote:
>> >
>> >> using the SOAP access you can't provide the parameters in the
>> >> reportpath
>> >> property.
>> >> its not an URL access.
>> >>
>> >> the reportpath property must contain ONLY the report path (ie:
>> >> "/benefit
>> >> reports/Employee Roster"
>> >>
>> >> you have to use the parameters objects to send your parameters to the
>> >> report.
>> >>
>> >>
>> >> "dgator" <dgator@.discussions.microsoft.com> wrote in message
>> >> news:3DC2CCC0-569F-421B-9D6F-61E0B9459B6B@.microsoft.com...
>> >> >I am getting the following error when I call. Any help would be
>> >> >appreciated.
>> >> >
>> >> > ReportViewer1.ServerReport.Render(format, devInfo, out mimeType, out
>> >> > encoding, out extension, out streamIds, out warnings);
>> >> >
>> >> > Error:
>> >> > "Client found response content type of '', but expected 'text/xml'"
>> >> >
>> >> > below is the code I use.
>> >> >
>> >> > MyRS.ReportViewerCredentials rvwCreds = new
>> >> > MyRS.ReportViewerCredentials(userName, pass,"");
>> >> > ReportViewer1.ServerReport.ReportServerCredentials =>> >> > rvwCreds;
>> >> >
>> >> > ReportViewer1.ServerReport.ReportServerUrl = new
>> >> > System.Uri(ConfigurationManager.AppSettings.Get("rsUrl"));
>> >> > ReportViewer1.ServerReport.ReportPath = "/benefit
>> >> > reports/Employee
>> >> > Roster?sys_id=16&effdt=" +
>> >> > HttpContext.Current.Request.QueryString.Get("asof").ToString();
>> >> >
>> >> > string encoding = "";
>> >> > string mimeType;
>> >> > Microsoft.Reporting.WebForms.Warning[] warnings;
>> >> > string[] streamIds;
>> >> > string format = "HTML4.0";
>> >> > string extension = "";
>> >> > string devInfo = @."<DeviceInfo>" +
>> >> > "<Toolbar>True</Toolbar>" +
>> >> > "<Parameters>True</Parameters>" +
>> >> > "<DocMap>True</DocMap>" +
>> >> > "<Zoom>100</Zoom>" +
>> >> > "</DeviceInfo>";
>> >> >
>> >> >
>> >> > ReportViewer1.ServerReport.Render(format, devInfo, out
>> >> > mimeType,
>> >> > out
>> >> > encoding, out extension, out streamIds, out warnings);
>> >> >
>> >> >
>> >>
>> >>
>> >>
>>sql
Friday, March 30, 2012
reportviewer error?
Labels:
appreciated,
call,
database,
devinfo,
error,
following,
format,
microsoft,
mimetype,
mysql,
oracle,
render,
reportviewer,
reportviewer1,
server,
serverreport,
sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment