Wednesday, March 28, 2012

How to force CSV via hyperlink jump to report?

I have a textbox with a hyperlink navigation set up to jump to another
report. the called report has several parameters that I've set up. The
hyperlink runs fine. Now I've been asked to have that called report always
run in CSV format.
Does anyone know how I can add the report server Format parameter with a
value of CSV (&rs:Format=CSV) when calling a report via a hyperlink
navigation?
StephanieUse jump to URL. Here's a bunch of stuff of using Jump to URL:
Jump to URL gives you more control than jump to report.
For the first two examples be careful with the single and double quotes.
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=Excel','_blank'))"
This comes up as html (default format) in a separate window
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/SomeFolder/SomeReport&ParamName=" &
Parameters!ParamName.Value','_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
Here is an example of a Jump to URL link I use. This causes Excel (note that
Excel does not handle Unicode well at least Excel 2003 doesn't so I use
ASCII) 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"
"Stephanie" <Stephanie@.discussions.microsoft.com> wrote in message
news:F3E67A39-D8EA-41FD-941E-3556D61A16BF@.microsoft.com...
>I have a textbox with a hyperlink navigation set up to jump to another
> report. the called report has several parameters that I've set up. The
> hyperlink runs fine. Now I've been asked to have that called report
> always
> run in CSV format.
> Does anyone know how I can add the report server Format parameter with a
> value of CSV (&rs:Format=CSV) when calling a report via a hyperlink
> navigation?
> Stephanie|||Thanks, Bruce. I was wondering if that was going to have to be the direction
that we needed to go in.
If the report has 6 parameters that I need to send, I need to put those in
the call, too. How can I make sure the user cannot see the parameters that
I'm sending in the URL or even any of the URL?
Stephanie
"Bruce L-C [MVP]" wrote:
> Use jump to URL. Here's a bunch of stuff of using Jump to URL:
> Jump to URL gives you more control than jump to report.
> For the first two examples be careful with the single and double quotes.
> 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=Excel','_blank'))"
> This comes up as html (default format) in a separate window
> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> "?/SomeFolder/SomeReport&ParamName=" &
> Parameters!ParamName.Value','_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
> Here is an example of a Jump to URL link I use. This causes Excel (note that
> Excel does not handle Unicode well at least Excel 2003 doesn't so I use
> ASCII) 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"
>
> "Stephanie" <Stephanie@.discussions.microsoft.com> wrote in message
> news:F3E67A39-D8EA-41FD-941E-3556D61A16BF@.microsoft.com...
> >I have a textbox with a hyperlink navigation set up to jump to another
> > report. the called report has several parameters that I've set up. The
> > hyperlink runs fine. Now I've been asked to have that called report
> > always
> > run in CSV format.
> >
> > Does anyone know how I can add the report server Format parameter with a
> > value of CSV (&rs:Format=CSV) when calling a report via a hyperlink
> > navigation?
> >
> > Stephanie
>
>|||In RS 2005 they added the ability to have hidden parameters. I haven't done
this but you could try that.
If you are doing something like passing the ID of the person think about
tying a query parameter to the User!UserID global variable (query parameters
do not have to be mapped to a report parameter, they can be mapped to an
expression).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Stephanie" <Stephanie@.discussions.microsoft.com> wrote in message
news:CCE105E2-D1B1-4947-8264-0F5AB97BB61F@.microsoft.com...
> Thanks, Bruce. I was wondering if that was going to have to be the
> direction
> that we needed to go in.
> If the report has 6 parameters that I need to send, I need to put those in
> the call, too. How can I make sure the user cannot see the parameters
> that
> I'm sending in the URL or even any of the URL?
> Stephanie
> "Bruce L-C [MVP]" wrote:
>> Use jump to URL. Here's a bunch of stuff of using Jump to URL:
>> Jump to URL gives you more control than jump to report.
>> For the first two examples be careful with the single and double quotes.
>> 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=Excel','_blank'))"
>> This comes up as html (default format) in a separate window
>> ="javascript:void(window.open('" & Globals!ReportServerUrl &
>> "?/SomeFolder/SomeReport&ParamName=" &
>> Parameters!ParamName.Value','_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
>> Here is an example of a Jump to URL link I use. This causes Excel (note
>> that
>> Excel does not handle Unicode well at least Excel 2003 doesn't so I use
>> ASCII) 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"
>>
>> "Stephanie" <Stephanie@.discussions.microsoft.com> wrote in message
>> news:F3E67A39-D8EA-41FD-941E-3556D61A16BF@.microsoft.com...
>> >I have a textbox with a hyperlink navigation set up to jump to another
>> > report. the called report has several parameters that I've set up.
>> > The
>> > hyperlink runs fine. Now I've been asked to have that called report
>> > always
>> > run in CSV format.
>> >
>> > Does anyone know how I can add the report server Format parameter with
>> > a
>> > value of CSV (&rs:Format=CSV) when calling a report via a hyperlink
>> > navigation?
>> >
>> > Stephanie
>>|||I'm getting there but I have a few more questions.
1) I see how to set the Globals!ReportServerUrl parameter in the config file
on the different report servers. (We have Dev, ProdSupp and Prod.) But how
do I set it for testing a report that's located on my PC? I only have the
SQL Server client tools locally. When I run now, it's putting
"http://reportserver/" in. When I hard code it to the Development server
URL, it works.
2) My report that I need in CSV format is a matrix. The column headers,
which are dynamic, are not showing up in the CSV file. Do you know what I
need to do to get the dynamic column headers to show?
Thanks!
Stephanie
"Bruce L-C [MVP]" wrote:
> In RS 2005 they added the ability to have hidden parameters. I haven't done
> this but you could try that.
> If you are doing something like passing the ID of the person think about
> tying a query parameter to the User!UserID global variable (query parameters
> do not have to be mapped to a report parameter, they can be mapped to an
> expression).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Stephanie" <Stephanie@.discussions.microsoft.com> wrote in message
> news:CCE105E2-D1B1-4947-8264-0F5AB97BB61F@.microsoft.com...
> > Thanks, Bruce. I was wondering if that was going to have to be the
> > direction
> > that we needed to go in.
> >
> > If the report has 6 parameters that I need to send, I need to put those in
> > the call, too. How can I make sure the user cannot see the parameters
> > that
> > I'm sending in the URL or even any of the URL?
> >
> > Stephanie
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> Use jump to URL. Here's a bunch of stuff of using Jump to URL:
> >> Jump to URL gives you more control than jump to report.
> >>
> >> For the first two examples be careful with the single and double quotes.
> >>
> >> 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=Excel','_blank'))"
> >>
> >> This comes up as html (default format) in a separate window
> >>
> >> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> >> "?/SomeFolder/SomeReport&ParamName=" &
> >> Parameters!ParamName.Value','_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
> >>
> >> Here is an example of a Jump to URL link I use. This causes Excel (note
> >> that
> >> Excel does not handle Unicode well at least Excel 2003 doesn't so I use
> >> ASCII) 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"
> >>
> >>
> >> "Stephanie" <Stephanie@.discussions.microsoft.com> wrote in message
> >> news:F3E67A39-D8EA-41FD-941E-3556D61A16BF@.microsoft.com...
> >> >I have a textbox with a hyperlink navigation set up to jump to another
> >> > report. the called report has several parameters that I've set up.
> >> > The
> >> > hyperlink runs fine. Now I've been asked to have that called report
> >> > always
> >> > run in CSV format.
> >> >
> >> > Does anyone know how I can add the report server Format parameter with
> >> > a
> >> > value of CSV (&rs:Format=CSV) when calling a report via a hyperlink
> >> > navigation?
> >> >
> >> > Stephanie
> >>
> >>
> >>
>
>

No comments:

Post a Comment