Showing posts with label reportserver. Show all posts
Showing posts with label reportserver. Show all posts

Monday, March 12, 2012

save PDF with specified name

Hi pals,
I am asking you for your wisdom: When user click to:
/ReportServer?/test/This+Is+Test&rs:ClearSession=true&rs:Format=PDF&OrderID=532
I want to:
1. define the name of PDF, I have always "This Is Test.pdf" and I want to
change it
let say "Document 532.pdf"
2. open PDF in new window, I don't want open/save dialog
I s there any guide how to do this ?
Thanks a lot, first point is more important to me.
--
BranoIng. Branislav Gerzo wrote:
> Hi pals,
> I am asking you for your wisdom: When user click to:
>
/ReportServer?/test/This+Is+Test&rs:ClearSession=true&rs:Format=PDF&OrderID=532
> I want to:
> 1. define the name of PDF, I have always "This Is Test.pdf" and I
> want to change it
> let say "Document 532.pdf"
> 2. open PDF in new window, I don't want open/save dialog
> I s there any guide how to do this ?
> Thanks a lot, first point is more important to me.
I've done the following:
Create an aspx-page. Put a reference of the reportserver-webservice into
your aspx-page, render the report in the page-load-event and write the data
(byte()-type)
into the response-object. So you can see your report as html
Put another button on your webpage wich will open the same page in another
window, render the report with the needed format (i.e. pdf) and set the
right response.AddHeader settings.
Code-Snippet in my page-load
Dim rservice as New ReportingService
rservice.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim outputdata as byte()
outputdata = rservice.render(all params and settings include
rendering-format etc.)
Dim fileout as string = your needed-filename with extension
Response.Clear
Response.ContentType = 'set here the right mimetype!!!
If mimeType <> "text/html" Then
Response.AddHeader("Content-Disposition", "attachment; filename=" &
fileout)
End If
Response.BinaryWrite(outputdata)
regards
frank
www.xax.de

Tuesday, February 21, 2012

Sample RSExecutionLog Error

I have been using the reportserver function of sql 2005 for some time now and I decided to try the rsexecutionlog sample. I went through the installation and everything seemed to go fine until I executed the job. The job failed so I manually ran the dts package with configuration file and found that the error is from the parameters column query and reads like this:

"[Derived Column [979]] Error: The "component "Derived Column" (979)"

failed because truncation occurred, and the truncation row disposition

on "output column "ParametersStr" (999)" specifies failure on

truncation. A truncation error occurred on the specified object of the

specified component. "

"Task Update Parameters failed"

I read the query and it reads as such:

SELECT ExecutionLogID, Parameters

FROM ExecutionLogs WITH (NOLOCK)

WHERE Parameters IS NOT NULL AND

Datalength(Parameters) > 0

I checked both the source and destination columns and they have the same character type settings of ntext and same lengths. So I don't understand why it thinks there is a truncation occurring. Please help.

I ran into the same problem. The "Update Parameters" data flow in the SSIS package has a script step that reads the parameters and parses them into name/value pairs. The script task variable structure can't handle the entire amount of data being passed so it is throwing an error. I got around this by changing the "derived column" step just before the "script component" step in the "update parameters" data flow. In there, the variable ParametersStr is defined as "(DT_WSTR,4000)Parameters". I changed it to "(DT_WSTR,2000)Parameters". I also set the error output to ignore truncation errors. This may not be the best way to resolve this, but it worked for me and it only took a second.|||

This worked for me, thanks for sharing. I just saved the old dstx in case this were to cause any problems in the future.

Sample RSExecutionLog Error

I have been using the reportserver function of sql 2005 for some time now and I decided to try the rsexecutionlog sample. I went through the installation and everything seemed to go fine until I executed the job. The job failed so I manually ran the dts package with configuration file and found that the error is from the parameters column query and reads like this:

"[Derived Column [979]] Error: The "component "Derived Column" (979)"

failed because truncation occurred, and the truncation row disposition

on "output column "ParametersStr" (999)" specifies failure on

truncation. A truncation error occurred on the specified object of the

specified component. "

"Task Update Parameters failed"

I read the query and it reads as such:

SELECT ExecutionLogID, Parameters

FROM ExecutionLogs WITH (NOLOCK)

WHERE Parameters IS NOT NULL AND

Datalength(Parameters) > 0

I checked both the source and destination columns and they have the same character type settings of ntext and same lengths. So I don't understand why it thinks there is a truncation occurring. Please help.

I ran into the same problem. The "Update Parameters" data flow in the SSIS package has a script step that reads the parameters and parses them into name/value pairs. The script task variable structure can't handle the entire amount of data being passed so it is throwing an error. I got around this by changing the "derived column" step just before the "script component" step in the "update parameters" data flow. In there, the variable ParametersStr is defined as "(DT_WSTR,4000)Parameters". I changed it to "(DT_WSTR,2000)Parameters". I also set the error output to ignore truncation errors. This may not be the best way to resolve this, but it worked for me and it only took a second.|||

This worked for me, thanks for sharing. I just saved the old dstx in case this were to cause any problems in the future.

Sample RSExecutionLog Error

I have been using the reportserver function of sql 2005 for some time now and I decided to try the rsexecutionlog sample. I went through the installation and everything seemed to go fine until I executed the job. The job failed so I manually ran the dts package with configuration file and found that the error is from the parameters column query and reads like this:

"[Derived Column [979]] Error: The "component "Derived Column" (979)"

failed because truncation occurred, and the truncation row disposition

on "output column "ParametersStr" (999)" specifies failure on

truncation. A truncation error occurred on the specified object of the

specified component. "

"Task Update Parameters failed"

I read the query and it reads as such:

SELECT ExecutionLogID, Parameters

FROM ExecutionLogs WITH (NOLOCK)

WHERE Parameters IS NOT NULL AND

Datalength(Parameters) > 0

I checked both the source and destination columns and they have the same character type settings of ntext and same lengths. So I don't understand why it thinks there is a truncation occurring. Please help.

I ran into the same problem. The "Update Parameters" data flow in the SSIS package has a script step that reads the parameters and parses them into name/value pairs. The script task variable structure can't handle the entire amount of data being passed so it is throwing an error. I got around this by changing the "derived column" step just before the "script component" step in the "update parameters" data flow. In there, the variable ParametersStr is defined as "(DT_WSTR,4000)Parameters". I changed it to "(DT_WSTR,2000)Parameters". I also set the error output to ignore truncation errors. This may not be the best way to resolve this, but it worked for me and it only took a second.|||

This worked for me, thanks for sharing. I just saved the old dstx in case this were to cause any problems in the future.

Sample Report Deployment

Hi all,

I tried to deploy sample report to http://myserver/reportserver and I got the following error, can someone provide some tips?

TITLE: Microsoft Report Designer

A connection could not be made to the report server http://lasc06/reportserver.


ADDITIONAL INFORMATION:

Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
The request failed with the error message:
--
<html>
<head>
<title>
SQL Server Reporting Services
</title><meta name="Generator" content="Microsoft SQL Server Reporting Services 9.00.1399.00" />
<meta name="HTTP Status" content="500" />
<meta name="ProductLocaleID" content="9" />
<meta name="CountryLocaleID" content="1033" />
<meta name="StackTrace" content />
<style>
BODY {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE: 8pt; COLOR:black}
H1 {FONT-FAMILY:Verdana; FONT-WEIGHT:700; FONT-SIZE:15pt}
LI {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE:8pt; DISPLAY:inline}
.ProductInfo {FONT-FAMILY:Verdana; FONT-WEIGHT:bold; FONT-SIZE: 8pt; COLOR:gray}
A:link {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none}
A:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#FF3300; TEXT-DECORATION:underline}
A:visited {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none}
A:visited:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; color:#FF3300; TEXT-DECORATION:underline}

</style>
</head><body bgcolor="white">
<h1>
Reporting Services Error<hr width="100%" size="1" color="silver" />
</h1><ul>
<li>An internal error occurred on the report server. See the error log for more details. (rsInternalError) <a href="http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsInternalError&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=9.00.1399.00" target="_blank">Get Online Help</a></li><ul>
<li>Object reference not set to an instance of an object.</li>
</ul>
</ul><hr width="100%" size="1" color="silver" /><span class="ProductInfo">SQL Server Reporting Services</span>
</body>
</html>
--. (Microsoft.ReportingServices.Designer)


BUTTONS:

OK

Have you configured your Report Server?
Make sure that everything is up and running by configuring the server:
Start --> All programs --> Microsoft SQL Server 2005 --> Configuration Tools --> Reporting Services Configuration|||This sounds like a credential issue. Go to the Data Source folder. Click on the data souce. Connect Using: the default is "Credentials supplied by the user running the report". Try other options like "Credentials stored securely in the report server" to see if that'll work.|||

Hi,

first thing for me would be to install the latest service pack first (You are running on the RTM version whereas the version 9.0.00.2047 is the most current.

Is the report server available through the navigation in Internet Explorer on the appropiate site http://localhost/reportserver ?


HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Sample Report Deployment

Hi all,

I tried to deploy sample report to http://myserver/reportserver and I got the following error, can someone provide some tips?

TITLE: Microsoft Report Designer

A connection could not be made to the report server http://lasc06/reportserver.


ADDITIONAL INFORMATION:

Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
The request failed with the error message:
--
<html>
<head>
<title>
SQL Server Reporting Services
</title><meta name="Generator" content="Microsoft SQL Server Reporting Services 9.00.1399.00" />
<meta name="HTTP Status" content="500" />
<meta name="ProductLocaleID" content="9" />
<meta name="CountryLocaleID" content="1033" />
<meta name="StackTrace" content />
<style>
BODY {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE: 8pt; COLOR:black}
H1 {FONT-FAMILY:Verdana; FONT-WEIGHT:700; FONT-SIZE:15pt}
LI {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE:8pt; DISPLAY:inline}
.ProductInfo {FONT-FAMILY:Verdana; FONT-WEIGHT:bold; FONT-SIZE: 8pt; COLOR:gray}
A:link {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none}
A:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#FF3300; TEXT-DECORATION:underline}
A:visited {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none}
A:visited:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; color:#FF3300; TEXT-DECORATION:underline}

</style>
</head><body bgcolor="white">
<h1>
Reporting Services Error<hr width="100%" size="1" color="silver" />
</h1><ul>
<li>An internal error occurred on the report server. See the error log for more details. (rsInternalError) <a href="http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsInternalError&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=9.00.1399.00" target="_blank">Get Online Help</a></li><ul>
<li>Object reference not set to an instance of an object.</li>
</ul>
</ul><hr width="100%" size="1" color="silver" /><span class="ProductInfo">SQL Server Reporting Services</span>
</body>
</html>
--. (Microsoft.ReportingServices.Designer)


BUTTONS:

OK

Have you configured your Report Server?
Make sure that everything is up and running by configuring the server:
Start --> All programs --> Microsoft SQL Server 2005 --> Configuration Tools --> Reporting Services Configuration|||This sounds like a credential issue. Go to the Data Source folder. Click on the data souce. Connect Using: the default is "Credentials supplied by the user running the report". Try other options like "Credentials stored securely in the report server" to see if that'll work.|||

Hi,

first thing for me would be to install the latest service pack first (You are running on the RTM version whereas the version 9.0.00.2047 is the most current.

Is the report server available through the navigation in Internet Explorer on the appropiate site http://localhost/reportserver ?


HTH, Jens Suessmeyer.

http://www.sqlserver2005.de