Showing posts with label pdf. Show all posts
Showing posts with label pdf. Show all posts

Friday, March 30, 2012

Report parameter question

Hi there,

I am a tad confused with an exception that I get whet trying to render

a report to pdf. I pass 2 arraylists which contains the name and value

of the parameters. I iterate through these lists (which are of equal

lenght) and set the parameters. I am very new to this so I am sure that

I am doing something stupid somewhere in the code below:

' Create instance of save dialog and set default

' filename and filter

saveReportDialog = New SaveFileDialog

saveReportDialog.Filter = GetFilterString(pFormat)

saveReportDialog.FileName = pName


' Open the save file dialog

Dim dr As DialogResult = saveReportDialog.ShowDialog()


If dr = DialogResult.OK Then

Dim fileName As String = saveReportDialog.FileName


Dim historyID As String = Nothing

Dim deviceInfo As String = Nothing

Dim showHide As String = Nothing

Dim param() As ParameterValue = New

ParameterValue(pParameterValuesArrayList.Count) {}

Dim credentials As DataSourceCredentials() = Nothing

Dim results() As [Byte]

Dim encoding As String

Dim mimeType As String

Dim warnings As Warning() = Nothing

Dim reportHistoryParameters As ParameterValue() = Nothing

Dim streamIDs As String() = Nothing


'Iterate through the array of parameters and set the report parameters

Dim i As Integer

For i = 0 To pParameterValuesArrayList.Count - 1

param(i) = New ParameterValue

param(i).Name = pParameterNamesArrayList(i)

param(i).Value = pParameterValuesArrayList(i)

Next


'Exectute the report and save it into a file.

Try

results = rs.Render(ReportItem.Path, pFormat, historyID, deviceInfo,

param, credentials, showHide, encoding, mimeType,

reportHistoryParameters, warnings, streamIDs)


Dim stream As FileStream = File.OpenWrite(fileName)

stream.Write(results, 0, results.Length)

stream.Close()


Catch exception As Exception

HandleException(exception)

End Try

End If
when trying to execute the red line of code, I get the following error which confuses:

an exception has occured: The value of parameter 'Parameters' is not valid.

I don't even have a parameter called 'Parameters' . When debugging, I

have determined that the arraylists contain the values they are

supposed to so now I am in need of expertise of all you smart people

here :)

Thanks

MichaelWhat is the error message? Does the report seem to execute just fine when running it through the SSRS\reports website?|||Hi there,

The error I get is in the code... the message reads:

an exception has occured: The value of parameter 'Parameters' is not valid.

The report never opens from whithin my application but does work from the development environment.

The confusing thing is that the only parameter I have is called

"@.MemberID" and not "Parameters", so I don't know what this error

message means. I you look at the code I posted above, the exception is

thrown when I ty to render the report.

Regards

|||Hi, I feel it is necessary to say that I solved my own problem.

It was a more fundamental mistake. I have not converted the parameters

to be strings and thereby it was in invalid. What I did to solve this

problem was:

Dim i As Integer

For i = 0 To pParameterValuesArrayList.Count - 1

parameters(i) = New ParameterValue

parameters(i).Name = CStr(pParameterNamesArrayList(i))

parameters(i).Value = CStr(pParameterValuesArrayList(i))

Next

This worked fine :)

Wednesday, March 28, 2012

Report Pagination

When you view the report in Report Manager it shows that it is Page 1 of 1
but when I export it to PDF it actually has 437 pages. Which is fine...no
probs there but would like to know the reason that it says Page 1 of 1 rather
than the 437.
Any help would be greatly appreacited on this, as its baffling me.Hi Nat,
Reports can appear different when rendered in different formats. For
example, your report is displayed using HTML in Report Designer preview
mode versus PDF when exported. So it is this formatting in HTML that
can cause the page number issue you describe (HTML has no concept of
page numbers - the whole report is '1' page...)
Maybe these suggestions can help?
1) When you preview a report in report designer, you can press the
<print preview> button (<print layout> in RS2005 if I recall...) on the
preview pane toolbar to display the report with pages (as it would
print out). At least you'll know how many pages the report truly has
this way.
2) If your report has hard page breaks set, you'll see the pages
displayed in preview window automatically.
HTH
Matt A
Reporting Services Newsletter at www.reportarchitex.com
Nat Johnson wrote:
> When you view the report in Report Manager it shows that it is Page 1 of 1
> but when I export it to PDF it actually has 437 pages. Which is fine...no
> probs there but would like to know the reason that it says Page 1 of 1 rather
> than the 437.
> Any help would be greatly appreacited on this, as its baffling me.

Friday, March 23, 2012

Report Needs only PDF Export Format

Hi,

I have around 20 report in my testserver.In this 5 reports needs to export only in PDF format.
The Other 15 reports are needs to export in PDF,Excel,CSV and TIFF formats.

I am using Reporting Services2005 for developing reports and also using VS2005.
Any suggesstions appreciated.

Thanks,
Prabu

Those formats are all supported. Unfortunately you can't control for a particular report which export formats are supported. They are configured at the server level and apply to each report in the catalog.|||

You may be able to write some Javascript or report code to remove items from the list after the page is rendered.

|||Yes, but this won't prevent people from getting the reports via the SOAP API or putting the format directly on the URL.|||

Being able to render a report with the ability to restrict the export formats for a particular report through URL Parameterization and the WebService API would be a nice addition.

I want to be able to run the report in the report manager, see it display as HTML but only allow it to be exported as Pdf without having to code/provide my own interface on top of the report manager.

Of course, if the report formatted in the Web Browser and on the paper exactly the same that would also be nice. (If I have this wrong please let me know). The above addition would still be nice though.

|||

"Of course, if the report formatted in the Web Browser and on the paper exactly the same that would also be nice."

Meant to say this... Of course, if the report formatted in the Web Browser (HTML) and on the paper (Pdf) exactly the same that would also be nice.

Report Needs only PDF Export Format

Hi,

I have around 20 report in my testserver.In this 5 reports needs to export only in PDF format.
The Other 15 reports are needs to export in PDF,Excel,CSV and TIFF formats.

I am using Reporting Services2005 for developing reports and also using VS2005.
Any suggesstions appreciated.

Thanks,
Prabu

Those formats are all supported. Unfortunately you can't control for a particular report which export formats are supported. They are configured at the server level and apply to each report in the catalog.|||

You may be able to write some Javascript or report code to remove items from the list after the page is rendered.

|||Yes, but this won't prevent people from getting the reports via the SOAP API or putting the format directly on the URL.|||

Being able to render a report with the ability to restrict the export formats for a particular report through URL Parameterization and the WebService API would be a nice addition.

I want to be able to run the report in the report manager, see it display as HTML but only allow it to be exported as Pdf without having to code/provide my own interface on top of the report manager.

Of course, if the report formatted in the Web Browser and on the paper exactly the same that would also be nice. (If I have this wrong please let me know). The above addition would still be nice though.

|||

"Of course, if the report formatted in the Web Browser and on the paper exactly the same that would also be nice."

Meant to say this... Of course, if the report formatted in the Web Browser (HTML) and on the paper (Pdf) exactly the same that would also be nice.

Wednesday, March 7, 2012

Report layout:- Inconsistencies between page height and HTML Rendered

I'm having problems with what is displayed in the browser being different to what is defined in the RDL and what is exported to PDF.
I have set height to 21cm and width to 29.7 with 0cm margins. There is one table in the report.
When I export the report to PDF its fine, all pages are 21x29.7cm, landscape.
However, when I view the report in the report manager (in a browser) the pages are much longer than they should be... nearly twice as long (as if to make the report portrait again?)
Has anybody had this problem with lanscape reports? Any ideas on how to resolve this?
I've made lots of different landscape reports and get the problem every time. I find it hard to believe that no one else is having this issue...
ThanksI'm having this problem, too, but since the reports export to PDF no problem, i've considered it a low priority. I'm not even convinced it's a bug, as such, due to the nature of the web and the fact that web-delivered information generally runs on pages a great deal longer than standard portrait-sized pages. That is, I've chosen to consider the page-length property to be a PDF-specific property, and not even applicable to ASP-delivered reports. It doesn't bother me to have users browsing the reports online in this format as long as they can ultimately export them to PDF if they wish.

What does bother me is the seeming randomness of the length of the ASP-delivered report pages. Some of the pages seem double-lengthed, others triple or more. What gives?

|||I know what you, however, its my users that are complaining about it!
If there was some way of being able to "lock" the table headings it wouldnt be a problem - is there any way this can be done? It is one of the most requested features of my users.
Any help is much apprerciated.|||

In SQL Server 2005, you can 'lock' the headers for a table or a matrix.

If you right click the border of the table in the Layout pane of report designer, on the General tab in the Table Properties dialog, there is a check box called "Header should remain visible while scrolling". If you check that, in HTML the table header will always be shown.

-Lukasz


This posting is provided "AS IS" with no warranties, and confers no rights.

|||I had the same problem and solved it, so thought i would share this with anyone who comes across it. I don't know why it exactly occurs but if you change the Interactive page size to be a bit larger then the html is rendered as the pdf and the pdf is unaltered. Interactive page is is reached by clicking on the yellow right hand side of the report off the actual report and then in the properties pane.|||

my report is displayed as one long page when viewed in the browser, while it is displaying correctly in several pages when exported to PDF. Can you please helpe me!!

Regards

Dwarka (hdwarka@.yahoo.com)

Report layout:- Inconsistencies between page height and HTML Rendered

I'm having problems with what is displayed in the browser being different to what is defined in the RDL and what is exported to PDF.
I have set height to 21cm and width to 29.7 with 0cm margins. There is one table in the report.
When I export the report to PDF its fine, all pages are 21x29.7cm, landscape.
However, when I view the report in the report manager (in a browser) the pages are much longer than they should be... nearly twice as long (as if to make the report portrait again?)
Has anybody had this problem with lanscape reports? Any ideas on how to resolve this?
I've made lots of different landscape reports and get the problem every time. I find it hard to believe that no one else is having this issue...
Thanks
I'm having this problem, too, but since the reports export to PDF no problem, i've considered it a low priority. I'm not even convinced it's a bug, as such, due to the nature of the web and the fact that web-delivered information generally runs on pages a great deal longer than standard portrait-sized pages. That is, I've chosen to consider the page-length property to be a PDF-specific property, and not even applicable to ASP-delivered reports. It doesn't bother me to have users browsing the reports online in this format as long as they can ultimately export them to PDF if they wish.

What does bother me is the seeming randomness of the length of the ASP-delivered report pages. Some of the pages seem double-lengthed, others triple or more. What gives?|||I know what you, however, its my users that are complaining about it!
If there was some way of being able to "lock" the table headings it wouldnt be a problem - is there any way this can be done? It is one of the most requested features of my users.
Any help is much apprerciated.
|||

In SQL Server 2005, you can 'lock' the headers for a table or a matrix.

If you right click the border of the table in the Layout pane of report designer, on the General tab in the Table Properties dialog, there is a check box called "Header should remain visible while scrolling". If you check that, in HTML the table header will always be shown.

-Lukasz


This posting is provided "AS IS" with no warranties, and confers no rights.

|||I had the same problem and solved it, so thought i would share this with anyone who comes across it. I don't know why it exactly occurs but if you change the Interactive page size to be a bit larger then the html is rendered as the pdf and the pdf is unaltered. Interactive page is is reached by clicking on the yellow right hand side of the report off the actual report and then in the properties pane.|||

my report is displayed as one long page when viewed in the browser, while it is displaying correctly in several pages when exported to PDF. Can you please helpe me!!

Regards

Dwarka (hdwarka@.yahoo.com)

Report layout:- Inconsistencies between page height and HTML Rendered

I'm having problems with what is displayed in the browser being different to what is defined in the RDL and what is exported to PDF.
I have set height to 21cm and width to 29.7 with 0cm margins. There is one table in the report.
When I export the report to PDF its fine, all pages are 21x29.7cm, landscape.
However, when I view the report in the report manager (in a browser) the pages are much longer than they should be... nearly twice as long (as if to make the report portrait again?)
Has anybody had this problem with lanscape reports? Any ideas on how to resolve this?
I've made lots of different landscape reports and get the problem every time. I find it hard to believe that no one else is having this issue...
Thanks
I'm having this problem, too, but since the reports export to PDF no problem, i've considered it a low priority. I'm not even convinced it's a bug, as such, due to the nature of the web and the fact that web-delivered information generally runs on pages a great deal longer than standard portrait-sized pages. That is, I've chosen to consider the page-length property to be a PDF-specific property, and not even applicable to ASP-delivered reports. It doesn't bother me to have users browsing the reports online in this format as long as they can ultimately export them to PDF if they wish.

What does bother me is the seeming randomness of the length of the ASP-delivered report pages. Some of the pages seem double-lengthed, others triple or more. What gives?|||I know what you, however, its my users that are complaining about it!
If there was some way of being able to "lock" the table headings it wouldnt be a problem - is there any way this can be done? It is one of the most requested features of my users.
Any help is much apprerciated.
|||

In SQL Server 2005, you can 'lock' the headers for a table or a matrix.

If you right click the border of the table in the Layout pane of report designer, on the General tab in the Table Properties dialog, there is a check box called "Header should remain visible while scrolling". If you check that, in HTML the table header will always be shown.

-Lukasz


This posting is provided "AS IS" with no warranties, and confers no rights.

|||I had the same problem and solved it, so thought i would share this with anyone who comes across it. I don't know why it exactly occurs but if you change the Interactive page size to be a bit larger then the html is rendered as the pdf and the pdf is unaltered. Interactive page is is reached by clicking on the yellow right hand side of the report off the actual report and then in the properties pane.|||

my report is displayed as one long page when viewed in the browser, while it is displaying correctly in several pages when exported to PDF. Can you please helpe me!!

Regards

Dwarka (hdwarka@.yahoo.com)

Report layout:- Inconsistencies between page height and HTML Rendered

I'm having problems with what is displayed in the browser being different to what is defined in the RDL and what is exported to PDF.
I have set height to 21cm and width to 29.7 with 0cm margins. There is one table in the report.
When I export the report to PDF its fine, all pages are 21x29.7cm, landscape.
However, when I view the report in the report manager (in a browser) the pages are much longer than they should be... nearly twice as long (as if to make the report portrait again?)
Has anybody had this problem with lanscape reports? Any ideas on how to resolve this?
I've made lots of different landscape reports and get the problem every time. I find it hard to believe that no one else is having this issue...
ThanksI'm having this problem, too, but since the reports export to PDF no problem, i've considered it a low priority. I'm not even convinced it's a bug, as such, due to the nature of the web and the fact that web-delivered information generally runs on pages a great deal longer than standard portrait-sized pages. That is, I've chosen to consider the page-length property to be a PDF-specific property, and not even applicable to ASP-delivered reports. It doesn't bother me to have users browsing the reports online in this format as long as they can ultimately export them to PDF if they wish.

What does bother me is the seeming randomness of the length of the ASP-delivered report pages. Some of the pages seem double-lengthed, others triple or more. What gives?

|||I know what you, however, its my users that are complaining about it!
If there was some way of being able to "lock" the table headings it wouldnt be a problem - is there any way this can be done? It is one of the most requested features of my users.
Any help is much apprerciated.|||

In SQL Server 2005, you can 'lock' the headers for a table or a matrix.

If you right click the border of the table in the Layout pane of report designer, on the General tab in the Table Properties dialog, there is a check box called "Header should remain visible while scrolling". If you check that, in HTML the table header will always be shown.

-Lukasz


This posting is provided "AS IS" with no warranties, and confers no rights.

|||I had the same problem and solved it, so thought i would share this with anyone who comes across it. I don't know why it exactly occurs but if you change the Interactive page size to be a bit larger then the html is rendered as the pdf and the pdf is unaltered. Interactive page is is reached by clicking on the yellow right hand side of the report off the actual report and then in the properties pane.|||

my report is displayed as one long page when viewed in the browser, while it is displaying correctly in several pages when exported to PDF. Can you please helpe me!!

Regards

Dwarka (hdwarka@.yahoo.com)

Report Layout depending on Rendering Format

Can I vary the layout (visibility) depending on the rendering format?
Example: If 'PDF' add a title page, if 'HTML' no title page.
ThanksIs there anybody who could help me on that issue?
"Niklas" wrote:
> Can I vary the layout (visibility) depending on the rendering format?
> Example: If 'PDF' add a title page, if 'HTML' no title page.
> Thanks|||It is not possible to have a title page in one output format, but not in
other output formats.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Niklas" <Niklas@.discussions.microsoft.com> wrote in message
news:BFB7935D-892E-4A66-BBBF-1F39B21C8608@.microsoft.com...
> Is there anybody who could help me on that issue?
> "Niklas" wrote:
> > Can I vary the layout (visibility) depending on the rendering format?
> >
> > Example: If 'PDF' add a title page, if 'HTML' no title page.
> >
> > Thanks

Tuesday, February 21, 2012

Report header and footer disappear when exporting

When I export my report to a PDF, everything is fine. However, if I select a group to drill down and then export that drilled down report to a pdf, the reports header and footer disappear. How can I fix this? My report has a few subreports, so that might have something to do with it.
ThanksSee if you find solution here
http://support.businessobjects.com/

report having larger width not printing

Hi,

I have one report with the page size of 17in, 8.5in. Exporting then printing PDF is working fine. But when I am printing directly from report, It is not printing. It is not saying any error. The popup box is coming and showing the message like printing. But it is not printing. I can't change the page size lesser than 17in.

Can you please give some idea for this issue?

Thanks,

Muniappan Kandasamy

You can keep the report body height as anything, it can be as long as you want but keep the interactive height of the report as 11'

A standard portrait style print is of size 8.5" x 11" keep this as the interactive size of your report.

..............................................................................................

Remember to mark as "Answer" on the post that helped you.

http://technoblab.blogspot.com

Report Formatting Differently on different servers with same RDL

This is a good one:

Same RDL, 2 different servers. I run the report on my computer and export to PDF, it prints properly. When the customer runs the report on their server (SSRS 2K5 SP1, same as mine), they get it displayed differently. The columns on the report extend to the next page and the lines are thicker.

Is this a formatting issue on the customer's PC? It uses standard fonts (Tahoma, Sans-serif).

Any ideas?

maybe you are using a matrix on the report and the customer has different data (more data) that makes the matrix extend?

lines are thicker? I can't think of anything there unless it is the fonts, but you look ok with that.

|||

No, it is not a matrix report. It is a standard layout table that is 10 inches wide, it's set for landscape with .5in margins.

|||I did some more research and started a new report from scratch and the same issue occurs.