Showing posts with label report. Show all posts
Showing posts with label report. Show all posts

Wednesday, March 28, 2012

opening reports with toggleitems set according to user defaults

i'm new to RS and have created reports with jump to url capability. the main
report has drill down capability up to 4 levels. i would like to know if it
is possible to open the report and have the toggleitems collapsed or expanded
(showing the next level if expanded) based on pre-defined choices. some
users might want drill-down expanded all the way to level 4 for some
groupings while only to level 2 on other groupings. for example, we create
financial reports that show monthly balances for staff salaries, fringe
costs, supplies, etc. a manager might want to see much detail on the staff
salaries and drill down another 2 levels to actually see staff names while
only want to see the highest level for fringe and not be concerned about how
much was paid for social security, retirement, etc..
rather than require the user each time to expand or collapse as they want
each time they run report, is there some way to save their choices to a table
and then through a query obtain their choices and set the toggleitem property
for each row based on its value.
i have found many examples of setting properties based on "value" property
but not other properties. i suspect that if it can be done, the "inscope"
function would be used. hope this makes sense!
any help you can give would be appreciated. thanksi think i found the answer to my question. RS doesn't appear to support
events and only exposes one reportitems property and that is "value". so i'm
guessing that what i'm asking is probably not possible within RS itself.
"dalem" wrote:
> i'm new to RS and have created reports with jump to url capability. the main
> report has drill down capability up to 4 levels. i would like to know if it
> is possible to open the report and have the toggleitems collapsed or expanded
> (showing the next level if expanded) based on pre-defined choices. some
> users might want drill-down expanded all the way to level 4 for some
> groupings while only to level 2 on other groupings. for example, we create
> financial reports that show monthly balances for staff salaries, fringe
> costs, supplies, etc. a manager might want to see much detail on the staff
> salaries and drill down another 2 levels to actually see staff names while
> only want to see the highest level for fringe and not be concerned about how
> much was paid for social security, retirement, etc..
> rather than require the user each time to expand or collapse as they want
> each time they run report, is there some way to save their choices to a table
> and then through a query obtain their choices and set the toggleitem property
> for each row based on its value.
> i have found many examples of setting properties based on "value" property
> but not other properties. i suspect that if it can be done, the "inscope"
> function would be used. hope this makes sense!
> any help you can give would be appreciated. thanks

Monday, March 26, 2012

Opening report takes too long

Hi,

I've created reports using CR v10 Professional developer SP2 and all the latest hotfixes. The reports run fine in most environments except on one computer (XP SP2), where opening some of the reports takes several minutes (normally in a blink of the eye). The problem is that the computer is our report server. The reports reside locally on the computer and database connections etc. work fine. There does not seem to be any logic as to which reports work and which don't.

The problem seems to reside in the .rpt file since opening the problem reports using both the developer and a run time engine take evenly long. We've managed to isolalte the problem to the file opening porcess, before setting any parameter values or database connections logging the runtime engine.

The only work around seems to be rebuilding the reports on the computer creating our concerns. Does anyone know the cause or have a fix?

Thanks in advance,
JukkaMay be virus?
Run Anti Virus and see the performance|||you may try with dao connection taht whold slove your problem

Opening Report Server 2005 web site with VS 2005

I'm getting the "Report Server has not been congured for use with ASP.NET
2.0" when I open the report server web site using VS 2005. This is on
Windows 2003 and the SSRS 2005. Any idea how I can resolve this?
Thanks,
GilgameshWhat do you mean by this? You don't open up a report server web site in VS.
There is no way to do that. Do you mean you open up a project that has
reports? Or that you try to deploy to the server. You never directly touch
RS website. You install it, you deploy to it. You open up the portal. But
you never open up in VS.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Gilgamesh" <gilgamesh4ever@.aol.com> wrote in message
news:OEtDx9P4HHA.4712@.TK2MSFTNGP04.phx.gbl...
> I'm getting the "Report Server has not been congured for use with ASP.NET
> 2.0" when I open the report server web site using VS 2005. This is on
> Windows 2003 and the SSRS 2005. Any idea how I can resolve this?
> Thanks,
> Gilgamesh
>|||Well, report server is an asp.net applciation, and I was able to open the
web site using VS 2005. I'm working on the security extension which reuires
making changes to the logon.aspx page, and also I would need to create a new
aspx page and add the report viewer to it. The problem is that I can't even
open the site successuly.
-G
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:ewScpJQ4HHA.4476@.TK2MSFTNGP06.phx.gbl...
> What do you mean by this? You don't open up a report server web site in
> VS. There is no way to do that. Do you mean you open up a project that has
> reports? Or that you try to deploy to the server. You never directly touch
> RS website. You install it, you deploy to it. You open up the portal. But
> you never open up in VS.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Gilgamesh" <gilgamesh4ever@.aol.com> wrote in message
> news:OEtDx9P4HHA.4712@.TK2MSFTNGP04.phx.gbl...
>> I'm getting the "Report Server has not been congured for use with ASP.NET
>> 2.0" when I open the report server web site using VS 2005. This is on
>> Windows 2003 and the SSRS 2005. Any idea how I can resolve this?
>> Thanks,
>> Gilgamesh
>|||I have not implemented forms security (which is what I assume you are doing)
but reading up on it, it does not seem to me you are modifying anything
other than config files for RS. Yes RS is an asp.net application but I am
pretty sure that you do not modify it directly. You create your own asp.net
application that has your logon form and you modify config files with RS
2005.
Now on the off chance I am completely wrong about this and the reality is
that you do have to do as you are suggesting, are you sure this is RS 2005?
RS 2000 is a 1.1 framework application rather than a 2.0 framework app like
RS 2005.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Gilgamesh" <gilgamesh4ever@.aol.com> wrote in message
news:OjzehOQ4HHA.3684@.TK2MSFTNGP02.phx.gbl...
> Well, report server is an asp.net applciation, and I was able to open the
> web site using VS 2005. I'm working on the security extension which
> reuires making changes to the logon.aspx page, and also I would need to
> create a new aspx page and add the report viewer to it. The problem is
> that I can't even open the site successuly.
> -G
>
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:ewScpJQ4HHA.4476@.TK2MSFTNGP06.phx.gbl...
>> What do you mean by this? You don't open up a report server web site in
>> VS. There is no way to do that. Do you mean you open up a project that
>> has reports? Or that you try to deploy to the server. You never directly
>> touch RS website. You install it, you deploy to it. You open up the
>> portal. But you never open up in VS.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Gilgamesh" <gilgamesh4ever@.aol.com> wrote in message
>> news:OEtDx9P4HHA.4712@.TK2MSFTNGP04.phx.gbl...
>> I'm getting the "Report Server has not been congured for use with
>> ASP.NET 2.0" when I open the report server web site using VS 2005. This
>> is on Windows 2003 and the SSRS 2005. Any idea how I can resolve this?
>> Thanks,
>> Gilgamesh
>>
>

Opening report in new window

I have a problem when opening a sql 2000 report in a new window. As
soon as the the report is opened, asp.net post-backs will fail.
This is what I do:
window.open('http//:[ip address]/reportserver?/ReportFolder/
ReportName')
As soon as I do that, asp.net post-backs on the opener will 'do
nothing'.
strange thing is that if I open the report using the name of the
server rather than ip address, it works fine
window.open('http//:[server name]/reportserver?/ReportFolder/
ReportName')
it also works fine on a development machine using 'localhost'.
The behavior I describe happens when the application is deployed to a
production server. Our customer must use the ip address of the server
for various reasons.
I've tried using a relative url ('../../reportserver?...') and i get
the same behaviour.
Any ideas?Have you tried using Globals!ReportServerUrl
"ruben@.lindenservices.com" wrote:
> I have a problem when opening a sql 2000 report in a new window. As
> soon as the the report is opened, asp.net post-backs will fail.
> This is what I do:
> window.open('http//:[ip address]/reportserver?/ReportFolder/
> ReportName')
> As soon as I do that, asp.net post-backs on the opener will 'do
> nothing'.
> strange thing is that if I open the report using the name of the
> server rather than ip address, it works fine
> window.open('http//:[server name]/reportserver?/ReportFolder/
> ReportName')
> it also works fine on a development machine using 'localhost'.
> The behavior I describe happens when the application is deployed to a
> production server. Our customer must use the ip address of the server
> for various reasons.
> I've tried using a relative url ('../../reportserver?...') and i get
> the same behaviour.
> Any ideas?
>sql

Opening hyperlink Url in new window

Hello,

I have areport with a text box. The text box is hyperlinked to another report url. The report opens in a new page when previewed with RS 2005 but when deployed the report opens in teh same page from where it is referenced.

How can I set a property with the texbox to always open in a new page the hyperlinked report.

Thanks in advance

'Kiran.

I'm not going to be any help... I have the same question. The report itself uses XML to generate not html so it is not a matter of setting target = '_blank'. That's about as far as I've gotten. Any help with this would be appreciated by me as well.

Thanks

Opening a rs2005 rdl in rs2000

Can a report created in VS2005 be opened in VS2003?
No, the schema is not compatible.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de

Opening a rs2005 rdl in rs2000

Can a report created in VS2005 be opened in VS2003?No, the schema is not compatible.
HTH, Jens K. Suessmeyer.
--
http://www.sqlserver2005.de
--

Opening a rs2005 rdl in rs2000

Can a report created in VS2005 be opened in VS2003?No, the schema is not compatible.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
--sql

Opening a Report from a VB Application

Hi All,
I have a VB Application that lists all the reports on my report server in a
treeview control. Now all i need to do is open a report when it is clicked
on in my app.. What is the VB code to do this?
Thanks
SanjeevUse a browser control on your VB form. You can add this from the file
c:\windows\system32\shdocvw.dll. Read the report path from the treeview
control when a user selects an item to view, then use URL access to display
the report in the browser control as follows:
AxWebBrowser1.Navigate("http://MyReportServer/ReportServer?" & reportPath)
AxWebBrowser1 is the default name of the browser control when you place it
on the form.
There are lots of examples in Books Online. Look up the topic "Using URL
Acces from a Windows application".
HTH
Charles Kangai, MCT, MCDBA
"Sanjeev" wrote:
> Hi All,
> I have a VB Application that lists all the reports on my report server in a
> treeview control. Now all i need to do is open a report when it is clicked
> on in my app.. What is the VB code to do this?
> Thanks
> Sanjeev
>
>|||I am not entirely sure on how to add the browser control.
What i did was add shdocvw.dll as a reference to my to my windows
application.
Then I added "Imports SHDocVw" to the code.
But the Browser Control didnt appear in my ToolBox.
I suppose that this was the wrong way to go about it.
Sorry to trouble you again but what is the riht way to go about this.
Thanks in advance
Sanjeev
"Charles Kangai" <CharlesKangai@.discussions.microsoft.com> wrote in message
news:C42CA3EB-A91F-4F5A-A0A6-1BE59DE35999@.microsoft.com...
> Use a browser control on your VB form. You can add this from the file
> c:\windows\system32\shdocvw.dll. Read the report path from the treeview
> control when a user selects an item to view, then use URL access to
> display
> the report in the browser control as follows:
> AxWebBrowser1.Navigate("http://MyReportServer/ReportServer?" & reportPath)
> AxWebBrowser1 is the default name of the browser control when you place it
> on the form.
> There are lots of examples in Books Online. Look up the topic "Using URL
> Acces from a Windows application".
> HTH
> Charles Kangai, MCT, MCDBA
> "Sanjeev" wrote:
>> Hi All,
>> I have a VB Application that lists all the reports on my report server in
>> a
>> treeview control. Now all i need to do is open a report when it is
>> clicked
>> on in my app.. What is the VB code to do this?
>> Thanks
>> Sanjeev
>>|||In Visual Studio go to Tools, Add/Remove Toolbox Items.. Click on COM
Components tab, then find Microsoft Web Browser. Check the checkbox then OK.
HTH
Charles Kangai, MCT, MCDBA
"Sanjeev" wrote:
> I am not entirely sure on how to add the browser control.
> What i did was add shdocvw.dll as a reference to my to my windows
> application.
> Then I added "Imports SHDocVw" to the code.
> But the Browser Control didnt appear in my ToolBox.
> I suppose that this was the wrong way to go about it.
> Sorry to trouble you again but what is the riht way to go about this.
> Thanks in advance
> Sanjeev
>
>
> "Charles Kangai" <CharlesKangai@.discussions.microsoft.com> wrote in message
> news:C42CA3EB-A91F-4F5A-A0A6-1BE59DE35999@.microsoft.com...
> > Use a browser control on your VB form. You can add this from the file
> > c:\windows\system32\shdocvw.dll. Read the report path from the treeview
> > control when a user selects an item to view, then use URL access to
> > display
> > the report in the browser control as follows:
> >
> > AxWebBrowser1.Navigate("http://MyReportServer/ReportServer?" & reportPath)
> >
> > AxWebBrowser1 is the default name of the browser control when you place it
> > on the form.
> >
> > There are lots of examples in Books Online. Look up the topic "Using URL
> > Acces from a Windows application".
> >
> > HTH
> >
> > Charles Kangai, MCT, MCDBA
> >
> > "Sanjeev" wrote:
> >
> >> Hi All,
> >>
> >> I have a VB Application that lists all the reports on my report server in
> >> a
> >> treeview control. Now all i need to do is open a report when it is
> >> clicked
> >> on in my app.. What is the VB code to do this?
> >>
> >> Thanks
> >> Sanjeev
> >>
> >>
> >>
>
>|||Yip . that sure did the trick.
Appreciate all your help.
"Charles Kangai" <CharlesKangai@.discussions.microsoft.com> wrote in message
news:6138AE51-7E0C-487F-96B7-6A5A849EFF4D@.microsoft.com...
> In Visual Studio go to Tools, Add/Remove Toolbox Items.. Click on COM
> Components tab, then find Microsoft Web Browser. Check the checkbox then
> OK.
> HTH
> Charles Kangai, MCT, MCDBA
> "Sanjeev" wrote:
>> I am not entirely sure on how to add the browser control.
>> What i did was add shdocvw.dll as a reference to my to my windows
>> application.
>> Then I added "Imports SHDocVw" to the code.
>> But the Browser Control didnt appear in my ToolBox.
>> I suppose that this was the wrong way to go about it.
>> Sorry to trouble you again but what is the riht way to go about this.
>> Thanks in advance
>> Sanjeev
>>
>>
>> "Charles Kangai" <CharlesKangai@.discussions.microsoft.com> wrote in
>> message
>> news:C42CA3EB-A91F-4F5A-A0A6-1BE59DE35999@.microsoft.com...
>> > Use a browser control on your VB form. You can add this from the file
>> > c:\windows\system32\shdocvw.dll. Read the report path from the treeview
>> > control when a user selects an item to view, then use URL access to
>> > display
>> > the report in the browser control as follows:
>> >
>> > AxWebBrowser1.Navigate("http://MyReportServer/ReportServer?" &
>> > reportPath)
>> >
>> > AxWebBrowser1 is the default name of the browser control when you place
>> > it
>> > on the form.
>> >
>> > There are lots of examples in Books Online. Look up the topic "Using
>> > URL
>> > Acces from a Windows application".
>> >
>> > HTH
>> >
>> > Charles Kangai, MCT, MCDBA
>> >
>> > "Sanjeev" wrote:
>> >
>> >> Hi All,
>> >>
>> >> I have a VB Application that lists all the reports on my report server
>> >> in
>> >> a
>> >> treeview control. Now all i need to do is open a report when it is
>> >> clicked
>> >> on in my app.. What is the VB code to do this?
>> >>
>> >> Thanks
>> >> Sanjeev
>> >>
>> >>
>> >>
>>

Opening a PDF report without the OPEN/Save Dialog

Is there a way to render the PDF report in the same broswer window you just called it from without the Open/Save dialog box coming up. The report is being call directly by URL parameters for PDF formatNo there is not. We set the Content-Type to attachment which causes IE to prompt for this.|||

This is quite easy with custom programming, I've made a new webapp and gave the aspnet-user full access to reporting services, maybe you could add a cutom file to the Reports-Webapp..

I've default.aspx:

<%@. Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%
Dim pdfloader As New PDFLoader(Request, Response)
pdfloader.show()
%>

and default.aspx.vb:

Public Class PDFLoader

Private request As System.Web.HttpRequest
Private response As System.Web.HttpResponse

Public Sub New(ByVal request As System.Web.HttpRequest, ByVal response As System.Web.HttpResponse)
Me.request = request
Me.response = response
End Sub

Public Sub show()
Dim rsExec As New ReportExecutionService
rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials

' Prepare Render arguments
Dim historyID As String = Nothing
Dim deviceInfo As String = Nothing
Dim format As String = "PDF"
Dim showHide As String = Nothing
Dim results() As [Byte]
Dim warnings As RepExServ.Warning() = Nothing
Dim streamIDs As String() = Nothing
Dim encoding As String = String.Empty
Dim mimeType As String = String.Empty
Dim reportName As String


Dim zaehl As Integer = -1
Dim names(), name, values(), value As String
Dim ParameterValues() As RepExServ.ParameterValue
ParameterValues = New RepExServ.ParameterValue(0) {}

names = request.QueryString.AllKeys
For Each name In names
values = request.QueryString.GetValues(name)
For Each value In values
If (name = "") Then
reportName = value
Else
zaehl = zaehl + 1
If zaehl >= ParameterValues.Length Then
ReDim Preserve ParameterValues(zaehl)
End If
Dim ParameterValue As RepExServ.ParameterValue = New RepExServ.ParameterValue
ParameterValue.Name = name
ParameterValue.Value = value
ParameterValue.Label = Nothing
ParameterValues(zaehl) = ParameterValue
End If

Next

Next

Dim ei As ExecutionInfo = rsExec.LoadReport(reportName, historyID)
If zaehl > -1 Then
rsExec.SetExecutionParameters(ParameterValues, "")
End If

'Exectute the report and send it to the Client
results = rsExec.Render(format, deviceInfo, "", encoding, mimeType, warnings, streamIDs)
response.ContentType = "application/pdf"
response.BinaryWrite(results)

End Sub
End Class


Partial Class _Default
Inherits System.Web.UI.Page

End Class

This works just similar to the usual URL-Access method, but you can't specify any "rs:" - Parameters.. sampe call:

http://yourserver/YourWebApp/default.aspx?/RepPath/Repname&Parameter1=something

okay, I forgot something: you have to add WebReferences to you webapp:
http://msdn2.microsoft.com/en-us/library/ms154699(SQL.90).aspx

|||Yes, you can always add your own web app to do this. I was stating that RS does not allow you to change this behavior using either URL access or Report Manager|||You can do this with the ReportViewer control, using the ExportContentDisposition property.|||

I also would like to open my report in PDF format without opening the Open/Save Dialog box.

I read that the ExportContentDisposition is indeed the property to use.

Is there a way to put this property in the URL when calling the report? Or do I have to use the ReportViewer Control? I am using SQL Server Reporting with ASP, not ASP.net

Thx

|||

You can always mimic the approach given above of hainvg a custom page that does the export, just recode it in ASP, rather than ASP.NET.

Hope that helps,

-Lukasz

|||

I have just tried creating the web app posted by BenniG and it works great on my computer but when I try from any of my co-workers computers i get a scripting error stating invalid character on line 2 character 1.

I know this is pretty vague but then again so is the error.

Any thoughts?

Opening a PDF report without the OPEN/Save Dialog

Is there a way to render the PDF report in the same broswer window you just called it from without the Open/Save dialog box coming up. The report is being call directly by URL parameters for PDF formatNo there is not. We set the Content-Type to attachment which causes IE to prompt for this.|||

This is quite easy with custom programming, I've made a new webapp and gave the aspnet-user full access to reporting services, maybe you could add a cutom file to the Reports-Webapp..

I've default.aspx:

<%@. Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%
Dim pdfloader As New PDFLoader(Request, Response)
pdfloader.show()
%>

and default.aspx.vb:

Public Class PDFLoader

Private request As System.Web.HttpRequest
Private response As System.Web.HttpResponse

Public Sub New(ByVal request As System.Web.HttpRequest, ByVal response As System.Web.HttpResponse)
Me.request = request
Me.response = response
End Sub

Public Sub show()
Dim rsExec As New ReportExecutionService
rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials

' Prepare Render arguments
Dim historyID As String = Nothing
Dim deviceInfo As String = Nothing
Dim format As String = "PDF"
Dim showHide As String = Nothing
Dim results() As [Byte]
Dim warnings As RepExServ.Warning() = Nothing
Dim streamIDs As String() = Nothing
Dim encoding As String = String.Empty
Dim mimeType As String = String.Empty
Dim reportName As String


Dim zaehl As Integer = -1
Dim names(), name, values(), value As String
Dim ParameterValues() As RepExServ.ParameterValue
ParameterValues = New RepExServ.ParameterValue(0) {}

names = request.QueryString.AllKeys
For Each name In names
values = request.QueryString.GetValues(name)
For Each value In values
If (name = "") Then
reportName = value
Else
zaehl = zaehl + 1
If zaehl >= ParameterValues.Length Then
ReDim Preserve ParameterValues(zaehl)
End If
Dim ParameterValue As RepExServ.ParameterValue = New RepExServ.ParameterValue
ParameterValue.Name = name
ParameterValue.Value = value
ParameterValue.Label = Nothing
ParameterValues(zaehl) = ParameterValue
End If

Next

Next

Dim ei As ExecutionInfo = rsExec.LoadReport(reportName, historyID)
If zaehl > -1 Then
rsExec.SetExecutionParameters(ParameterValues, "")
End If

'Exectute the report and send it to the Client
results = rsExec.Render(format, deviceInfo, "", encoding, mimeType, warnings, streamIDs)
response.ContentType = "application/pdf"
response.BinaryWrite(results)

End Sub
End Class


Partial Class _Default
Inherits System.Web.UI.Page

End Class

This works just similar to the usual URL-Access method, but you can't specify any "rs:" - Parameters.. sampe call:

http://yourserver/YourWebApp/default.aspx?/RepPath/Repname&Parameter1=something

okay, I forgot something: you have to add WebReferences to you webapp:
http://msdn2.microsoft.com/en-us/library/ms154699(SQL.90).aspx

|||Yes, you can always add your own web app to do this. I was stating that RS does not allow you to change this behavior using either URL access or Report Manager|||You can do this with the ReportViewer control, using the ExportContentDisposition property.|||

I also would like to open my report in PDF format without opening the Open/Save Dialog box.

I read that the ExportContentDisposition is indeed the property to use.

Is there a way to put this property in the URL when calling the report? Or do I have to use the ReportViewer Control? I am using SQL Server Reporting with ASP, not ASP.net

Thx

|||

You can always mimic the approach given above of hainvg a custom page that does the export, just recode it in ASP, rather than ASP.NET.

Hope that helps,

-Lukasz

|||

I have just tried creating the web app posted by BenniG and it works great on my computer but when I try from any of my co-workers computers i get a scripting error stating invalid character on line 2 character 1.

I know this is pretty vague but then again so is the error.

Any thoughts?

Opening a PDF report without the OPEN/Save Dialog

Is there a way to render the PDF report in the same broswer window you just called it from without the Open/Save dialog box coming up. The report is being call directly by URL parameters for PDF formatNo there is not. We set the Content-Type to attachment which causes IE to prompt for this.|||

This is quite easy with custom programming, I've made a new webapp and gave the aspnet-user full access to reporting services, maybe you could add a cutom file to the Reports-Webapp..

I've default.aspx:

<%@. Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%
Dim pdfloader As New PDFLoader(Request, Response)
pdfloader.show()
%>

and default.aspx.vb:

Public Class PDFLoader

Private request As System.Web.HttpRequest
Private response As System.Web.HttpResponse

Public Sub New(ByVal request As System.Web.HttpRequest, ByVal response As System.Web.HttpResponse)
Me.request = request
Me.response = response
End Sub

Public Sub show()
Dim rsExec As New ReportExecutionService
rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials

' Prepare Render arguments
Dim historyID As String = Nothing
Dim deviceInfo As String = Nothing
Dim format As String = "PDF"
Dim showHide As String = Nothing
Dim results() As [Byte]
Dim warnings As RepExServ.Warning() = Nothing
Dim streamIDs As String() = Nothing
Dim encoding As String = String.Empty
Dim mimeType As String = String.Empty
Dim reportName As String


Dim zaehl As Integer = -1
Dim names(), name, values(), value As String
Dim ParameterValues() As RepExServ.ParameterValue
ParameterValues = New RepExServ.ParameterValue(0) {}

names = request.QueryString.AllKeys
For Each name In names
values = request.QueryString.GetValues(name)
For Each value In values
If (name = "") Then
reportName = value
Else
zaehl = zaehl + 1
If zaehl >= ParameterValues.Length Then
ReDim Preserve ParameterValues(zaehl)
End If
Dim ParameterValue As RepExServ.ParameterValue = New RepExServ.ParameterValue
ParameterValue.Name = name
ParameterValue.Value = value
ParameterValue.Label = Nothing
ParameterValues(zaehl) = ParameterValue
End If

Next

Next

Dim ei As ExecutionInfo = rsExec.LoadReport(reportName, historyID)
If zaehl > -1 Then
rsExec.SetExecutionParameters(ParameterValues, "")
End If

'Exectute the report and send it to the Client
results = rsExec.Render(format, deviceInfo, "", encoding, mimeType, warnings, streamIDs)
response.ContentType = "application/pdf"
response.BinaryWrite(results)

End Sub
End Class


Partial Class _Default
Inherits System.Web.UI.Page

End Class

This works just similar to the usual URL-Access method, but you can't specify any "rs:" - Parameters.. sampe call:

http://yourserver/YourWebApp/default.aspx?/RepPath/Repname&Parameter1=something

okay, I forgot something: you have to add WebReferences to you webapp:
http://msdn2.microsoft.com/en-us/library/ms154699(SQL.90).aspx

|||Yes, you can always add your own web app to do this. I was stating that RS does not allow you to change this behavior using either URL access or Report Manager|||You can do this with the ReportViewer control, using the ExportContentDisposition property.|||

I also would like to open my report in PDF format without opening the Open/Save Dialog box.

I read that the ExportContentDisposition is indeed the property to use.

Is there a way to put this property in the URL when calling the report? Or do I have to use the ReportViewer Control? I am using SQL Server Reporting with ASP, not ASP.net

Thx

|||

You can always mimic the approach given above of hainvg a custom page that does the export, just recode it in ASP, rather than ASP.NET.

Hope that helps,

-Lukasz

|||

I have just tried creating the web app posted by BenniG and it works great on my computer but when I try from any of my co-workers computers i get a scripting error stating invalid character on line 2 character 1.

I know this is pretty vague but then again so is the error.

Any thoughts?

Opening a new window on clicking a hyperlink

Hi,

We are opening a Crystal Enterprise report in a browser. The report is opened in a .pdf format. We need to make some texts/images appear as hyperlinks. We did so by formatting the concerned objects in the Crystal Reports Designer and specifying the website address. But on clicking the text/image, the website is being opened in the same window. What can we do so that the website gets opened in a new window? Please Help!
We are using Crystal Reports 10.

Thanks,
ManishHi,

Let me rephrase the problem again after some observations.
We have found out that the hyperlink in thus generated pdf file is indeed opening in a new window. But when this pdf file is displayed inside a frame, clicking on the hyperlink is opening in the same window/frame. Please Help.

Regards,
Manishsql

Opening a Link in a new window.

Hi

I'm would to link from a report to a second report, I would like the second report to open a new window.

I can open the new window with the samples I found in the Forum (javscript windo open'www.microsoft.com','_Blank'), when I try using the actual report and parameters

it does not work, here is what I code in the link (fx)

=void(window.open('Globals!ReportServerUrl'?/Dirxx/Report1&JParmname=" & Fields!LinkID.Value & ,'_blank',toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbar=yes,resizable=yes,copyhistory=no))"

Any suggestion?

Thank you in advance.

Trentino

Hi,

I need to do exactly what you mention in your question. I wonder if you found a solution.

="javascrippt:void(window.open('

(misspelled purposely)

First(Fields!linked_files_dir.Value, "DataSet1") + "\Crude\Crude Products.pdf"

','_blank'))"

Thank you.

|||

Hi,

Try this expression in "Jump to URL Section" ->

the targeted report should be in the same folder (Globals!ReportFolder)

=window.open('" & Globals!ReportServerUrl & "?" & Globals!ReportFolder & "/" & "myreport" & "&amp;rs:Command=Render&amp;rc:toolbar=true','','width=800,height=600,left=10,top=10,resizable=1,menubar=no,location=no,status=no'),_top"

Regards

Ayzan

|||

Thank you.

I saw your posting on a different thread but my linked documents are on a different location. Changing strategies, I am trying to open the first document on a new window (from a login.aspx page). I don't see an option with rs.render.

Regards,

Dario

Opening a Link in a new window.

Hi

I'm would to link from a report to a second report, I would like the second report to open a new window.

I can open the new window with the samples I found in the Forum (javscript windo open'www.microsoft.com','_Blank'), when I try using the actual report and parameters

it does not work, here is what I code in the link (fx)

=void(window.open('Globals!ReportServerUrl'?/Dirxx/Report1&JParmname=" & Fields!LinkID.Value & ,'_blank',toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbar=yes,resizable=yes,copyhistory=no))"

Any suggestion?

Thank you in advance.

Trentino

Hi,

I need to do exactly what you mention in your question. I wonder if you found a solution.

="javascrippt:void(window.open('

(misspelled purposely)

First(Fields!linked_files_dir.Value, "DataSet1") + "\Crude\Crude Products.pdf"

','_blank'))"

Thank you.

|||

Hi,

Try this expression in "Jump to URL Section" ->

the targeted report should be in the same folder (Globals!ReportFolder)

=window.open('" & Globals!ReportServerUrl & "?" & Globals!ReportFolder & "/" & "myreport" & "&amp;rs:Command=Render&amp;rc:toolbar=true','','width=800,height=600,left=10,top=10,resizable=1,menubar=no,location=no,status=no'),_top"

Regards

Ayzan

|||

Thank you.

I saw your posting on a different thread but my linked documents are on a different location. Changing strategies, I am trying to open the first document on a new window (from a login.aspx page). I don't see an option with rs.render.

Regards,

Dario

Opening a hyperlink in new window

Hi All,
I have a hyperlink on my report. The target report opens in the same browser window. I want the target report to open in new instance of the browser.

Any clues as to how to do this?

Thanks in advance

Nikhil Dabke

I'm having the same problem. Would LOVE a little help on this!!

Thanks!
Joanie

|||You could try a this URL for the action (remove the spaces):

j a v a s c r i p t:if(window.open(yourPage.aspx','RsWindow','width=400,height=500,l­ocation=0,menubar=0,status=0,toolbar=0,scrollbars=1',true)){}

Opening a hyperlink in new window

Hi All,
I have a hyperlink on my report. The target report opens in the same browser window. I want the target report to open in new instance of the browser.

Any clues as to how to do this?

Thanks in advance

Nikhil Dabke

I'm having the same problem. Would LOVE a little help on this!!

Thanks!
Joanie

|||You could try a this URL for the action (remove the spaces):

j a v a s c r i p t:if(window.open(yourPage.aspx','RsWindow','width=400,height=500,l­ocation=0,menubar=0,status=0,toolbar=0,scrollbars=1',true)){}|||Hi,

The work around that I found for this is:

The URL that you provide under the Navigation -> Jump To Url must be replaced by :

="javascript:void(window.open('URL','_blank'))"

This worked for me fine after deploying my report to the Report Server.

Thanks,
Praveensql

Friday, March 23, 2012

Open webservice stream in a new child window

Hi,
I've tried to get this to work, and I can't!
I have no problem generating the report, but its opening in my main window.
I want it to open in a new window.
I have a Pushbutton (asp.net) which calls the RS webservice to render the
report, but how can I get the thing to open in a new window?
Any help appreciated.
PaulSolved by using an aspx that just returned the stream and calling via js
window.open on the parent.
On Tue, 21 Jun 2005 09:40:11 +0100, Paul Buxton wrote:
> Hi,
> I've tried to get this to work, and I can't!
> I have no problem generating the report, but its opening in my main window.
> I want it to open in a new window.
> I have a Pushbutton (asp.net) which calls the RS webservice to render the
> report, but how can I get the thing to open in a new window?
> Any help appreciated.
> Paul|||Could you provide an example of this, I too have been attempting this with no
luck.
Thanks,
Kel
"Paul Buxton" wrote:
> Solved by using an aspx that just returned the stream and calling via js
> window.open on the parent.
>
> On Tue, 21 Jun 2005 09:40:11 +0100, Paul Buxton wrote:
> > Hi,
> >
> > I've tried to get this to work, and I can't!
> >
> > I have no problem generating the report, but its opening in my main window.
> > I want it to open in a new window.
> >
> > I have a Pushbutton (asp.net) which calls the RS webservice to render the
> > report, but how can I get the thing to open in a new window?
> >
> > Any help appreciated.
> >
> > Paul
>|||Oh, and is there a way to do this without creating a file, just redisplaying
the data in a new window.
"Paul Buxton" wrote:
> Solved by using an aspx that just returned the stream and calling via js
> window.open on the parent.
>
> On Tue, 21 Jun 2005 09:40:11 +0100, Paul Buxton wrote:
> > Hi,
> >
> > I've tried to get this to work, and I can't!
> >
> > I have no problem generating the report, but its opening in my main window.
> > I want it to open in a new window.
> >
> > I have a Pushbutton (asp.net) which calls the RS webservice to render the
> > report, but how can I get the thing to open in a new window?
> >
> > Any help appreciated.
> >
> > Paul
>

Open URL in new page from a frame

Hi, i have a problem:
- I need to open a report in a new page, from a report contained in a
iFrame of a aspx page
I tried a javascript window.open command in the "jump to URL" property.
But:
- If i run the report in Explorer, i click and the report is correctly
open in a new page
- If i run the report in the iFrame of the aspx page, i click but the
report is wrongly open in the same page
I tried a lot but i can't see the right way. I really need help.
P.S. Sorry for my bad English LanguageHere is an example of a Jump to URL link I use. This causes Excel to come up
with the data in a separate window:
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
"&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
If you don't want to have it appear in a new window then do this in jump to
URL:
=Globals!ReportServerUrl & "?/SomeFolder/SomeReport&ParamName=" &
Parameters!ParamName.Value & "&rs:Format=CSV&rc:Encoding=ASCII"
This capability was introduced with RS2000 SP1
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Boa" <mugnaboa@.gmail.com> wrote in message
news:1156498995.499936.169520@.h48g2000cwc.googlegroups.com...
> Hi, i have a problem:
> - I need to open a report in a new page, from a report contained in a
> iFrame of a aspx page
> I tried a javascript window.open command in the "jump to URL" property.
> But:
> - If i run the report in Explorer, i click and the report is correctly
> open in a new page
> - If i run the report in the iFrame of the aspx page, i click but the
> report is wrongly open in the same page
> I tried a lot but i can't see the right way. I really need help.
> P.S. Sorry for my bad English Language
>|||I tried a lot of solutions, serious end crazy solutions, but i'm always
in the same situation: i can't open a link in a new page if ny report
is in a iFrame.
[URL=http://img177.imageshack.us/my.php?image=tabellatentativinf4.jpg][IMG]http://img177.imageshack.us/img177/4769/tabellatentativinf4.th.jpg[/IMG][/URL]
In the image u can see my attempts, in the Explorer Column i explain
the result if i run the report directly in the explorer's page, in the
iFrame Column i explain the result if i run the report in my
application. I need to find a "new page" in the iFrame column.
Any idea?|||Bruce ... i need your help!|||Sorry, I don't know why it isn't working. I haven't done what you are trying
to do.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Boa" <mugnaboa@.gmail.com> wrote in message
news:1157640447.600521.206140@.b28g2000cwb.googlegroups.com...
> Bruce ... i need your help!
>

Open URL in New Browser

My report has a table that when I click on a cell it jumps to URL and open
it in the same browser window. How to open the URL in a new browser instead
of current browser window?
Thanks.You didn't ask about Excel but this response of mine to another post will
answer you question:
Depending on how you design your reports you can do the following to export
to Excel. Or, what I do sometimes is make a copy of the report and clean it
up for data export and then hide it in list view. If you export from Report
Manager it puts CSV data in unicode which Excel puts all in one column. If
you export in ASCII then Excel does just as you want. To prevent a problem
with cells (Excel will object to sorting the data) you need to remove any
textboxes you have (for instance with a title, showing the parameters run
etc) and instead add additional header rows, merge the cells and put your
text in there instead. I add a link at the top of the report that says
Export Data. With RS 2005 you will be able to configure it to use ASCII
instead of Unicode.
Here is an example of a Jump to URL link I use. This causes Excel to come up
with the data in a separate window:
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
"&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"ME" <ME@.mail.com> wrote in message
news:OPWXUKT%23GHA.2408@.TK2MSFTNGP05.phx.gbl...
> My report has a table that when I click on a cell it jumps to URL and open
> it in the same browser window. How to open the URL in a new browser
> instead of current browser window?
> Thanks.
>|||Bruce,
The report I am viewing is in SQL 2000. I replaced your example with my
server name and parameter, it didn't work.
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:e38AxLT%23GHA.4268@.TK2MSFTNGP02.phx.gbl...
> You didn't ask about Excel but this response of mine to another post will
> answer you question:
> Depending on how you design your reports you can do the following to
> export to Excel. Or, what I do sometimes is make a copy of the report and
> clean it up for data export and then hide it in list view. If you export
> from Report Manager it puts CSV data in unicode which Excel puts all in
> one column. If you export in ASCII then Excel does just as you want. To
> prevent a problem with cells (Excel will object to sorting the data) you
> need to remove any textboxes you have (for instance with a title, showing
> the parameters run etc) and instead add additional header rows, merge the
> cells and put your text in there instead. I add a link at the top of the
> report that says Export Data. With RS 2005 you will be able to configure
> it to use ASCII instead of Unicode.
> Here is an example of a Jump to URL link I use. This causes Excel to come
> up with the data in a separate window:
>
> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
> "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "ME" <ME@.mail.com> wrote in message
> news:OPWXUKT%23GHA.2408@.TK2MSFTNGP05.phx.gbl...
>> My report has a table that when I click on a cell it jumps to URL and
>> open it in the same browser window. How to open the URL in a new browser
>> instead of current browser window?
>> Thanks.
>|||Use exactly what I have. Do not put in your server name. Replace just the
folder, report and parameters.
Even better, do a test with a report that is without parameters so you know
that is not a problem.
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/SomeFolder/SomeReport&ParamName=" &
Parameters!ParamName.Value','_blank'))"
One last point, you cannot test this in the development environment, you
have to deploy it.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"ME" <ME@.mail.com> wrote in message
news:O66gRCU%23GHA.3860@.TK2MSFTNGP02.phx.gbl...
> Bruce,
> The report I am viewing is in SQL 2000. I replaced your example with my
> server name and parameter, it didn't work.
>
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:e38AxLT%23GHA.4268@.TK2MSFTNGP02.phx.gbl...
>> You didn't ask about Excel but this response of mine to another post will
>> answer you question:
>> Depending on how you design your reports you can do the following to
>> export to Excel. Or, what I do sometimes is make a copy of the report and
>> clean it up for data export and then hide it in list view. If you export
>> from Report Manager it puts CSV data in unicode which Excel puts all in
>> one column. If you export in ASCII then Excel does just as you want. To
>> prevent a problem with cells (Excel will object to sorting the data) you
>> need to remove any textboxes you have (for instance with a title, showing
>> the parameters run etc) and instead add additional header rows, merge the
>> cells and put your text in there instead. I add a link at the top of the
>> report that says Export Data. With RS 2005 you will be able to configure
>> it to use ASCII instead of Unicode.
>> Here is an example of a Jump to URL link I use. This causes Excel to come
>> up with the data in a separate window:
>>
>> ="javascript:void(window.open('" & Globals!ReportServerUrl &
>> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
>> "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "ME" <ME@.mail.com> wrote in message
>> news:OPWXUKT%23GHA.2408@.TK2MSFTNGP05.phx.gbl...
>> My report has a table that when I click on a cell it jumps to URL and
>> open it in the same browser window. How to open the URL in a new
>> browser instead of current browser window?
>> Thanks.
>>
>|||It worked finally. Thanks
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:eXGqvGU%23GHA.3456@.TK2MSFTNGP02.phx.gbl...
> Use exactly what I have. Do not put in your server name. Replace just the
> folder, report and parameters.
> Even better, do a test with a report that is without parameters so you
> know that is not a problem.
> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> "?/SomeFolder/SomeReport&ParamName=" &
> Parameters!ParamName.Value','_blank'))"
> One last point, you cannot test this in the development environment, you
> have to deploy it.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "ME" <ME@.mail.com> wrote in message
> news:O66gRCU%23GHA.3860@.TK2MSFTNGP02.phx.gbl...
>> Bruce,
>> The report I am viewing is in SQL 2000. I replaced your example with my
>> server name and parameter, it didn't work.
>>
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:e38AxLT%23GHA.4268@.TK2MSFTNGP02.phx.gbl...
>> You didn't ask about Excel but this response of mine to another post
>> will answer you question:
>> Depending on how you design your reports you can do the following to
>> export to Excel. Or, what I do sometimes is make a copy of the report
>> and clean it up for data export and then hide it in list view. If you
>> export from Report Manager it puts CSV data in unicode which Excel puts
>> all in one column. If you export in ASCII then Excel does just as you
>> want. To prevent a problem with cells (Excel will object to sorting the
>> data) you need to remove any textboxes you have (for instance with a
>> title, showing the parameters run etc) and instead add additional header
>> rows, merge the cells and put your text in there instead. I add a link
>> at the top of the report that says Export Data. With RS 2005 you will be
>> able to configure it to use ASCII instead of Unicode.
>> Here is an example of a Jump to URL link I use. This causes Excel to
>> come up with the data in a separate window:
>>
>> ="javascript:void(window.open('" & Globals!ReportServerUrl &
>> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
>> "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "ME" <ME@.mail.com> wrote in message
>> news:OPWXUKT%23GHA.2408@.TK2MSFTNGP05.phx.gbl...
>> My report has a table that when I click on a cell it jumps to URL and
>> open it in the same browser window. How to open the URL in a new
>> browser instead of current browser window?
>> Thanks.
>>
>>
>