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

Tuesday, March 20, 2012

replace a part of a string in a Table

hey,

I have a lage table with 1000's of records..
there is a column with the path to some files.

example: "R:\mutaties\test.pdf"

i need to change that path to "L:\archive\mutaties\test.pdf"

i will replace "R:\" with "L:\archive\" in all the records.. what;'s the simpelst way tot do this?

can i do a replace with SQL-queries? , or do i need to write a code/script for this?

grtz,
Blueupdate LargeTable
set Column = 'L:\archive' + substring(Column, 3, length(Column) - 3)
where Column like 'R:\%'|||Thanx Pierre ;)

I will try it :D

Repeating table headers overwriting data

I'm using RS2000 SP2 and am getting an issue when exporting to PDF. If I have a table that spans more than one page and I set the RepeatHeaderOnNewPage to True, then on occasion the table header will be displayed on top of the first few rows of data. It does not happen on all the pages or all the time and I can not find any information on this issue. Has anyone come across this before and solved it?

Hi,

Did you ever solve this problem? The same things is happening to me and I can't figure it out....

Barbara|||

Hi Barbara,

Unfortunately I was never able to solve this issue using RS 2000. In the end I turned off the repeating headers. I came to the conclusion that it was a bug in Microsofts PDF rendering engine.

I did run the same report using RS 2005 and it worked fine, but I'm not sure that will be of any help to you.

Regards,

Jeff.

Repeating table headers overwriting data

I'm using RS2000 SP2 and am getting an issue when exporting to PDF. If I have a table that spans more than one page and I set the RepeatHeaderOnNewPage to True, then on occasion the table header will be displayed on top of the first few rows of data. It does not happen on all the pages or all the time and I can not find any information on this issue. Has anyone come across this before and solved it?

Hi,

Did you ever solve this problem? The same things is happening to me and I can't figure it out....

Barbara|||

Hi Barbara,

Unfortunately I was never able to solve this issue using RS 2000. In the end I turned off the repeating headers. I came to the conclusion that it was a bug in Microsofts PDF rendering engine.

I did run the same report using RS 2005 and it worked fine, but I'm not sure that will be of any help to you.

Regards,

Jeff.

Friday, March 9, 2012

repeat group header at top of new page

I have a report of addresses, grouped by Street Name.
Output type is PDF.
When the report breaks onto a new page, I would like the Group Header - the Street Name last listed on the previous page - to repeat at the top.
Currently it seems to only repeat when the Street Name changes.
Is that possible? If so, how?The grouping and sorting properties dialog has an option to repeat the group
header. Setting this option should do the trick for you. Assuming you are
using a table you can reach this feature by opening the table properties
dialog. Next you would click on the Groups tab. Finally you will need to
edit the Streets Name group.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Greg Anderson" <GregAnderson@.discussions.microsoft.com> wrote in message
news:EA1A1F82-AA0D-4445-AC4E-C88C9EDB0444@.microsoft.com...
> I have a report of addresses, grouped by Street Name.
> Output type is PDF.
> When the report breaks onto a new page, I would like the Group Header -
the Street Name last listed on the previous page - to repeat at the top.
> Currently it seems to only repeat when the Street Name changes.
> Is that possible? If so, how?|||Let me also say that I have gone into the Table Properties and set the "Repeat header rows on each page"
This works when I send it a parameter to sort one way - by street name - but not when I send the sort parameter of "sequence" which is another column in my report.
Any ideas?
"Greg Anderson" wrote:
> I have a report of addresses, grouped by Street Name.
> Output type is PDF.
> When the report breaks onto a new page, I would like the Group Header - the Street Name last listed on the previous page - to repeat at the top.
> Currently it seems to only repeat when the Street Name changes.
> Is that possible? If so, how?

Monday, February 20, 2012

Rendering: PDF and Landscape

I have a (very simple) report where I specifiy 11 X 8.5 as the paper size.
The report renders in HTML correctly in Landscape mode. When I select PDF
and Export the report is reformated and rendered as 8.5 X 11 (portait mode).
How can I fix this?
thanks
dlr"blackshirt" <blackshirt@.discussions.microsoft.com> wrote in message news:<A9031067-D190-44C0-98A6-C0155B65ACE9@.microsoft.com>...
> Dennis,
> Did you ever find the answer. I'm having the same issu.
> Thanks
> "Dennis Redfield" wrote:
> > I have a (very simple) report where I specifiy 11 X 8.5 as the paper size.
> > The report renders in HTML correctly in Landscape mode. When I select PDF
> > and Export the report is reformated and rendered as 8.5 X 11 (portait mode).
> > How can I fix this?
> >
> > thanks
> >
> > dlr
> >
> >
> >
try this:
from the main menu,
1. go to Report->Report Properties...
2. on the 'Report Properties' window go to the 'Layout' tab
3. then proceed to the Page width and Page Height controls. they have
default values of 8.5 for the width and 11 for the height.
4. Reverse the values for the width to be 11in and the height to be
8.5in
try it and let me know how it goes.
Good luck!|||I was going from a published report and switching from portrait to landscape
mode and the report was snap shot cached. In the end I deleted the report
(using RM) and re-deployed the report (from VS). after that I was fine.
dlr
"A Gutie" <fiututor@.yahoo.com> wrote in message
news:eca873f7.0409160622.58362840@.posting.google.com...
> "blackshirt" <blackshirt@.discussions.microsoft.com> wrote in message
news:<A9031067-D190-44C0-98A6-C0155B65ACE9@.microsoft.com>...
> > Dennis,
> > Did you ever find the answer. I'm having the same issu.
> >
> > Thanks
> >
> > "Dennis Redfield" wrote:
> >
> > > I have a (very simple) report where I specifiy 11 X 8.5 as the paper
size.
> > > The report renders in HTML correctly in Landscape mode. When I select
PDF
> > > and Export the report is reformated and rendered as 8.5 X 11 (portait
mode).
> > > How can I fix this?
> > >
> > > thanks
> > >
> > > dlr
> > >
> > >
> > >
> try this:
> from the main menu,
> 1. go to Report->Report Properties...
> 2. on the 'Report Properties' window go to the 'Layout' tab
> 3. then proceed to the Page width and Page Height controls. they have
> default values of 8.5 for the width and 11 for the height.
> 4. Reverse the values for the width to be 11in and the height to be
> 8.5in
> try it and let me know how it goes.
> Good luck!

Rendering to PDF format

Hi everyone!
I have a problem with rendering report to PDF format. I created report using
my own report designer, developed for our company commercial product. There
is no problem to render report to some other format like HTML or IMAGE. But
when I render report to PDF format some of information simply disappears from
result report. There are empty spaces instead of printed values. Are there
any special definitions I have to make to each object, and what are the
different between, for example, HTML and PDF format from SQL reporting
services point of view.
Thanks!
Igor.The same thing is happening to me when I render a report with an embedded
image to pdf. I can either open or save the pdf, but upon reviewing the file
pieces of the report simply disappear. When I click to print, it is
completely blank.
"Igor" wrote:
> Hi everyone!
> I have a problem with rendering report to PDF format. I created report using
> my own report designer, developed for our company commercial product. There
> is no problem to render report to some other format like HTML or IMAGE. But
> when I render report to PDF format some of information simply disappears from
> result report. There are empty spaces instead of printed values. Are there
> any special definitions I have to make to each object, and what are the
> different between, for example, HTML and PDF format from SQL reporting
> services point of view.
> Thanks!
> Igor.

rendering to browser instead to file

Did anyone have rendered a report in excel format directly to browser
instead to a file? I tried this code below wich works fine for pdf
rendering:
result = rs.Render("/MyReports/SVREL00104", "Excel", Nothing, _
Nothing, params, Nothing, _
Nothing, encoding, mime, history, warnings, streamsId)
Page.Response.ClearContent()
Page.Response.ClearHeaders()
Page.Response.ContentType = mime
Page.Response.BinaryWrite(result)
Page.Response.Flush()
Page.Response.Close()
This code should load the excel into the web browser window, but I'm getting
this errors:
1. A message box saying: The Microsoft Excel can not access the file:
'http://localhost/MyReports/test.aspx'.
2. An input box asking for an alternate name for 'Titulos_de_Impressao'
(Print Title) because this is already an internal name.
Any ideas?
[]s
Renato
--
----
Renato Aloi
Analista Programador
J&W Informática Ltda.
+55 11 30406675If you can tolerate a dialog box asking if the user wants to open or save,
this will work:
Response.ClearContent();
Response.ClearHeaders();
Response.AppendHeader("Content-Disposition",
"attachment;filename=\"MyReport.xls\"");
Response.BinaryWrite(result);
Response.End();
It works for PDF as well. There may be other ways, but this worked for us
so we stuck with it.
"Renato Aloi" wrote:
> Did anyone have rendered a report in excel format directly to browser
> instead to a file? I tried this code below wich works fine for pdf
> rendering:
> result = rs.Render("/MyReports/SVREL00104", "Excel", Nothing, _
> Nothing, params, Nothing, _
> Nothing, encoding, mime, history, warnings, streamsId)
> Page.Response.ClearContent()
> Page.Response.ClearHeaders()
> Page.Response.ContentType = mime
> Page.Response.BinaryWrite(result)
> Page.Response.Flush()
> Page.Response.Close()
> This code should load the excel into the web browser window, but I'm getting
> this errors:
> 1. A message box saying: The Microsoft Excel can not access the file:
> 'http://localhost/MyReports/test.aspx'.
> 2. An input box asking for an alternate name for 'Titulos_de_Impressao'
> (Print Title) because this is already an internal name.
> Any ideas?
> []s
> Renato
> --
> ----
> Renato Aloi
> Analista Programador
> J&W Informática Ltda.
> +55 11 30406675
>
>|||Thanks for your idea, Debra. Though I was really trying to avoid these
dialog boxes. In fact I am 'translating' all my systems' reports from
Crystal Reports to Reporting Services. The problem is my clients are already
using my systems with this export option to excel, without needing to save
any file. If I barelly whisper that they will need to take more clicks to do
something that is already working well, I will be exterminated.
However, I think the approach i will adopt is save a file to disk then use
this code:
Page.Response.ClearContent()
Page.Response.ClearHeaders()
Page.Response.ContentType = mime
Page.Response.WriteFile(savedFile)
Page.Response.Flush()
Page.Response.Close()
This approach works fine without any dialog boxes. The problem is at my
clients using web farms with load balance. I am afraid of exceptions, like
file not found.
Any other ideas, let me know, please.
[]s
Renato
"debra doty" <debradoty@.discussions.microsoft.com> escreveu na mensagem
news:22D7671D-13F2-413F-84B8-022E222F3A4C@.microsoft.com...
> If you can tolerate a dialog box asking if the user wants to open or save,
> this will work:
> Response.ClearContent();
> Response.ClearHeaders();
> Response.AppendHeader("Content-Disposition",
> "attachment;filename=\"MyReport.xls\"");
> Response.BinaryWrite(result);
> Response.End();
> It works for PDF as well. There may be other ways, but this worked for us
> so we stuck with it.
>
> "Renato Aloi" wrote:
> > Did anyone have rendered a report in excel format directly to browser
> > instead to a file? I tried this code below wich works fine for pdf
> > rendering:
> >
> > result = rs.Render("/MyReports/SVREL00104", "Excel", Nothing, _
> > Nothing, params, Nothing, _
> > Nothing, encoding, mime, history, warnings, streamsId)
> >
> > Page.Response.ClearContent()
> > Page.Response.ClearHeaders()
> > Page.Response.ContentType = mime
> > Page.Response.BinaryWrite(result)
> > Page.Response.Flush()
> > Page.Response.Close()
> >
> > This code should load the excel into the web browser window, but I'm
getting
> > this errors:
> >
> > 1. A message box saying: The Microsoft Excel can not access the file:
> > 'http://localhost/MyReports/test.aspx'.
> >
> > 2. An input box asking for an alternate name for 'Titulos_de_Impressao'
> > (Print Title) because this is already an internal name.
> >
> > Any ideas?
> >
> > []s
> > Renato
> >
> > --
> > ----
> > Renato Aloi
> > Analista Programador
> > J&W Informática Ltda.
> > +55 11 30406675
> >
> >
> >

Rendering the ASP.NET local report directly to PDF

Hi,

Since it is not possible to print from a local report in ASP.Net is there anyway to directly render to a PDF or hide the Local report rendering and automatically goto the PDF either in the web page or as a popup.

Thanks

Hi,

You can try this code:

string path = @."D:/Folder/MyFile.pdf";
WebClient client = new
WebClient();
Byte[] buffer = client.DownloadData(path);

if (buffer != null)
{
Response.ContentType = "application/pdf";
Response.AddHeader("content-length",buffer.Length.ToString());
Response.BinaryWrite(buffer);
}

Hope this helps,

Vivek

|||

Can this be done on a report on a server and a parameter is passed?

For example, when a button is clicked in a page, then it will pass a parameter to SSRS and then, in turn, returns a PDF file. (So there's no need for a report viewer)

I am not sure if its possible. Please advise. Thanks!

Lloyd

|||

Lloyd,

How are you returning the PDF file? SSRS will return only data (I do not have much experience in SSRS), I have worked on Crystal Reports and it exported idrectly to PDF.

If you have data then you can format and show it to PDF. You can change the Response.ContentType as I mentioned before or use some tools like:

http://www.websupergoo.com/abcpdf-1.htm

Hope this helps,

Vivek

|||

Hi!

Thanks for the reply!

I'm thinking if this can be done. When I click the "Print" button, the report will be generated (PDF), and the standard pop up message of browser would come up, asking if the user would want to open or save the generated file.

Lloyd

|||

Lloyd,

You can first call the SSRS on the Print button click and then bind the resulting data to some data bound control, such as a DataGrid or GridView. After the bind, you can change the Response.ContentType property to "pdf". See my blog entry for details:

http://geekswithblogs.com/vivek

You can also try an Open Source PDF Report Server Control:http://sourceforge.net/projects/npdf/

Hope this helps,

Vivek

|||

Try this:

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()

Dim rs As New msfirm_db_stl.ReportingService
'rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim myCred As New NetworkCredential("Username", "Password", "Domain")
rs.Credentials = myCred

' Render arguments
Dim result As Byte() = Nothing
Dim reportPath As String = "/ImportedReports/" & Me.ReportName
Dim format As String = Me.ReportFormat
Dim historyID As String = Nothing
Dim devInfo As String = "<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>"

' Prepare report parameter.
Dim params() As String
params = Me.Parameters.Split("&")
Dim nParams As Integer = 0
Dim parameters() As msfirm_db_stl.ParameterValue
If params.Length > 0 And Me.Parameters <> String.Empty Then
ReDim parameters(IIf(params.Length > 0, params.Length - 1, 0))
For Each s As String In params
If s <> String.Empty Then
Dim keyval() As String = s.Split("=")
parameters(nParams) = New msfirm_db_stl.ParameterValue
parameters(nParams).Name = keyval(0)
parameters(nParams).Value = keyval(1)
nParams += 1
End If
Next
End If

Dim testparms() As msfirm_db_stl.ReportParameter = rs.GetReportParameters(reportPath, historyID, False, Nothing, Nothing)
If (testparms.Length.ToString) <> (nParams.ToString) Then
Response.Redirect(ConfigurationSettings.AppSettings.Get("ReportServerURL") & "?%2fImportedReports%2f" & Me.ReportName & "&rs%3aCommand=Render&rs%3aFormat=HTML4.0&rc%3aToolbar=True&rc%3aJavaScript=True")
End If

'Set Web Service user credentials
Dim credentials As msfirm_db_stl.DataSourceCredentials() = Nothing
Dim showHideToggle As String = Nothing
Dim encoding As String
Dim mimeType As String
Dim warnings As msfirm_db_stl.Warning() = Nothing
Dim reportHistoryParameters As msfirm_db_stl.ParameterValue() = Nothing
Dim streamIDs As String() = Nothing
Dim sh As New msfirm_db_stl.SessionHeader
rs.SessionHeaderValue = sh

Try
result = rs.Render(reportPath, format, historyID, devInfo, parameters, credentials, showHideToggle, encoding, mimeType, reportHistoryParameters, warnings, streamIDs)
sh.SessionId = rs.SessionHeaderValue.SessionId
Catch ex As SoapException

End Try
'' Write the contents of the report to an MHTML file.
Try
Response.Buffer = True
Select Case Me.ReportFormat
Case "EXCEL"
Response.ContentType = "application/vnd.ms-excel"
Case "HTML4.0", "HTMLOWC"
Response.ContentType = "text/html"
Case "PDF"
Response.ContentType = "Application/PDF"
End Select

'Response.AddHeader("Content-Disposition", "attachment;filename=" & Me.ReportName & ".pdf")
Response.BinaryWrite(result)
Catch ex As Exception

End Try
End Sub

Rendering Report in PDF

Hi,
I was just wondering if anyone can tell me is it possible to set a
report to automatically appear in PDF when ran?
Thanks,
Lisause reporting services URL parameters
"lisa" wrote:
> Hi,
> I was just wondering if anyone can tell me is it possible to set a
> report to automatically appear in PDF when ran?
> Thanks,
> Lisa
>

Rendering problem in PDF and TIFF

using ssrs 2005 I have a report that looks fine in the preview and in mhtml. But in Tiff and PDF it page ejects and takes another blank page and an eject prior to printing a textbox. The textbox is as wide as the page width (I have made it narrower and played around with the height in the layout envirnoment to no avail) and the data is a varchar(8000) with about 700 characters in it in this instance. The report also takes an extra page eject at the end when in PDF or Tiff format.

I have not objects in the report that are overlapping and there are no warnings.

What could be causing this behavior.

Regards,

Gary

I'm really not sure what you mean by "page eject". Do you mean that there are unwanted blank pages between the other pages of your report?

The usable width of the page is the Page Width minus the left and right margins. If you report Body is greater than the usable width, an extra page may occur. Can you check to make sure that you're accounting for the margins when usable page width?

Thanks,
Chris

|||

This textbox prints about 3/4 way down the page in the priview and in mhtml and other formats except PDF and TIFF. In PDF and TIFF instead of printing where it is supposed to it leave the rest of the page blank, skips another entire page(2nd page is blank), and then prints at the top of the third page.

Thanks for replying.

Gary

Rendering Problem in PDF and Tiff

using ssrs 2005 I have a report that looks fine in the preview and in mhtml.
But in Tiff and PDF it page ejects and takes another blank page and an eject
prior to printing a textbox. The textbox is as wide as the page width (I
have made it narrower and played around with the height in the layout
envirnoment to no avail) and the data is a varchar(8000) with about 700
characters in it in this instance. The report also takes an extra page
eject at the end when in PDF or Tiff format.
I have not objects in the report that are overlapping and there are no
warnings.
What could be causing this behavior.
Regards,
GaryHi Gary,
Thank you for your posting!
Based on the behavior, I think this issue is most related with your report
design. I would like to get your report file so that I could figure out the
root cause. I understand the information may be sensitive to you, my direct
email address is weilu@.ONLINE.microsoft.com (Please remove the ONLINE when
you send the email), you may send the file to me directly and I will keep
it secure.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Wei.
I sent you an email with the files attached. It seems my report always
takes an extra page eject even when it's only one page. I don't think the
page is too long.
Gary
"Wei Lu [MSFT]" <weilu@.online.microsoft.com> wrote in message
news:fkSRWABnGHA.2024@.TK2MSFTNGXA01.phx.gbl...
> Hi Gary,
> Thank you for your posting!
> Based on the behavior, I think this issue is most related with your report
> design. I would like to get your report file so that I could figure out
> the
> root cause. I understand the information may be sensitive to you, my
> direct
> email address is weilu@.ONLINE.microsoft.com (Please remove the ONLINE when
> you send the email), you may send the file to me directly and I will keep
> it secure.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Can you share with us how you have solved this issue
From http://www.developmentnow.com/g/115_2006_6_0_0_781457/Rendering-Problem-in-PDF-and-Tiff.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com

Rendering PDF missing pages

i had rendered a report and created a excel file and each page of the 2-page
report generate a sheet in the workbook, which is great now i rendered the
same report in PDF, the PDF only generates one page instead of the expected 2
pages. What am I doing wrong?
Please help.
FYI. Using C# in a window form.Hi Nkem
I hade the same problem, but solved with service pack1 or SP2
"Nkem" wrote:
> i had rendered a report and created a excel file and each page of the 2-page
> report generate a sheet in the workbook, which is great now i rendered the
> same report in PDF, the PDF only generates one page instead of the expected 2
> pages. What am I doing wrong?
> Please help.
> FYI. Using C# in a window form.

Rendering PDF format in Chinese character.

Hi,
I have used render method to render the data from data source to PDF format
in chinese character by using MS Gothic font family, but few character in
chinese words are printing as @. symbol.(ie. that character which has single
cote embeded)
Help is requried to print chinese character correctly in PDF format.
Did i need to set any other font family to print chinese character correctly
in PDF? Which font family help in printing chinese character correctly in PDF
file?.
Thanks in advance for the helpers.
Regards,
AnithaHi,
I got the solution, i had set MingLiU font family instead of MS Gothic, now
its working fine.
"Anitha Naidu" wrote:
> Hi,
> I have used render method to render the data from data source to PDF format
> in chinese character by using MS Gothic font family, but few character in
> chinese words are printing as @. symbol.(ie. that character which has single
> cote embeded)
> Help is requried to print chinese character correctly in PDF format.
> Did i need to set any other font family to print chinese character correctly
> in PDF? Which font family help in printing chinese character correctly in PDF
> file?.
> Thanks in advance for the helpers.
> Regards,
> Anitha
>

rendering pdf files with expressions in header or footer

I have a quite complex report with a header and footer (displays on every
page) that must be renedered as pdf. In the body I have a table within a
list. This works well and is relatively quick with SP1. However if I add any
expression to a field in the header or footer the pdf file takes 4 minutes
to generate (vs 10s without the expression). For instance, if I add the page
number to the header it will take 4 minutes to generate. I have not
experienced this problem with any other report. Any idea what is causing
this?
ThanksA bit more info on this. I've discovered that it only happens where I have a
table within a list and the grouping on the list is done on a field with a
large number of records. It renders fine in html, but it adds up to 4
minutes for the pdf generation. If I remove the expression from the header
it is fine. If I add a textbox with a value of ABCDEF - no problem. But if I
change that to ="ABCDEF" - very slow pdf generation.
Thanks
"Werner van der Merwe" <wernerv@.nvisionit.co.za> wrote in message
news:egWT8fKcEHA.3988@.tk2msftngp13.phx.gbl...
> I have a quite complex report with a header and footer (displays on every
> page) that must be renedered as pdf. In the body I have a table within a
> list. This works well and is relatively quick with SP1. However if I add
any
> expression to a field in the header or footer the pdf file takes 4 minutes
> to generate (vs 10s without the expression). For instance, if I add the
page
> number to the header it will take 4 minutes to generate. I have not
> experienced this problem with any other report. Any idea what is causing
> this?
>
> Thanks
>