Showing posts with label click. Show all posts
Showing posts with label click. Show all posts

Friday, March 30, 2012

ReportViewer Find

I have a Local report bound to a ReportViewer control and when I am typing in text in the find text box and I click find I get this message on the report viewer "Object reference not set to an instance of an object" anybody have any idea

This is a known issue with the report viewer control. It is fixed in Visual Studio SP1. See this posting for more information:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1032267&SiteID=1

Wednesday, March 28, 2012

Reportviewer and Treeview control help needed

hello
i have been trying to use a treeview control to provide navigation for
the reports. but when i click a report in the treeview, it renders on
the whole page instead of rendering in in a table where I have the
reportviewer control. basically i am not able to connect the
reportviewer to the treeview.
any hints or ideas ?
thanks very much
raviThe ReportViewer control uses an IFrame. Modify the control to assign a
name to that IFrame (i.e. myFrame) and add LinkTarget on your BuildUrlString
method (i.e. rc:LinkTarget=myFrame).
Hope this helps.
Marlon
"RemoteDeploy" <bofobofo@.yahoo.com> wrote in message
news:1109104433.404071.71330@.f14g2000cwb.googlegroups.com...
> hello
> i have been trying to use a treeview control to provide navigation for
> the reports. but when i click a report in the treeview, it renders on
> the whole page instead of rendering in in a table where I have the
> reportviewer control. basically i am not able to connect the
> reportviewer to the treeview.
> any hints or ideas ?
> thanks very much
> ravi
>|||Marlon,
thx for the suggestion. I am very new to this .net web app development.
I checked the reportviewer code the render method which is spewing out
the tags etc.
I am not sure where do I add name for the Iframe. I presume in the
opening tag like
<iframe name = "myframe"> or sthg like that ?
Also how do i Compile this code ? when i do the normal F5 i get a
message asking me to assign a URL or project. I tried doing it and
built a new dll and removed and added the control in my project. I get
the "resource not found" error. Guess thats cos i havent attached the
name to the frame properly.
any suggestions will be very welcome.
Thanks
Ravi
Protected Overrides Sub Render(ByVal output As HtmlTextWriter)
If Me._serverUrl = String.Empty OrElse Me._reportPath =String.Empty Then
output.Write("<P style=""font-family: Verdana;
font-size: 11px"">")
output.Write("To render a report, enter the ServerUrl
and ReportPath.</P>")
Else
'Create IFrame if the user enters ServerUrl and
ReportPath
output.WriteBeginTag("iframe ")
output.WriteAttribute("src", Me.BuildUrlString())
output.WriteAttribute("width", Me.Width.ToString())
output.WriteAttribute("height", Me.Height.ToString())
output.WriteAttribute("style", "border: 1 solid
#C0C0C0")
output.WriteAttribute("border", "0")
output.WriteAttribute("frameborder", "0")
output.Write(HtmlTextWriter.TagRightChar)
output.WriteEndTag("iframe")
output.WriteLine()
End If
End Sub 'Render|||Ravi,
To assign a name, or add other attributes, to the IFrame, add the following
code in the Render method.
output.WriteAttribute("name","reportFrame");
Modify the BuildUrlString method to add:
this._url = this._serverUrl + "?" + this._reportPath +
"&rs:Command=Render&rc:LinkTarget=reportFrame" +
this.EmumProperties(this._properties);
Compile the ReportViewer.
To be sure you have the latest dll, remove the Report Viewer control, from
the tool bar, and add again. Check your references (i.e control names) on
your aspx page and in the code-behind.
Marlon
"RemoteDeploy" <bofobofo@.yahoo.com> wrote in message
news:1109183582.644609.217650@.z14g2000cwz.googlegroups.com...
> Marlon,
> thx for the suggestion. I am very new to this .net web app development.
> I checked the reportviewer code the render method which is spewing out
> the tags etc.
> I am not sure where do I add name for the Iframe. I presume in the
> opening tag like
> <iframe name = "myframe"> or sthg like that ?
> Also how do i Compile this code ? when i do the normal F5 i get a
> message asking me to assign a URL or project. I tried doing it and
> built a new dll and removed and added the control in my project. I get
> the "resource not found" error. Guess thats cos i havent attached the
> name to the frame properly.
> any suggestions will be very welcome.
> Thanks
> Ravi
> Protected Overrides Sub Render(ByVal output As HtmlTextWriter)
> If Me._serverUrl = String.Empty OrElse Me._reportPath => String.Empty Then
> output.Write("<P style=""font-family: Verdana;
> font-size: 11px"">")
> output.Write("To render a report, enter the ServerUrl
> and ReportPath.</P>")
> Else
> 'Create IFrame if the user enters ServerUrl and
> ReportPath
> output.WriteBeginTag("iframe ")
> output.WriteAttribute("src", Me.BuildUrlString())
> output.WriteAttribute("width", Me.Width.ToString())
> output.WriteAttribute("height", Me.Height.ToString())
> output.WriteAttribute("style", "border: 1 solid
> #C0C0C0")
> output.WriteAttribute("border", "0")
> output.WriteAttribute("frameborder", "0")
> output.Write(HtmlTextWriter.TagRightChar)
> output.WriteEndTag("iframe")
> output.WriteLine()
> End If
> End Sub 'Render
>|||Hello Marlon,
Thanks for the reply. I figured out how to set the name etc. (so stupid
to ask such Qs). and also to compile the dll. Basically I am stuck with
this for a while and kind of jittery.
But i still get the same problem which says Resource not found.
I am not near my work machine so cant test
but I have another small question.
How is this reportviewer supposed to be activated when I click on a
link in the Treeview Navigator. I was trying to pass the exact URL as
you mentioned to the NavigateURL attribute of the treeview. and I get
the error.
Thanks very much
Ravi|||hello marlon,
its the same thing. When I click on the report in the treeview I paint
the entire window.
Here is the link i am passin to the Treenode.navigateUrl
http://server/reportserver/default.aspx?/reportfolder/report1&rc:LinkTarget=Myframe
And that paints the entire page.
Thanks very much
Ravi

ReportViewer and Click through links

I am creating a .Net application using the ReportViewer, which is working fine.
But when I have a report that has a link to another report, upon clicking
the link it takes the new report to full screen.
What I want to happen is for the new report stay in the ReportViewer.
Any ideas?
--
Regards
<<<Bryan Avery>>Ok I just did this and it was kind of a pain. Too me all day to work it out.
1. You need to use 'Jump to URL' instead of the other options.
2. Open Report Viewer project and add the following code:
Private _linktarget As String = "_self"
<Category("HTMLViewer Commands"), Description("Sets rc:linktarget to change
iFrame target")> _
Public Property LinkTarget() As String
Get
Return Me._linktarget
End Get
Set(ByVal Value As String)
Me._linktarget = Value
Me.SetParameter("rc:LinkTarget", Value)
End Set
End Property
3. Recompile and place dll in project bin.
Now the default is _self and you have the option to change the target from
your code.
This solution isn't ideal because you have to use the jump to url which
means more work in creating the url with params, and you may have to hard
code your servername.
--
Message posted via http://www.sqlmonster.com|||Hi Patrick,
Thanks for the quick response, but I'm a little lost to where I should be
entering line 2, could you give me any more pointers please?
--
Regards
<<<Bryan Avery>>
"Patrick P via SQLMonster.com" wrote:
> Ok I just did this and it was kind of a pain. Too me all day to work it out.
> 1. You need to use 'Jump to URL' instead of the other options.
> 2. Open Report Viewer project and add the following code:
> Private _linktarget As String = "_self"
> <Category("HTMLViewer Commands"), Description("Sets rc:linktarget to change
> iFrame target")> _
> Public Property LinkTarget() As String
> Get
> Return Me._linktarget
> End Get
> Set(ByVal Value As String)
> Me._linktarget = Value
> Me.SetParameter("rc:LinkTarget", Value)
> End Set
> End Property
> 3. Recompile and place dll in project bin.
> Now the default is _self and you have the option to change the target from
> your code.
> This solution isn't ideal because you have to use the jump to url which
> means more work in creating the url with params, and you may have to hard
> code your servername.
> --
> Message posted via http://www.sqlmonster.com
>|||No problem. There are a few changes I discovered since the last post, I'll
note them the end here.
You can find the reportviewer project here:
C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\Samples\
Applications\ReportViewer\vb
Open the project and open the ReportViewer.vb class file.
in the "Private Member Variables" region add:
Private _linktarget As String = "_self"
in the "Properties" region add the property in the above thread.
Now here is the addition to the above.
in the "Render" region add the following line to the Render sub:
output.WriteAttribute("name", "ifmReport")
You need this when you call the viewer property you created. Compile and
drop in your bin/GAC.
So now in your app you will add the following line:
rvwReport.LinkTarget = "ifmReport"
rvwReport being your declared instance of the object. In this bit of code:
Protected WithEvents rvwReport As
Microsoft.Samples.ReportingServices.ReportViewer
Now the good news is that I discovered that the "Jump to Report" option
works when I do this, which is great because the "Jump to URL" was a real
pain.
I'm assuming you are a VB and not a C# person.
Hope this helps... now I'm off to post more questions.
--
Message posted via http://www.sqlmonster.com|||Good news is that it is working :-)
Bad news is, it is only working in part.
What I mean is that you can display the first report, and a click to the
next report works okay, but on the third click to the third report it goes
back to full screen :-(
--
Regards
<<<Bryan Avery>>
"Patrick P via SQLMonster.com" wrote:
> No problem. There are a few changes I discovered since the last post, I'll
> note them the end here.
> You can find the reportviewer project here:
> C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\Samples\
> Applications\ReportViewer\vb
> Open the project and open the ReportViewer.vb class file.
> in the "Private Member Variables" region add:
> Private _linktarget As String = "_self"
> in the "Properties" region add the property in the above thread.
> Now here is the addition to the above.
> in the "Render" region add the following line to the Render sub:
> output.WriteAttribute("name", "ifmReport")
> You need this when you call the viewer property you created. Compile and
> drop in your bin/GAC.
> So now in your app you will add the following line:
> rvwReport.LinkTarget = "ifmReport"
> rvwReport being your declared instance of the object. In this bit of code:
> Protected WithEvents rvwReport As
> Microsoft.Samples.ReportingServices.ReportViewer
> Now the good news is that I discovered that the "Jump to Report" option
> works when I do this, which is great because the "Jump to URL" was a real
> pain.
> I'm assuming you are a VB and not a C# person.
> Hope this helps... now I'm off to post more questions.
> --
> Message posted via http://www.sqlmonster.com
>|||I know, I'm trying to work that out now. So annoying, thought I had it solved.
Seems that when the report goes back to the server it "forgets" the target
and goes back to "_top". :-\ There has to be a config setting on the server
that we can change. So can anyone out there find it?
--
Message posted via http://www.sqlmonster.com|||Thanks for all your effort.
I was wondering if you know how we can control the tool bar that is within
the ReportViewer so we can have external controls controlling the Zoom,
Export, etc.
Is this something you've come across and is it easy to do?
--
Regards
<<<Bryan Avery>>
"Patrick P via SQLMonster.com" wrote:
> I know, I'm trying to work that out now. So annoying, thought I had it solved.
> Seems that when the report goes back to the server it "forgets" the target
> and goes back to "_top". :-\ There has to be a config setting on the server
> that we can change. So can anyone out there find it?
> --
> Message posted via http://www.sqlmonster.com
>

Tuesday, March 20, 2012

Reports in Report Manager-drilldown

When runing a report in Report Manager I can click on an item and SQL Server provides the logic to drill down into the underlying tables. I can find no button to go back. The only way I've found to go back is to click a different tab at the top of the screen (History or something) then click View again and you get the original report. In designer there's a back button. Is there not such a button when running a saved report?

Thanks.

Never mind....D'OH