Showing posts with label net. Show all posts
Showing posts with label net. Show all posts

Friday, March 30, 2012

ReportViewer HyperlinkTarget Property Problem

I am running a locally processed report in Asp.net The report has a
textbox with a hyperlink property. In the report viewer control I
have set the HyperLink target to "_Blank".
When I look at the resultant page everything works fine for the first
page. If the user clicks on the hyperlink another browser window
opens. Unfortunately, if the user selects the next page in the
report, the Hyperlink target functionality doesn't work. Clicking on
the link results in the clicked link displaying within the report
viewer frame.
Looking at the page source
for page one the A tag is correct.
for page two the A tag is missing the target=_blank
Any suggestions?Hi Chuck,
Welcome to use MSDN Managed Newsgroup Support.
By default, when you use the Jump to URL property in the Navigation tab in
a textbox, it will jump to the web page in the same browser window.
I am not sure where you add the Hyperlink Target, here is a work around may
be help:
1. Create a webpage and add a javascript to jump to the Web Page you want
to with the "_Blank" target.
2. In the report, set the Jump to URL property to the webpage including the
script.
Hope this will be helpful.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.

ReportViewer Help

I use the following code to display a report in the ReportViewer. The report
and the shared datasource are in another .NET solution. The report displays,
but the data does not. Can anyone help me figure out how to make the
report data display?
private DataTable LoadReportData()
{
DataSet ds = new DataSet();
ds.ReadXml("C:\\Reports\\ReportsSharedDataSource.rds");
return ds.Tables[1];
}
protected void Page_Load(object sender, EventArgs e)
{
this.ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.
ProcessingMode.Local;
this.ReportViewer1.LocalReport.ReportPath = "C:\\Reports\\ActivitySummaryReport.rdl";
this.ReportViewer1.LocalReport.DataSources.Add(new Microsoft.
Reporting.WebForms.ReportDataSource("ReportsSharedDataSource",
LoadReportData()));
this.ReportViewer1.LocalReport.EnableExternalImages = true;
}
Thanks,
PaulaAssuming that Tables[1] actually returns data and your report bindings are
correct, try:
reportViewer1.RefreshReport()
--
HTH,
---
Teo Lachev, MVP, MCSD, MCT
"Microsoft Reporting Services in Action"
"Applied Microsoft Analysis Services 2005"
Home page and blog: http://www.prologika.com/
---
"Paula" <pmpayne@.nospam.com> wrote in message
news:abc40aa6399943198835be4ccb90828a@.ureader.com...
>I use the following code to display a report in the ReportViewer. The
>report
> and the shared datasource are in another .NET solution. The report
> displays,
> but the data does not. Can anyone help me figure out how to make the
> report data display?
> private DataTable LoadReportData()
> {
> DataSet ds = new DataSet();
> ds.ReadXml("C:\\Reports\\ReportsSharedDataSource.rds");
> return ds.Tables[1];
> }
> protected void Page_Load(object sender, EventArgs e)
> {
> this.ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.
> ProcessingMode.Local;
> this.ReportViewer1.LocalReport.ReportPath => "C:\\Reports\\ActivitySummaryReport.rdl";
> this.ReportViewer1.LocalReport.DataSources.Add(new Microsoft.
> Reporting.WebForms.ReportDataSource("ReportsSharedDataSource",
> LoadReportData()));
> this.ReportViewer1.LocalReport.EnableExternalImages = true;
> }
> Thanks,
> Paula|||How many tables do you have in your dataset?
Remeber that tables are 0 indexed, so if you had only one table in your
dataset you would want to return Tables[0].
"Paula" <pmpayne@.nospam.com> wrote in message
news:abc40aa6399943198835be4ccb90828a@.ureader.com...
>I use the following code to display a report in the ReportViewer. The
>report
> and the shared datasource are in another .NET solution. The report
> displays,
> but the data does not. Can anyone help me figure out how to make the
> report data display?
> private DataTable LoadReportData()
> {
> DataSet ds = new DataSet();
> ds.ReadXml("C:\\Reports\\ReportsSharedDataSource.rds");
> return ds.Tables[1];
> }
> protected void Page_Load(object sender, EventArgs e)
> {
> this.ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.
> ProcessingMode.Local;
> this.ReportViewer1.LocalReport.ReportPath => "C:\\Reports\\ActivitySummaryReport.rdl";
> this.ReportViewer1.LocalReport.DataSources.Add(new Microsoft.
> Reporting.WebForms.ReportDataSource("ReportsSharedDataSource",
> LoadReportData()));
> this.ReportViewer1.LocalReport.EnableExternalImages = true;
> }
> Thanks,
> Paulasql

ReportViewer Height

Hello,

I try to embed my Reports of Reporting Services to ASP .NET Application. I use ReportViewer component of Visual Studio 2005.
When I try to set Height property to 100% there is no report content shown. I tried to set SizeToReportContent property but there wasn't success.
At the same time when I set Height to any particular value e.g. 400px, everything is OK. But of cousre I can't know particular height for every reports.
Did you have any such problems? Can you help me?

Thank you,Xhtml does not treat percentage height the same way as traditional html. Take a look at www.gotreportviewer.com, FAQ #14.|||I also cannot get SizeToReportContent = True to work on my web form report viewer controls. Is this a bug or are we overlooking something?|||SizeToReportContent has no effect when AsyncRendering = true. If you set AsyncRendering = false, which renders the report contents inline (versus being in an iframe), then SizeToReportContent will work.|||I wrote some javascript to size the report after it was loaded, using the AsyncRendering = true.|||

When I set AsyncRendering=true, I get an error message when the user tries to navigate to the second page of my report: " Page navigation is out of range."

When I set AsyncRendering=false, it works correctly.

I am using a remote report.

|||

korggy wrote:

When I set AsyncRendering=true, I get an error message when the user tries to navigate to the second page of my report: " Page navigation is out of range."

When I set AsyncRendering=false, it works correctly.

I am using a remote report.

I figured out a workaround. See this post.

|||

Would it be possible to post your javascript?

I still get scrollbars even when AsyncRendering=false SizeToReportContent=true

|||

dreadjr wrote:

I wrote some javascript to size the report after it was loaded, using the AsyncRendering = true.

Can you please share that with the rest of us please?

|||

This is the script that I am using. If you resize a window, you then have to refresh the page to resize the viewer, but there is probably a workaround for that, too.

css style

.fullheight{margin-bottom:120px;}

javascript

<script language="JavaScript" type="text/JavaScript">

window.onload=function resize(){

var viewer = document.getElementById("<%=ReportViewer1.ClientID %>");

var htmlheight = document.documentElement.clientHeight;

viewer.style.height = (htmlheight - 120) + "px";

}

</script>

<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"

ProcessingMode="Remote" Width="100%" CssClass="fullheight">

</rsweb:ReportViewer>

ReportViewer Height

Hello,

I try to embed my Reports of Reporting Services to ASP .NET Application. I use ReportViewer component of Visual Studio 2005.
When I try to set Height property to 100% there is no report content shown. I tried to set SizeToReportContent property but there wasn't success.
At the same time when I set Height to any particular value e.g. 400px, everything is OK. But of cousre I can't know particular height for every reports.
Did you have any such problems? Can you help me?

Thank you,Xhtml does not treat percentage height the same way as traditional html. Take a look at www.gotreportviewer.com, FAQ #14.|||I also cannot get SizeToReportContent = True to work on my web form report viewer controls. Is this a bug or are we overlooking something?|||SizeToReportContent has no effect when AsyncRendering = true. If you set AsyncRendering = false, which renders the report contents inline (versus being in an iframe), then SizeToReportContent will work.|||I wrote some javascript to size the report after it was loaded, using the AsyncRendering = true.|||

When I set AsyncRendering=true, I get an error message when the user tries to navigate to the second page of my report: " Page navigation is out of range."

When I set AsyncRendering=false, it works correctly.

I am using a remote report.

|||

korggy wrote:

When I set AsyncRendering=true, I get an error message when the user tries to navigate to the second page of my report: " Page navigation is out of range."

When I set AsyncRendering=false, it works correctly.

I am using a remote report.

I figured out a workaround. See this post.

|||

Would it be possible to post your javascript?

I still get scrollbars even when AsyncRendering=false SizeToReportContent=true

|||

dreadjr wrote:

I wrote some javascript to size the report after it was loaded, using the AsyncRendering = true.

Can you please share that with the rest of us please?

|||

This is the script that I am using. If you resize a window, you then have to refresh the page to resize the viewer, but there is probably a workaround for that, too.

css style

.fullheight{margin-bottom:120px;}

javascript

<script language="JavaScript" type="text/JavaScript">

window.onload=function resize(){

var viewer = document.getElementById("<%=ReportViewer1.ClientID %>");

var htmlheight = document.documentElement.clientHeight;

viewer.style.height = (htmlheight - 120) + "px";

}

</script>

<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"

ProcessingMode="Remote" Width="100%" CssClass="fullheight">

</rsweb:ReportViewer>

|||thanks for pointing me in the right direction. I wrote this to get rid of the duplicate scrollbars in async mode.

<body>

<script language="JavaScript" type="text/JavaScript">

window.onload=function RemoveScrollbars()

{

document.getElementById("<%=ReportViewer1.ClientID %>").lastChild.firstChild.style.overflow = "visible";

}

</script>

<form runat="server" action="Report.aspx" >

<rsweb:ReportViewer

ID="ReportViewer1"

runat="server"

ProcessingMode="Remote"

AsyncRendering="false"

SizeToReportContent="true" />

</form>

</body>

I gleened this navagation from the nifty tree view in the IE Developer Toolbar.

works like a charm!

ReportViewer Height

Hello,

I try to embed my Reports of Reporting Services to ASP .NET Application. I use ReportViewer component of Visual Studio 2005.
When I try to set Height property to 100% there is no report content shown. I tried to set SizeToReportContent property but there wasn't success.
At the same time when I set Height to any particular value e.g. 400px, everything is OK. But of cousre I can't know particular height for every reports.
Did you have any such problems? Can you help me?

Thank you,Xhtml does not treat percentage height the same way as traditional html. Take a look at www.gotreportviewer.com, FAQ #14.|||I also cannot get SizeToReportContent = True to work on my web form report viewer controls. Is this a bug or are we overlooking something?|||SizeToReportContent has no effect when AsyncRendering = true. If you set AsyncRendering = false, which renders the report contents inline (versus being in an iframe), then SizeToReportContent will work.|||I wrote some javascript to size the report after it was loaded, using the AsyncRendering = true.|||

When I set AsyncRendering=true, I get an error message when the user tries to navigate to the second page of my report: " Page navigation is out of range."

When I set AsyncRendering=false, it works correctly.

I am using a remote report.

|||

korggy wrote:

When I set AsyncRendering=true, I get an error message when the user tries to navigate to the second page of my report: " Page navigation is out of range."

When I set AsyncRendering=false, it works correctly.

I am using a remote report.

I figured out a workaround. See this post.

|||

Would it be possible to post your javascript?

I still get scrollbars even when AsyncRendering=false SizeToReportContent=true

|||

dreadjr wrote:

I wrote some javascript to size the report after it was loaded, using the AsyncRendering = true.

Can you please share that with the rest of us please?

|||

This is the script that I am using. If you resize a window, you then have to refresh the page to resize the viewer, but there is probably a workaround for that, too.

css style

.fullheight{margin-bottom:120px;}

javascript

<script language="JavaScript" type="text/JavaScript">

window.onload=function resize(){

var viewer = document.getElementById("<%=ReportViewer1.ClientID %>");

var htmlheight = document.documentElement.clientHeight;

viewer.style.height = (htmlheight - 120) + "px";

}

</script>

<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"

ProcessingMode="Remote" Width="100%" CssClass="fullheight">

</rsweb:ReportViewer>

ReportViewer Height

Hello,

I try to embed my Reports of Reporting Services to ASP .NET Application. I use ReportViewer component of Visual Studio 2005.
When I try to set Height property to 100% there is no report content shown. I tried to set SizeToReportContent property but there wasn't success.
At the same time when I set Height to any particular value e.g. 400px, everything is OK. But of cousre I can't know particular height for every reports.
Did you have any such problems? Can you help me?

Thank you,Xhtml does not treat percentage height the same way as traditional html. Take a look at www.gotreportviewer.com, FAQ #14.|||I also cannot get SizeToReportContent = True to work on my web form report viewer controls. Is this a bug or are we overlooking something?|||SizeToReportContent has no effect when AsyncRendering = true. If you set AsyncRendering = false, which renders the report contents inline (versus being in an iframe), then SizeToReportContent will work.|||I wrote some javascript to size the report after it was loaded, using the AsyncRendering = true.|||

When I set AsyncRendering=true, I get an error message when the user tries to navigate to the second page of my report: " Page navigation is out of range."

When I set AsyncRendering=false, it works correctly.

I am using a remote report.

|||

korggy wrote:

When I set AsyncRendering=true, I get an error message when the user tries to navigate to the second page of my report: " Page navigation is out of range."

When I set AsyncRendering=false, it works correctly.

I am using a remote report.

I figured out a workaround. See this post.

|||

Would it be possible to post your javascript?

I still get scrollbars even when AsyncRendering=false SizeToReportContent=true

|||

dreadjr wrote:

I wrote some javascript to size the report after it was loaded, using the AsyncRendering = true.

Can you please share that with the rest of us please?

|||

This is the script that I am using. If you resize a window, you then have to refresh the page to resize the viewer, but there is probably a workaround for that, too.

css style

.fullheight{margin-bottom:120px;}

javascript

<script language="JavaScript" type="text/JavaScript">

window.onload=function resize(){

var viewer = document.getElementById("<%=ReportViewer1.ClientID %>");

var htmlheight = document.documentElement.clientHeight;

viewer.style.height = (htmlheight - 120) + "px";

}

</script>

<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"

ProcessingMode="Remote" Width="100%" CssClass="fullheight">

</rsweb:ReportViewer>

ReportViewer Height

Hello,

I try to embed my Reports of Reporting Services to ASP .NET Application. I use ReportViewer component of Visual Studio 2005.
When I try to set Height property to 100% there is no report content shown. I tried to set SizeToReportContent property but there wasn't success.
At the same time when I set Height to any particular value e.g. 400px, everything is OK. But of cousre I can't know particular height for every reports.
Did you have any such problems? Can you help me?

Thank you,Xhtml does not treat percentage height the same way as traditional html. Take a look at www.gotreportviewer.com, FAQ #14.|||I also cannot get SizeToReportContent = True to work on my web form report viewer controls. Is this a bug or are we overlooking something?|||SizeToReportContent has no effect when AsyncRendering = true. If you set AsyncRendering = false, which renders the report contents inline (versus being in an iframe), then SizeToReportContent will work.|||I wrote some javascript to size the report after it was loaded, using the AsyncRendering = true.|||

When I set AsyncRendering=true, I get an error message when the user tries to navigate to the second page of my report: " Page navigation is out of range."

When I set AsyncRendering=false, it works correctly.

I am using a remote report.

|||

korggy wrote:

When I set AsyncRendering=true, I get an error message when the user tries to navigate to the second page of my report: " Page navigation is out of range."

When I set AsyncRendering=false, it works correctly.

I am using a remote report.

I figured out a workaround. See this post.

|||

Would it be possible to post your javascript?

I still get scrollbars even when AsyncRendering=false SizeToReportContent=true

|||

dreadjr wrote:

I wrote some javascript to size the report after it was loaded, using the AsyncRendering = true.

Can you please share that with the rest of us please?

|||

This is the script that I am using. If you resize a window, you then have to refresh the page to resize the viewer, but there is probably a workaround for that, too.

css style

.fullheight{margin-bottom:120px;}

javascript

<scriptlanguage="JavaScript"type="text/JavaScript">

window.onload=function resize(){

var viewer = document.getElementById("<%=ReportViewer1.ClientID %>");

var htmlheight = document.documentElement.clientHeight;

viewer.style.height = (htmlheight - 120) + "px";

}

</script>

<rsweb:ReportViewerID="ReportViewer1"runat="server"Font-Names="Verdana"Font-Size="8pt"

ProcessingMode="Remote"Width="100%"CssClass="fullheight">

</rsweb:ReportViewer>

|||thanks for pointing me in the right direction. I wrote this to get rid of the duplicate scrollbars in async mode.

<body>

<script language="JavaScript" type="text/JavaScript">

window.onload=function RemoveScrollbars()

{

document.getElementById("<%=ReportViewer1.ClientID %>").lastChild.firstChild.style.overflow = "visible";

}

</script>

<form runat="server" action="Report.aspx" >

<rsweb:ReportViewer

ID="ReportViewer1"

runat="server"

ProcessingMode="Remote"

AsyncRendering="false"

SizeToReportContent="true" />

</form>

</body>

I gleened this navagation from the nifty tree view in the IE Developer Toolbar.

works like a charm!

sql

ReportViewer Height

Hello,

I try to embed my Reports of Reporting Services to ASP .NET Application. I use ReportViewer component of Visual Studio 2005.
When I try to set Height property to 100% there is no report content shown. I tried to set SizeToReportContent property but there wasn't success.
At the same time when I set Height to any particular value e.g. 400px, everything is OK. But of cousre I can't know particular height for every reports.
Did you have any such problems? Can you help me?

Thank you,Xhtml does not treat percentage height the same way as traditional html. Take a look at www.gotreportviewer.com, FAQ #14.|||I also cannot get SizeToReportContent = True to work on my web form report viewer controls. Is this a bug or are we overlooking something?|||SizeToReportContent has no effect when AsyncRendering = true. If you set AsyncRendering = false, which renders the report contents inline (versus being in an iframe), then SizeToReportContent will work.|||I wrote some javascript to size the report after it was loaded, using the AsyncRendering = true.|||

When I set AsyncRendering=true, I get an error message when the user tries to navigate to the second page of my report: " Page navigation is out of range."

When I set AsyncRendering=false, it works correctly.

I am using a remote report.

|||

korggy wrote:

When I set AsyncRendering=true, I get an error message when the user tries to navigate to the second page of my report: " Page navigation is out of range."

When I set AsyncRendering=false, it works correctly.

I am using a remote report.

I figured out a workaround. See this post.

|||

Would it be possible to post your javascript?

I still get scrollbars even when AsyncRendering=false SizeToReportContent=true

|||

dreadjr wrote:

I wrote some javascript to size the report after it was loaded, using the AsyncRendering = true.

Can you please share that with the rest of us please?

|||

This is the script that I am using. If you resize a window, you then have to refresh the page to resize the viewer, but there is probably a workaround for that, too.

css style

.fullheight{margin-bottom:120px;}

javascript

<script language="JavaScript" type="text/JavaScript">

window.onload=function resize(){

var viewer = document.getElementById("<%=ReportViewer1.ClientID %>");

var htmlheight = document.documentElement.clientHeight;

viewer.style.height = (htmlheight - 120) + "px";

}

</script>

<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"

ProcessingMode="Remote" Width="100%" CssClass="fullheight">

</rsweb:ReportViewer>

ReportViewer Height

Hello,

I try to embed my Reports of Reporting Services to ASP .NET Application. I use ReportViewer component of Visual Studio 2005.
When I try to set Height property to 100% there is no report content shown. I tried to set SizeToReportContent property but there wasn't success.
At the same time when I set Height to any particular value e.g. 400px, everything is OK. But of cousre I can't know particular height for every reports.
Did you have any such problems? Can you help me?

Thank you,Xhtml does not treat percentage height the same way as traditional html. Take a look at www.gotreportviewer.com, FAQ #14.|||I also cannot get SizeToReportContent = True to work on my web form report viewer controls. Is this a bug or are we overlooking something?|||SizeToReportContent has no effect when AsyncRendering = true. If you set AsyncRendering = false, which renders the report contents inline (versus being in an iframe), then SizeToReportContent will work.|||I wrote some javascript to size the report after it was loaded, using the AsyncRendering = true.|||

When I set AsyncRendering=true, I get an error message when the user tries to navigate to the second page of my report: " Page navigation is out of range."

When I set AsyncRendering=false, it works correctly.

I am using a remote report.

|||

korggy wrote:

When I set AsyncRendering=true, I get an error message when the user tries to navigate to the second page of my report: " Page navigation is out of range."

When I set AsyncRendering=false, it works correctly.

I am using a remote report.

I figured out a workaround. See this post.

|||

Would it be possible to post your javascript?

I still get scrollbars even when AsyncRendering=false SizeToReportContent=true

|||

dreadjr wrote:

I wrote some javascript to size the report after it was loaded, using the AsyncRendering = true.

Can you please share that with the rest of us please?

|||

This is the script that I am using. If you resize a window, you then have to refresh the page to resize the viewer, but there is probably a workaround for that, too.

css style

.fullheight{margin-bottom:120px;}

javascript

<script language="JavaScript" type="text/JavaScript">

window.onload=function resize(){

var viewer = document.getElementById("<%=ReportViewer1.ClientID %>");

var htmlheight = document.documentElement.clientHeight;

viewer.style.height = (htmlheight - 120) + "px";

}

</script>

<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"

ProcessingMode="Remote" Width="100%" CssClass="fullheight">

</rsweb:ReportViewer>

ReportViewer formatting

All,
I am having an issue with a fairly standard implementation of the
ReportViewer control in an Asp.net application.
I have several fairly strait forward reports, but am having problems with
one that contains several tightly aligned textboxes. I am using a grid
spacing of '0.0625in'.
When designed in Visual Studio, or when exported to PDF, the report renders
fine. However, when viewed in the ReportViewer, several of the text boxes
have been resized or moved.
I am wondering if there are some best-practices that I could utilize in
designing this report. Is there a grid spacing that renders better?
Any thoughts/suggestions would be appreciated!
Pierson2 differences that I have discovered:
1) ReportViewer does not consistently render textboxes that overlap(even
slightly) it compensates for this by realigning them. Exports do handle
overlaping textboxes.
2) If you use a bordered textbox as a 'checkbox', change the text size to
1pt. ReportViewer increases the textbox size to fit text, even if there is
no text supplied.
Hope this helps someone!
"Pierson C" wrote:
> All,
> I am having an issue with a fairly standard implementation of the
> ReportViewer control in an Asp.net application.
> I have several fairly strait forward reports, but am having problems with
> one that contains several tightly aligned textboxes. I am using a grid
> spacing of '0.0625in'.
> When designed in Visual Studio, or when exported to PDF, the report renders
> fine. However, when viewed in the ReportViewer, several of the text boxes
> have been resized or moved.
> I am wondering if there are some best-practices that I could utilize in
> designing this report. Is there a grid spacing that renders better?
> Any thoughts/suggestions would be appreciated!
> Pierson|||Make sure that none of the textboxes overlap. We don't support overlapping
items in some renderers and will move/resize items if needed.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Pierson C" <PiersonC@.discussions.microsoft.com> wrote in message
news:ED575E95-145A-401A-BDBB-82659A24580F@.microsoft.com...
> All,
> I am having an issue with a fairly standard implementation of the
> ReportViewer control in an Asp.net application.
> I have several fairly strait forward reports, but am having problems with
> one that contains several tightly aligned textboxes. I am using a grid
> spacing of '0.0625in'.
> When designed in Visual Studio, or when exported to PDF, the report
> renders
> fine. However, when viewed in the ReportViewer, several of the text boxes
> have been resized or moved.
> I am wondering if there are some best-practices that I could utilize in
> designing this report. Is there a grid spacing that renders better?
> Any thoughts/suggestions would be appreciated!
> Pierson

ReportViewer for .NET

I'm a VB6.0 programmer who is new to .Net. I'm having to write a
program in .Net that will call various .rdls in a windows
application. I've done the reports in the Business Intelligence
Studio (2005) pulling from a SQL Server 2005 database, but I don't
have .Net 2005, only Visual Studio 2003 for the VB side. I've read a
lot about using the reportviewer.dll for this, but I can't seem to
find it available for the Visual Studio 2003 or the Express version of
2005. Can someone point me in the right direction?
-wylieThe ReportViewer control assumes the 2.0 Framework and VS2005. It does not
work with 2003. See Chapter 14 of my book for a detailed discussion of this
new control. I also include the ReportViewer control in my (free) INETA
talks and some conference sessions. This is also a good source
http://gotreportviewer.com/.
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Wylie" <wylie72@.gmail.com> wrote in message
news:1186409091.881661.58640@.l70g2000hse.googlegroups.com...
> I'm a VB6.0 programmer who is new to .Net. I'm having to write a
> program in .Net that will call various .rdls in a windows
> application. I've done the reports in the Business Intelligence
> Studio (2005) pulling from a SQL Server 2005 database, but I don't
> have .Net 2005, only Visual Studio 2003 for the VB side. I've read a
> lot about using the reportviewer.dll for this, but I can't seem to
> find it available for the Visual Studio 2003 or the Express version of
> 2005. Can someone point me in the right direction?
> -wylie
>sql

ReportViewer Extract DropDown

All,
I am using the ASP.Net ReportViewer control, but I cannot extract data
because the extract format type dropdown is not visible in the control. I
have the ShowExtractControls property set to True and I can see the Extract
link, but it is disabled
Is there something else I need to configure to allow the dropdown to populate?On Dec 19, 4:10 pm, Rex Mahel <Rex Ma...@.discussions.microsoft.com>
wrote:
> All,
> I am using the ASP.Net ReportViewer control, but I cannot extract data
> because the extract format type dropdown is not visible in the control. I
> have the ShowExtractControls property set to True and I can see the Extract
> link, but it is disabled
> Is there something else I need to configure to allow the dropdown to populate?
This link might be helpful.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1968399&SiteID=1
Also, you might try checking: C:\Program Files\Microsoft SQL Server
\MSSQL.2\Reporting Services\ReportServer\rsreportserver.config (...
\MSSQL.2\... could be ...\MSSQL.3\... based on if you have SSIS/SSAS
installed). Of course, this would be a long shot. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Looked through the link, checked the cache issue, "Do not save exrypted pages
to disk" was unchecked, checked C:\Windows\Temp security properties and
granted full control to SQLServer2005ReportingServicesWebServiceUser user.
Nothing had any effect.
Any other ideas?
"EMartinez" wrote:
> On Dec 19, 4:10 pm, Rex Mahel <Rex Ma...@.discussions.microsoft.com>
> wrote:
> > All,
> >
> > I am using the ASP.Net ReportViewer control, but I cannot extract data
> > because the extract format type dropdown is not visible in the control. I
> > have the ShowExtractControls property set to True and I can see the Extract
> > link, but it is disabled
> >
> > Is there something else I need to configure to allow the dropdown to populate?
>
> This link might be helpful.
> http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1968399&SiteID=1
> Also, you might try checking: C:\Program Files\Microsoft SQL Server
> \MSSQL.2\Reporting Services\ReportServer\rsreportserver.config (...
> \MSSQL.2\... could be ...\MSSQL.3\... based on if you have SSIS/SSAS
> installed). Of course, this would be a long shot. Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>

ReportViewer error with SSRS2005 on a non-default website

I am facing a problem when trying to access a report using ReportViewer
ASP.NET 2.0 WebForms control. The reportviewer displays an error "The attempt
to connect to the report server failed. Check your connection information and
that the report server is a compatible version. The request failed with HTTP
status 404: Not Found". When I try to access any of the SSRS2005 Web Service
method (For example: ListChildren) with a proxy, I get an error "The request
failed with HTTP status 404: Not Found."
Here are the exception details:
-----
{"The request failed with HTTP status 404: Not Found."}
[System.Net.WebException]: {"The request failed with HTTP status 404:
Not Found."}
Data: {System.Collections.ListDictionaryInternal}
HelpLink: null
InnerException: null
Message: "The request failed with HTTP status 404: Not Found."
Source: "Test.MDC.CRI.SSRS2005.Helper"
StackTrace: " at
Test.MDC.CRI.SSRS2005.Helper.RSHelper.GetChildren(String parentFolder,
Boolean recursive, CatalogItem[]& items) in
C:\\SSRS\\CRI\\Prototype2\\Libraries\\SSRS2005Helper\\RSHelper.cs:line
252\r\n at Test.MDC.CRI.SSRS2005.Helper.RSHelper.GetChildrenByType(String
parentFolder, ItemTypeEnum itemType, Boolean ignoreDatasourceFolder,
SortedList& childItems) in
C:\\SSRS\\CRI\\Prototype2\\Libraries\\SSRS2005Helper\\RSHelper.cs:line
105\r\n at Test.MDC.CRI.SSRS2005.Helper.RSHelper.GetFolders(String
parentFolder, Boolean ignoreDatasourceFolder, SortedList& childFolders) in
C:\\SSRS\\CRI\\Prototype2\\Libraries\\SSRS2005Helper\\RSHelper.cs:line 26\r\n
at BrowseFolders.Page_Load(Object sender, EventArgs e) in
c:\\SSRS\\CRI\\Prototype2\\ReportViewerWebClient\\UserCtls\\BrowseFolders.ascx.cs:line
33\r\n at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,
Object o, Object t, EventArgs e)\r\n at
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,
EventArgs e)\r\n at System.Web.UI.Control.OnLoad(EventArgs e)\r\n at
System.Web.UI.Control.LoadRecursive()\r\n at
System.Web.UI.Control.LoadRecursive()\r\n at
System.Web.UI.Control.LoadRecursive()\r\n at
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint)"
TargetSite: {Boolean GetChildren(System.String, Boolean,
Test.MDC.CRI.SSRS2005.WebService.CatalogItem[] ByRef)}
-----
Response object of System.Net.WebException:
-----
{System.Net.HttpWebResponse}
[System.Net.HttpWebResponse]: {System.Net.HttpWebResponse}
base {System.MarshalByRefObject}: {System.Net.HttpWebResponse}
ContentLength: 629
ContentType: "text/html"
Headers: {Pragma: no-cache
Proxy-Connection: Keep-Alive
Connection: Keep-Alive
Content-Length: 629
Cache-Control: no-cache
Content-Type: text/html
}
IsFromCache: false
IsMutuallyAuthenticated: false
ResponseUri:
{http://ssrs.dev.reports.com:8084/ReportServer/ReportService2005.asmx}
-----
My Report Server configuration:
Web Server: Windows 2003 Standard SP1
SQL Server: SQL Enterprise 2005 SP1
Report Server Web Site: Installed on a non-default web site, running under
ASP.NET 2.0, part of app pool with identity NetWork Service
Reporting Services Windows Service running under Local System account
Identity of the web site: Anonymous access disabled, Windows Authentication
checked
Reports virtual directory - Integrated Windows Authentication, Anonymous
disabled
ReportServer virtual directory - Integrated Windows Authentication,
Anonymous disabled
Patches:
1. Disable loopback entry set as per MSKB article:
http://support.microsoft.com/kb/896861/
2. RSWebApplication.config changed as below:
Before:
<UI>
<ReportServerUrl></ReportServerUrl>
<ReportServerVirtualDirectory>ReportServer</ReportServerVirtualDirectory>
<ReportBuilderTrustLevel>FullTrust</ReportBuilderTrustLevel>
</UI>
After:
<UI>
<ReportServerUrl>http://ssrs.dev.reports.com:8084/ReportServer</ReportServerUrl>
<ReportServerVirtualDirectory></ReportServerVirtualDirectory>
<ReportBuilderTrustLevel>FullTrust</ReportBuilderTrustLevel>
</UI>
The following sites runs OK.
- http://ssrs.dev.reports.com:8084/ReportServer/ (Able to deploy reports
to this using VS2005 designer. Currently displays the version Microsoft SQL
Server Reporting Services Version 9.00.2047.00)
- http://ssrs.dev.reports.com:8084/Reports/ (Displays deployed reports and
able to browse folders)
If you can help me to fix the issue, it would be of great help. Struggling
for few days already with this issue.
Thanks,
Live_Love_LaughOne more thing to mention:
After playing with SSRS2005 for few days, I figured out that if the
WebApplication is running of file system(ASP.NET 2.0 feature), rather than on
a website I could able to see the results through report viewer control but
as soon as I put it on IIS, I am getting the error "The attempt to connect to
the report server failed. Check your connection information and that the
report server is a compatible version. The request failed with HTTP status
404: Not Found."
Any ideas?
Thanks,
Live_Love_Laugh
"Live_Love_Laugh" wrote:
> I am facing a problem when trying to access a report using ReportViewer
> ASP.NET 2.0 WebForms control. The reportviewer displays an error "The attempt
> to connect to the report server failed. Check your connection information and
> that the report server is a compatible version. The request failed with HTTP
> status 404: Not Found". When I try to access any of the SSRS2005 Web Service
> method (For example: ListChildren) with a proxy, I get an error "The request
> failed with HTTP status 404: Not Found."
> Here are the exception details:
> -----
> {"The request failed with HTTP status 404: Not Found."}
> [System.Net.WebException]: {"The request failed with HTTP status 404:
> Not Found."}
> Data: {System.Collections.ListDictionaryInternal}
> HelpLink: null
> InnerException: null
> Message: "The request failed with HTTP status 404: Not Found."
> Source: "Test.MDC.CRI.SSRS2005.Helper"
> StackTrace: " at
> Test.MDC.CRI.SSRS2005.Helper.RSHelper.GetChildren(String parentFolder,
> Boolean recursive, CatalogItem[]& items) in
> C:\\SSRS\\CRI\\Prototype2\\Libraries\\SSRS2005Helper\\RSHelper.cs:line
> 252\r\n at Test.MDC.CRI.SSRS2005.Helper.RSHelper.GetChildrenByType(String
> parentFolder, ItemTypeEnum itemType, Boolean ignoreDatasourceFolder,
> SortedList& childItems) in
> C:\\SSRS\\CRI\\Prototype2\\Libraries\\SSRS2005Helper\\RSHelper.cs:line
> 105\r\n at Test.MDC.CRI.SSRS2005.Helper.RSHelper.GetFolders(String
> parentFolder, Boolean ignoreDatasourceFolder, SortedList& childFolders) in
> C:\\SSRS\\CRI\\Prototype2\\Libraries\\SSRS2005Helper\\RSHelper.cs:line 26\r\n
> at BrowseFolders.Page_Load(Object sender, EventArgs e) in
> c:\\SSRS\\CRI\\Prototype2\\ReportViewerWebClient\\UserCtls\\BrowseFolders.ascx.cs:line
> 33\r\n at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp,
> Object o, Object t, EventArgs e)\r\n at
> System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender,
> EventArgs e)\r\n at System.Web.UI.Control.OnLoad(EventArgs e)\r\n at
> System.Web.UI.Control.LoadRecursive()\r\n at
> System.Web.UI.Control.LoadRecursive()\r\n at
> System.Web.UI.Control.LoadRecursive()\r\n at
> System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
> Boolean includeStagesAfterAsyncPoint)"
> TargetSite: {Boolean GetChildren(System.String, Boolean,
> Test.MDC.CRI.SSRS2005.WebService.CatalogItem[] ByRef)}
> -----
> Response object of System.Net.WebException:
> -----
> {System.Net.HttpWebResponse}
> [System.Net.HttpWebResponse]: {System.Net.HttpWebResponse}
> base {System.MarshalByRefObject}: {System.Net.HttpWebResponse}
> ContentLength: 629
> ContentType: "text/html"
> Headers: {Pragma: no-cache
> Proxy-Connection: Keep-Alive
> Connection: Keep-Alive
> Content-Length: 629
> Cache-Control: no-cache
> Content-Type: text/html
> }
> IsFromCache: false
> IsMutuallyAuthenticated: false
> ResponseUri:
> {http://ssrs.dev.reports.com:8084/ReportServer/ReportService2005.asmx}
> -----
> My Report Server configuration:
> Web Server: Windows 2003 Standard SP1
> SQL Server: SQL Enterprise 2005 SP1
> Report Server Web Site: Installed on a non-default web site, running under
> ASP.NET 2.0, part of app pool with identity NetWork Service
> Reporting Services Windows Service running under Local System account
> Identity of the web site: Anonymous access disabled, Windows Authentication
> checked
> Reports virtual directory - Integrated Windows Authentication, Anonymous
> disabled
> ReportServer virtual directory - Integrated Windows Authentication,
> Anonymous disabled
> Patches:
> 1. Disable loopback entry set as per MSKB article:
> http://support.microsoft.com/kb/896861/
> 2. RSWebApplication.config changed as below:
> Before:
> <UI>
> <ReportServerUrl></ReportServerUrl>
> <ReportServerVirtualDirectory>ReportServer</ReportServerVirtualDirectory>
> <ReportBuilderTrustLevel>FullTrust</ReportBuilderTrustLevel>
> </UI>
> After:
> <UI>
> <ReportServerUrl>http://ssrs.dev.reports.com:8084/ReportServer</ReportServerUrl>
> <ReportServerVirtualDirectory></ReportServerVirtualDirectory>
> <ReportBuilderTrustLevel>FullTrust</ReportBuilderTrustLevel>
> </UI>
> The following sites runs OK.
> - http://ssrs.dev.reports.com:8084/ReportServer/ (Able to deploy reports
> to this using VS2005 designer. Currently displays the version Microsoft SQL
> Server Reporting Services Version 9.00.2047.00)
> - http://ssrs.dev.reports.com:8084/Reports/ (Displays deployed reports and
> able to browse folders)
>
> If you can help me to fix the issue, it would be of great help. Struggling
> for few days already with this issue.
> Thanks,
> Live_Love_Laugh

ReportViewer control questions

I am using report server on SQL2005. I want to embed a ReportViewer control
in an asp.net (1.1) page. I am using Visual Studio .NET. Is this possible,
or do I need to be using Visual Studio 2005?
And, once the ReportViewer control is there, what steps do I need to take in
order for the asp.net process to access report server on a different box in
the same domain? Do I need to add the Network Service account as a user in
report server?
Thanks,
RobHi Rob,
Report viewer comes with VS 2005 so you need to have the .NET 2.0 to use the
report viewer. you cannot use in asp.net 1.1.
for more FAQ see this http://www.gotreportviewer.com/
Let us know how it goes
Thanks
Bava
"Rob" wrote:
> I am using report server on SQL2005. I want to embed a ReportViewer control
> in an asp.net (1.1) page. I am using Visual Studio .NET. Is this possible,
> or do I need to be using Visual Studio 2005?
> And, once the ReportViewer control is there, what steps do I need to take in
> order for the asp.net process to access report server on a different box in
> the same domain? Do I need to add the Network Service account as a user in
> report server?
> Thanks,
> Rob

ReportViewer control Impersonate User

I need to impersonate to allow my asp.net ReportViewer control to load
reports from my SQL 2005 reporting server.
I have two ways of doing that and I was wondering which way was best
practice (or if there is any better way):
--
Method1: impersonate in in web.config
identity impersonate="true" userName="domain\username" password="password"
--
Method2: override IReportServerCredentials
...
if (!Page.IsPostBack)
rv1.ServerReport.ReportServerCredentials = new
MyReportServerCredentials();
...
[Serializable]
public sealed class MyReportServerCredentials : IReportServerCredentials
...
return new NetworkCredential(...)
(above explained excellantly in
http://msdn2.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials(VS.80).aspx)
Thank you!Hello Dev,
I suggest you use the second method. If you impersonate in the web.config
file, the whole application will effected and since you hardcode your
credential information in the web.config, it may have some security issue.
If you use the IReportCredentials and programmatically specify the
credential, it only use on the page which include the ReportViewer Control
which is more secure.
Hope this helps.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.

Wednesday, March 28, 2012

reportviewer control Error, Plz help

Hi All,
I am using reportviewer control to show some data on an asp.net page. It is working fine in the devolpment?Machine, but when I move the code over to our Production server I get a runtime error, the runtime error shows up on the webpage and simply says:

An error has occurred during report processing.
Exception has been thrown by the target of an invocation.
Object reference not set to an instance of an object.

That didn't help at all.
Any ideas?
Thanks a lot you guys have been very helpful.

SajjadNo reply yet :(|||

Hi,

Can you add a label to display the exception in detail. At lease you can get the code line where you get the error.

Perhaps the dev and the production reports may differ in parameters, etc.

Do you set the processing mode to remote?

|||Thanx for reply,

I used this code in Report web page...(no code in code behind file)

<%@. Page Language="VB" AutoEventWireup="false" CodeFile="Report_ArabicInvoice.aspx.vb" Inherits="Web_Pages_Reports_Report_ArabicInvoice" %
<%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>?ú??EXFP - Arabic Invoice</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr>
<td style="width: 100px">
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt"
Height="800px" Width="800px" ShowDocumentMapButton="False" ShowFindControls="False" ShowPromptAreaButton="False" ShowRefreshButton="False">
<LocalReport ReportPath="~\..\Web_Pages\Reports\Report_ArabicInvoice.rdlc">
<DataSources>
<rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="ReportDataSet_Report_DT_ArabicInvoice" />
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetData"
TypeName="ReportDataSetTableAdapters.Report_DT_ArabicInvoiceTableAdapter" OldValuesParameterFormatString="original_{0}">
<SelectParameters>
<asp:SessionParameter Name="ord_ID" SessionField="Report_AI_OrdID" Type="Int32" />
</SelectParameters>
</asp:ObjectDataSource>
</td>
</tr>
</table>
</div>
</form>
</body>
</html|||note : ?Process mode is set to be "LOCAL"|||no reply yet ?:(

ReportViewer control and multivalue parameter

I'm using the control on an asp.net page. The first parameter is a multi
value field which is populated by a query. How can I programaicattly select
the first value as a default? I don't see anything in ReportParameter class
that can do that.
Thanks,
GilgameshOn Sep 27, 9:00 pm, "Gilgamesh" <gilgamesh4e...@.aol.com> wrote:
> I'm using the control on an asp.net page. The first parameter is a multi
> value field which is populated by a query. How can I programaicattly select
> the first value as a default? I don't see anything in ReportParameter class
> that can do that.
> Thanks,
> Gilgamesh
You might need to create a second dataset (duplicate of the
multivalued parameter's dataset except for maybe the minimum/maximum
value) that is tied to the default value you want to use and then
select it as the default value in the Parameter settings. Hope this
helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||you can create a query which return the first value you want
and set this query result as the default value for the multivalue parameter.
"Gilgamesh" <gilgamesh4ever@.aol.com> wrote in message
news:ueSMzNXAIHA.3848@.TK2MSFTNGP05.phx.gbl...
> I'm using the control on an asp.net page. The first parameter is a multi
> value field which is populated by a query. How can I programaicattly
> select the first value as a default? I don't see anything in
> ReportParameter class that can do that.
> Thanks,
> Gilgamesh
>
>|||The problem is that this is thesecond parameter which depends on thevalue of
first parameter. The first parameter value is passed in through URL, and I
found out that the second parameter can not beinitialized when it depends on
another parameter.
-G
"Jeje" <willgart@.hotmail.com> wrote in message
news:00359520-1109-4640-8E3D-E625BD6D651C@.microsoft.com...
> you can create a query which return the first value you want
> and set this query result as the default value for the multivalue
> parameter.
>
> "Gilgamesh" <gilgamesh4ever@.aol.com> wrote in message
> news:ueSMzNXAIHA.3848@.TK2MSFTNGP05.phx.gbl...
>> I'm using the control on an asp.net page. The first parameter is a multi
>> value field which is populated by a query. How can I programaicattly
>> select the first value as a default? I don't see anything in
>> ReportParameter class that can do that.
>> Thanks,
>> Gilgamesh
>>

ReportViewer control and logins

I am using a ReportViewer control in an asp.net 2.0 application

The report being run was created in SSRS using a shared data source. When I run the report it requests username and password.

How do I get around this or pass the username and password at runtime??

Thanks

Save the credntial in your datasource and then impersonate user a user who has priviliges on the reporting server as follow

in the web.config

<identity impersonate="true" userName="Domain\username" password="Pass"/>

|||

I tried that but it wants the login info for the dabase that is in the shared data sources.

Do I do that the same?

|||

When you edit the datasource > Properties > General, click 'Credentials stored securely in the report server' and enter a username and password that has rights to your database. It will then use the login info every time the report is invoked, (if that is what I understand you are trying to do).

|||

Yeah thanks

I got it somehow it got lost. When I checked update datasource all got fixed.

ReportViewer control - load parameter

Using Reporting Services in VS.Net 2005 (very much a newbie, though not a
newbie to ASP.Net)
I have a report which runs a Stored Procedure, requiring a parameter -
BudgetID -
In this particular case I just created an ASP.Net page (content page), and I
add a reportViewer control - the wizard picks up my report and creates an
ObjectDataSource, and assigns the report, but nothing is done or asked about
the BudgetID -
I found a reference on the web (in 2004) which showed that I could do
something like this in code:
ReportViewer1.SetQueryParameter("ProductCategory",CategoryDropDown.SelectedV
alue);
So I thought I could do something like this in the page load event - but it
doesn't like the SetqueryParameter method - and searching through all the
properties and methods, I can't seem to find anything like this.
Could someone please shed some light on this for me, please?You need to create an array of
Microsoft.Reporting.WebForms.ReportParameter that holds the parameters
for your report. Then call
ReportViewer1.ServerReport.SetParameters(paramArray). Hope this helps.
Devin
Elmo Watson wrote:
> Using Reporting Services in VS.Net 2005 (very much a newbie, though not a
> newbie to ASP.Net)
> I have a report which runs a Stored Procedure, requiring a parameter -
> BudgetID -
> In this particular case I just created an ASP.Net page (content page), and I
> add a reportViewer control - the wizard picks up my report and creates an
> ObjectDataSource, and assigns the report, but nothing is done or asked about
> the BudgetID -
> I found a reference on the web (in 2004) which showed that I could do
> something like this in code:
> ReportViewer1.SetQueryParameter("ProductCategory",CategoryDropDown.SelectedV
> alue);
> So I thought I could do something like this in the page load event - but it
> doesn't like the SetqueryParameter method - and searching through all the
> properties and methods, I can't seem to find anything like this.
> Could someone please shed some light on this for me, please?|||Please excuse my newbie-ness, but can you explain how to do that?
I've created Arrays from strings before, but I've tried several things, and
it's just not working
"Devin" <dlosee@.granitelp.com> wrote in message
news:1161276979.601948.215490@.i3g2000cwc.googlegroups.com...
> You need to create an array of
> Microsoft.Reporting.WebForms.ReportParameter that holds the parameters
> for your report. Then call
> ReportViewer1.ServerReport.SetParameters(paramArray). Hope this helps.
> Devin
> Elmo Watson wrote:
> > Using Reporting Services in VS.Net 2005 (very much a newbie, though not
a
> > newbie to ASP.Net)
> > I have a report which runs a Stored Procedure, requiring a parameter -
> > BudgetID -
> >
> > In this particular case I just created an ASP.Net page (content page),
and I
> > add a reportViewer control - the wizard picks up my report and creates
an
> > ObjectDataSource, and assigns the report, but nothing is done or asked
about
> > the BudgetID -
> > I found a reference on the web (in 2004) which showed that I could do
> > something like this in code:
> >
ReportViewer1.SetQueryParameter("ProductCategory",CategoryDropDown.SelectedV
> > alue);
> >
> > So I thought I could do something like this in the page load event - but
it
> > doesn't like the SetqueryParameter method - and searching through all
the
> > properties and methods, I can't seem to find anything like this.
> >
> > Could someone please shed some light on this for me, please?
>|||No problem. Basically it's the same as other arrays. Here's what I
have:
Here are the properties for the report viewer control (these can be
changed based on preferences, but here's what I have):
<rsweb:ReportViewer
ID="ReportViewer1"
runat="server"
Height="100%"
Width="100%"
ProcessingMode="Remote"
ShowBackButton="False"
ShowDocumentMapButton="False"
ShowParameterPrompts="False"
ShowPromptAreaButton="False"
BorderColor="Black"
BorderWidth="1px" >
<ServerReport ReportServerUrl="http://SERVER_NAME/ReportServer" />
</rsweb:ReportViewer>
Here is the code for either the OnLoad of the report viewer page or the
OnClick (if you have the params and report viewer on the same form) of
the button for viewing the report:
Dim params As Microsoft.Reporting.WebForms.ReportParameter()
ReDim params(1)
params(0) = New Microsoft.Reporting.WebForms.ReportParameter(
PARAM_1_NAME, PARAM_1_VALUE)
params(1) = New Microsoft.Reporting.WebForms.ReportParameter(
PARAM_2_NAME, PARAM_2_VALUE)
With ReportViewer1.ServerReport
.ReportPath = "/REPORT_FOLDER/REPORT_NAME"
.SetParameters(params)
.Refresh()
End With
There are problems when your report server and website the report
viewer control is on are on 2 separate servers. There's something with
a double hop. I haven't looked too much into this as mine are both on
the same server. If yours are on 2 different servers, you may want to
google the double hop problem (if you are getting security errors).
If you want to get really fancy, you can use inheritance for all of
your parameter forms and then have 1 report viewer form. If that is a
direction you want to take, let me know and I'll post how I did it
(there are many ways, inheritance is just the way I chose).
Elmo Watson wrote:
> Please excuse my newbie-ness, but can you explain how to do that?
> I've created Arrays from strings before, but I've tried several things, and
> it's just not working
>
> "Devin" <dlosee@.granitelp.com> wrote in message
> news:1161276979.601948.215490@.i3g2000cwc.googlegroups.com...
> > You need to create an array of
> > Microsoft.Reporting.WebForms.ReportParameter that holds the parameters
> > for your report. Then call
> > ReportViewer1.ServerReport.SetParameters(paramArray). Hope this helps.
> >
> > Devin
> >
> > Elmo Watson wrote:
> > > Using Reporting Services in VS.Net 2005 (very much a newbie, though not
> a
> > > newbie to ASP.Net)
> > > I have a report which runs a Stored Procedure, requiring a parameter -
> > > BudgetID -
> > >
> > > In this particular case I just created an ASP.Net page (content page),
> and I
> > > add a reportViewer control - the wizard picks up my report and creates
> an
> > > ObjectDataSource, and assigns the report, but nothing is done or asked
> about
> > > the BudgetID -
> > > I found a reference on the web (in 2004) which showed that I could do
> > > something like this in code:
> > >
> ReportViewer1.SetQueryParameter("ProductCategory",CategoryDropDown.SelectedV
> > > alue);
> > >
> > > So I thought I could do something like this in the page load event - but
> it
> > > doesn't like the SetqueryParameter method - and searching through all
> the
> > > properties and methods, I can't seem to find anything like this.
> > >
> > > Could someone please shed some light on this for me, please?
> >

ReportViewer component and RS 2000

Hello,
could anybody please confirm, that the ReportViewer component (VS 2005,
ASP.NET 2.0) on a WebForm and a RS 2000 on the server side ARE NOT ABLE
TO COOPERATE?
From my IIS logs I see POSTs to "../ReportExcution2005.asmx", which is
obviously not present on a RS 2000 system.
RegardsQ: Can the ReportViewer view reports hosted on a SQL Server 2000 Report
Server?
A: No. In remote mode the ReportViewer control can only view reports hosted
on a SQL Server 2005 Report Server. Note that this has nothing to do with
where the data for the report can come from. Data for the report can come
from any source, including SQL Server 2000, Oracle, DB2 and non-database
datasources.
FAQ#5 at http://www.gotreportviewer.com
--
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
"Neil Young" <neil.young@.freenet.de> wrote in message
news:OD5xJE6HGHA.3176@.TK2MSFTNGP12.phx.gbl...
> Hello,
> could anybody please confirm, that the ReportViewer component (VS 2005,
> ASP.NET 2.0) on a WebForm and a RS 2000 on the server side ARE NOT ABLE TO
> COOPERATE?
> From my IIS logs I see POSTs to "../ReportExcution2005.asmx", which is
> obviously not present on a RS 2000 system.
> Regards
>|||Thanks Jasper. I googled for it and searched this group but couldn't
find the answer. Probably I choose the wrong question :)
Regards
Jasper Smith wrote:
> Q: Can the ReportViewer view reports hosted on a SQL Server 2000
> Report Server?
> A: No. In remote mode the ReportViewer control can only view reports
> hosted on a SQL Server 2005 Report Server. Note that this has nothing
> to do with where the data for the report can come from. Data for the
> report can come from any source, including SQL Server 2000, Oracle,
> DB2 and non-database datasources.
> FAQ#5 at http://www.gotreportviewer.com
>
> "Neil Young" <neil.young@.freenet.de> wrote in message
> news:OD5xJE6HGHA.3176@.TK2MSFTNGP12.phx.gbl...
>> Hello,
>> could anybody please confirm, that the ReportViewer component (VS
>> 2005, ASP.NET 2.0) on a WebForm and a RS 2000 on the server side ARE
>> NOT ABLE TO COOPERATE?
>> From my IIS logs I see POSTs to "../ReportExcution2005.asmx", which
>> is obviously not present on a RS 2000 system.
>> Regards