Showing posts with label printing. Show all posts
Showing posts with label printing. Show all posts

Friday, March 23, 2012

Problems with report fitting to a page when exporting and then printing from Excel

I have various reports in both portrait and landscape and when I export to Excel although the page orientation works correctly the report does not print correctly in that the right hand side of the report gets chopped.

In the report definition I have all the margins set to 0.5cm and the page height set to 29.7cm and the width to 21cm for portrait and the other way around for landscape. In designing my report I have a report width 1cm less to take account of the margins i.e. 28.7 for a landscape report and 20cm for a portrait report. The report is defined in all this space as I have lines in my header and footer than span the whole report width.

If I am doing my calculations above correctly I cannot see why the report does not fit to a page when exporting to Excel. Printing directly from the browser or PDF works fine.

Thanks in advance for any help.

Excel has its own print mechanism. Do a print preview of the report in Excel before printing.

My guess would be that Excel is adding its own margins.

|||

The print margins in Excel are exactly the same as I defined in the report 0.5cm on all sides so that does not look like Excel is having any problems getting the margin information.

|||

Yes, you can call a com object from Microsoft.Office.Interop.Excel and redesign the workbook the example code is here:

yo need the file in Excel (*.xls) this is the "FinalFileName"

Imports:
Excel = Microsoft.Office.Interop.Excel

Code:

Dim app As New Excel.Application
Dim wb As Excel.Workbook
Dim fs As System.IO.FileStream
Dim writer As System.IO.BinaryWriter
fs = New System.IO.FileStream(FinalFileName, System.IO.FileMode.Create, FileAccess.Write, FileShare.ReadWrite)
Dim writer As System.IO.BinaryWriter
fs.Close()
fs.Dispose()
app.DisplayAlerts = False
wb = appp.Workbooks.Open(Finalfile)
With CType(wb.Worksheets(1), Excel.Worksheet).PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.CenterHorizontally = True
.CenterVertically = True
.Draft = False
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
End With
wb.PrintOut()
wb.Unprotect()
appp.Workbooks.Close()
appp.Quit()
fs.Close()
fs.Dispose()

Problems with report fitting to a page when exporting and then printing from Excel

I have various reports in both portrait and landscape and when I export to Excel although the page orientation works correctly the report does not print correctly in that the right hand side of the report gets chopped.

In the report definition I have all the margins set to 0.5cm and the page height set to 29.7cm and the width to 21cm for portrait and the other way around for landscape. In designing my report I have a report width 1cm less to take account of the margins i.e. 28.7 for a landscape report and 20cm for a portrait report. The report is defined in all this space as I have lines in my header and footer than span the whole report width.

If I am doing my calculations above correctly I cannot see why the report does not fit to a page when exporting to Excel. Printing directly from the browser or PDF works fine.

Thanks in advance for any help.

Excel has its own print mechanism. Do a print preview of the report in Excel before printing.

My guess would be that Excel is adding its own margins.

|||

The print margins in Excel are exactly the same as I defined in the report 0.5cm on all sides so that does not look like Excel is having any problems getting the margin information.

|||

Yes, you can call a com object from Microsoft.Office.Interop.Excel and redesign the workbook the example code is here:

yo need the file in Excel (*.xls) this is the "FinalFileName"

Imports:
Excel = Microsoft.Office.Interop.Excel

Code:

Dim app As New Excel.Application
Dim wb As Excel.Workbook
Dim fs As System.IO.FileStream
Dim writer As System.IO.BinaryWriter
fs = New System.IO.FileStream(FinalFileName, System.IO.FileMode.Create, FileAccess.Write, FileShare.ReadWrite)
Dim writer As System.IO.BinaryWriter
fs.Close()
fs.Dispose()
app.DisplayAlerts = False
wb = appp.Workbooks.Open(Finalfile)
With CType(wb.Worksheets(1), Excel.Worksheet).PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.CenterHorizontally = True
.CenterVertically = True
.Draft = False
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
End With
wb.PrintOut()
wb.Unprotect()
appp.Workbooks.Close()
appp.Quit()
fs.Close()
fs.Dispose()

sql

Problems with PrintOut Method

Hi everybody,

I'm having problems printing several reports after another, e.g. printing from a Loop...

My Code looks like this:

Dim newrep_b as new crep_order_xxx

For i = 0 To rssammel.Recordcount
On Error GoTo 0
newrep_b.ordereinzel = 1
newrep_b.bebrals_id = lsarray(i)
newrep_b.Hide
newrep_b.Report.SelectPrinter "TallyT8004", "", ""
newrep_b.Report.PrintOut (False)
Unload newrep_b
Set newrep_b = Nothing
Next

Lets say I have 5 Records in rssammel...

The First Report gets printed, the second too, but the third one and all reports after are NOT printed...

"PrintOut" raises the error: "Run Time Error '-2147417848': Method 'PrintOut' of object 'crep_order_xxx' failed"

And now the REALLY strange thing...

If I put breakpoints into my code (on the PrintOut - Line), and step through the Loop "by hand" (using F8 in VB-IDE), everything works like a charm...
Without the breakpoint I get the error from above, but the first 2 Reports are getting printed fine...

Does anybody have an idea why CR / VB raises that error ? Is it some kind of timing-problem, or perhaps the Print-Spooler is getting filled too fast ??

Greetings and many thanks for your help in advance !

FusseltierOh, i just saw i forgot some important information in my first post:

I'm using VB 5 Enterprise and CR 8.5...

:)

Greetings
Fusseltier

Problems with Printing and rendering to PDF

Hi,

I have an SQL server 2000 and I am creating a simple 1 page report using the Reporting Services and Visual Studio 2003. Everything is working fine. When I on "Preview" or when I access the report using a URL to disply it in HTML, I get a perfect report.

However, when I click on the "Print Preview" Icon (in the Preview Tab), or when I Render it as PDF, something goes wrong and it divides the report in 2 pages. On the first, there is only the company logo and the outlines of the tables used, while the rest of the report (minus the logo) is on the second page! I tried removing the logo, but still got a first page with only the outlines of tables. I also tried increasing the margins, with no success! I even tried removing some of the tables from the report, and test it, also the same result! could it be the datasets?

Did anybody get this problem? What could possibly be the reason?

Thanks a lot

Bob

Yes, the only way that I was able to stop this from happening was to reduce the margin size in the report properties.|||

Thx

yes it was the margins of the report that did this, especially the left and right margins.

sql

Problems with Printing and rendering to PDF

Hi,

I have an SQL server 2000 and I am creating a simple 1 page report using the Reporting Services and Visual Studio 2003. Everything is working fine. When I on "Preview" or when I access the report using a URL to disply it in HTML, I get a perfect report.

However, when I click on the "Print Preview" Icon (in the Preview Tab), or when I Render it as PDF, something goes wrong and it divides the report in 2 pages. On the first, there is only the company logo and the outlines of the tables used, while the rest of the report (minus the logo) is on the second page! I tried removing the logo, but still got a first page with only the outlines of tables. I also tried increasing the margins, with no success! I even tried removing some of the tables from the report, and test it, also the same result! could it be the datasets?

Did anybody get this problem? What could possibly be the reason?

Thanks a lot

Bob

Yes, the only way that I was able to stop this from happening was to reduce the margin size in the report properties.|||

Thx

yes it was the margins of the report that did this, especially the left and right margins.

Wednesday, March 21, 2012

Problems with performance when programmatically printing large amounts of pages

We are using VB.NET 2005 to develop a WinForms application that uses SQL Server 2005 Reporting Services to produce reports.

Originally we tried using code found on Bryan's WebLog, http://blogs.msdn.com/bryanke/articles/71491.aspx, but found that for reports of 300 pages it was taking about 2 minutes to render each page.

When using RenderStream to render idividual pages, reports of about 20 pages printed without a problem, but for reports of 300 pages we recieved the follwoing error:

"The stream cannot be found. The stream identifier that is provided to an operation cannot be located in the report server database."

Is there some cache or something that we should be using? Any ideas appreciated.

-- Leah

The rendering code:

Public Function RenderReport(ByVal reportPath As String) As Byte()()

Dim deviceInfo As String = Nothing
Dim format As String = "IMAGE"
Dim firstPage As Byte() = Nothing
Dim encoding As String = ""
Dim mimeType As String = ""
Dim warnings As Warning() = Nothing
Dim reportHistoryParameters As ParameterValue() = Nothing
Dim streamIDs As String() = Nothing
Dim pages As Byte()() = Nothing

deviceInfo = String.Format("<DeviceInfo><OutputFormat>{0}</OutputFormat>{1}</DeviceInfo>", "emf", m_strDeviceInfo)

Try

firstPage = m_reportingService.Render(reportPath, format, Nothing, deviceInfo, m_parameterValues, Nothing, Nothing, encoding, mimeType, reportHistoryParameters, warnings, streamIDs)

m_numberOfPages = streamIDs.Length + 1
ReDim pages(m_numberOfPages - 1)
Dim iIndex As Integer = 0
pages(0) = firstPage
Dim pageIndex As Integer = 1

For pageIndex = 1 To m_numberOfPages - 1

' original page rendering from Bryan's blog
'deviceInfo = String.Format("<DeviceInfo><OutputFormat>{0}</OutputFormat><StartPage>{1}</StartPage{2}</DeviceInfo>", "emf", pageIndex + 1, m_strDeviceInfo)
'pages(pageIndex) = m_reportingService.Render(reportPath, format, Nothing, deviceInfo, m_parameterValues, Nothing, Nothing, encoding, mimeType, reportHistoryParameters, warnings, streamIDs)

' Attempt using streams, indexing in to pull back pages in order
iIndex = Convert.ToInt32(streamIDs(pageIndex - 1).Substring(streamIDs(pageIndex - 1).LastIndexOf("_"c) + 1))
pages(iIndex - 1) = m_reportingService.RenderStream(reportPath, format, streamIDs(pageIndex - 1), Nothing, deviceInfo, m_parameterValues, encoding, mimeType)

Next pageIndex

Catch ex As SoapException

m_strErrorMessage = ex.Message

Catch ex As Exception

m_strErrorMessage = ex.Message

End Try

Return pages

End Function

The best way to get streams for printing is to use URL access to render the report. Generate the url and for your first request pass in the first and last page page number (or nothing if you want all pages), as well as rs:PersistStreams=True. Then continue calling render with the same url only instead of passing rs:PersistStreams=True, pass in rs:GetNextStream=True. Do this until you get back an empty response.

Your first url should look like this:

http://<machinename>/ReportServer?<path to report>&<report params in format name=value>&rs:Command=Render&rs:format=IMAGE&rc:OutputFormat=emf&rc:StartPage=1&rc:EndPage=300&rc:PageWidth=11.0in&rc:PageHeight=8.500in&rc:MarginTop=6.350mm&rc:MarginBottom=6.350mm&rc:MarginLeft=6.350mm&rc:MarginRight=6.350mm&rs:PersistStream=True

This will cause Report Server to Render the entire report on the first request and then server back each page on subsequent request untill all pages have been exhausted. Your current code is attempting to render the entire report on each request which will take forever on large reports.

I hope that helps.

|||

Thanks for the reply.

This approach is very different to what we are doing (which as you say, was taking forever).

Could you give more information on how to use the url? Is it part of the web service?

|||

If you browse to http://<machine>/ReportServer, you are doing what is call Url access. That is viewing report items via a url (as opposed to using a SOAP call). To do this in you app, create a web request object and set the url to the one mentioned above. You can then send the request and read the response stream to get the data.

Look at the following msdn articles for creating and using web requests:

http://msdn2.microsoft.com/en-us/library/bw00b1dc.aspx

http://msdn2.microsoft.com/en-us/library/system.net.httpwebrequest.aspx

The code will be very similiar to your current code, since the SOAP proxy just wraps a WebRequest object. You need to set the url and the Credentials property to make sure you are properly authenticated.

I hope that helps.

|||

So there was no way to get the RenderStream code I posted above to work? :)

It is just that since it was tested as working with good performance for reports up to 100 pages. I thought there was some persistance / cache thing I might have been missing to make it work for large reports.

I will look through the links you provided. Will post back.

|||

Unable to get this to work (see below). My preference would be to be able to use the webservice.

In the meantime I have found some code on CodeProject that print a generated PDF. I will look at using this to get users going.

Thanks,
Leah

--
Details of problem with URL access

Code adapted from the links and related help topics.

Tested the code generated URL (strCreateUrl ) by pasting it into a browser and found we had a one page emf.

The ReceiveStream generated could not be indexed. To print using WinForms model we need a stream that we can index for page by page printing.

Code:
Dim strCreateUrl As String = "http://myServer/ReportServer?/myReportPath"
Dim myEnumerator As IEnumerator = m_parameterValues.GetEnumerator
Dim aParameterValue As ParameterValue

While myEnumerator.MoveNext()
aParameterValue = CType(myEnumerator.Current, ParameterValue)
strCreateUrl += "&" + aParameterValue.Name + "=" + aParameterValue.Value
End While

strCreateUrl += "&rs:Command=Render&rs:format=IMAGE&rc:OutputFormat=emf&rc:StartPage=1&rc:PageWidth=11.0in&rc:PageHeight=8.500in&rc:MarginTop=6.350mm&rc:MarginBottom=6.350mm&rc:MarginLeft=6.350mm&rc:MarginRight=6.350mm&rs:PersistStream=True"

Dim myRequest As System.Net.WebRequest = System.Net.WebRequest.Create(strCreateUrl)
myRequest.Credentials = System.Net.CredentialCache.DefaultCredentials

' Return the response.
Dim myResponse As System.Net.HttpWebResponse = CType(myRequest.GetResponse(), System.Net.HttpWebResponse)
Dim ReceiveStream As Stream = myResponse.GetResponseStream()

|||

Your code looks right, the problem you state is because you only call it once. Each call will only get you one page. Your next call should replace PersistStream=True with GetNextStream=True. You continue calling with GetNextStream=True until the response stream is empty. You can store each response as you would like (in the print control we actually store the response in temp files in case there are many pages).

I hope this helps.

|||

Do you have any sample code for this?

I have tried to quickly write code that will read through the next streams but I do not know how to detect the last stream.

Thanks,
Leah

__
Code attemp:

Dim strCreateUrl As String = http://myServer/ReportServer?/myReport
Dim myEnumerator As IEnumerator = m_parameterValues.GetEnumerator
Dim aParameterValue As ParameterValue

While myEnumerator.MoveNext()
aParameterValue = CType(myEnumerator.Current, ParameterValue)
strCreateUrl += "&" + aParameterValue.Name + "=" + aParameterValue.Value
End While

strCreateUrl += "&rs:Command=Render&rs:format=IMAGE&rc:OutputFormat=emf&rc:StartPage=1&rc:PageWidth=11.0in&rc:PageHeight=8.500in&rc:MarginTop=6.350mm&rc:MarginBottom=6.350mm&rc:MarginLeft=6.350mm&rc:MarginRight=6.350mm"

' call first page with persist as true
Dim myRequest As System.Net.WebRequest = System.Net.WebRequest.Create(strCreateUrl + "&rs:PersistStream=True")
myRequest.Credentials = System.Net.CredentialCache.DefaultCredentials

' Return the response.
Dim myResponse As System.Net.HttpWebResponse = CType(myRequest.GetResponse(), System.Net.HttpWebResponse)
Dim ReceiveStream As Stream = myResponse.GetResponseStream()

Dim iPageCounter As Integer = 0

While True

Try
myRequest = System.Net.WebRequest.Create(strCreateUrl + "&rs:GetNextStream=True")
ReceiveStream = myResponse.GetResponseStream()

If ReceiveStream Is Nothing Then
Exit While
End If

iPageCounter += 1
Catch ex As Exception
Exit While
End Try

End While

' Close the response to free resources.
myResponse.Close()

|||I don't have code in front of me to reference, but I believe all you need to check for is ReceiveStream.Length == 0.|||

Thanks for your answer.

Using ReceiveStream.Length == 0 caused an exception.

In the autos window the RecieveStream length property is shown as:
- Length {"This stream does not support seek operations."} Long

RecieveStream is actually of type System.Net.ConnectStream.

If you think Length property should work... do you think I should I cast the RecieveStream?

|||Ahh, trying to do this from memory is not working. :) Ok, one more try. If you read the stream, it should not have any length. I will try and dig up some code tomorrow.|||

Update on status.

Still have not gotten the URL Access technique (as suggested by Daniel) to work.

Further testing of the RenderStream approach shows that it can work on reports up to 240 pages, reports larger then this fail with follwoing SOAP Exception: "The stream cannot be found. The stream identifier that is provided to an operation cannot be located in the report server database"

Another team here has decided to use the RenderStream solution in their applicaiton because it appears to work for reports below 100 pages (100 pages is their largest report). My concern with this approach is that the reports do not appear to be consistantly persisting.

As a temporary fix for the applicaiton I am working on I have implemented a print solution that will render a PDF to file and create a process that uses Adobe to Print to the default printer.

Just writing this update I have had come up with some more ideas to try. I will let you know how I go. In the meantime if you can come up with more details on how you got the URL Access printing working it would be much appreciated. :)


_
Render Stream implementation (extract of code psoted in first post on this thread)

For pageIndex = 1 To m_numberOfPages - 1

' Attempt using streams, indexing in to pull back pages in order
iIndex = Convert.ToInt32(streamIDs(pageIndex - 1).Substring(streamIDs(pageIndex - 1).LastIndexOf("_"c) + 1))
pages(iIndex - 1) = m_reportingService.RenderStream(reportPath, format, streamIDs(pageIndex - 1), Nothing, deviceInfo, m_parameterValues, encoding, mimeType)

Next pageIndex

|||

Here is code I use to get the response:

responseLength = (int) response.ContentLength; // -1 means content length not sent so we must get the size.

if (responseLength == -1)

{

responseLength = 0;

using (Stream stream = response.GetResponseStream())

{

const int readSize = 64 * 1024;

int amountRead = 0;

byte[] input = new byte[readSize];

do

{

amountRead = stream.Read(input, 0, readSize);

responseLength += amountRead;

} while (amountRead > 0);

}

}

|||

Thanks for posting this code.

I am trying to work out where this fits in. I am assuming that your code is used to work out the amount of bytes in the stream so you can read the bytes in the stream into a page array of byte arrays. So your code would be used inside a loop which will GetNextStream while there are still pages.

Could you let me know if I am on the right track?

Thanks,
Leah


Code first draft (not working)

' call first page with persist as true
Dim myRequest As System.Net.WebRequest = System.Net.WebRequest.Create(strCreateUrl + "&rs:PersistStream=True")

myRequest.Credentials = System.Net.CredentialCache.DefaultCredentials

' Return the response.
Dim myResponse As System.Net.HttpWebResponse = CType(myRequest.GetResponse(), System.Net.HttpWebResponse)

While True

Try

Dim responseLength As Integer = CInt(myResponse.ContentLength) ' -1 means content length not sent so we must get the size.

If responseLength = -1 Then
responseLength = 0

' Using
Dim stream As Stream = myResponse.GetResponseStream
Try
Const readSize As Integer = 64 * 1024
Dim amountRead As Integer = 0
Dim input(readSize) As Byte

Do
amountRead = stream.Read(input, 0, readSize)
responseLength += amountRead
Loop While amountRead > 0

Finally
CType(stream, IDisposable).Dispose()
End Try

End If

' TO DO: add code here to read the amountRead of bytes into my page array of byte arrays

myRequest = System.Net.WebRequest.Create(strCreateUrl + "&rs:GetNextStream=True")
'myResponse = CType(myRequest.GetResponse(), System.Net.HttpWebResponse)

Catch ex As Exception
Exit While
End Try

End While

myResponse.Close()

|||

You don't need the TODO. You are already reading in the data. I should have explained that the sample I gave, did not care about the content (it was from a test) it only cared about the length. The code is throwing away the data currently.

So if the ContentLength is set, just create a byte array of the correct size, then do a single read to get the data. If not, in the loop you are reading the data, just store it where you want.

You exit the loop when responseLength is zero.

I hope that helps.

Wednesday, March 7, 2012

Problems with C# Sample to Print Reports

I am having permission problems with the sample report printing program from
Bryan Keller. (http://www.csharphelp.com/archives3/archive545.html)
The DefaultCredentials from the CredentialCache certainly has no data, and I
don't seem to be able to get valid data into the cache
Not sure about the relative path of the report either. I am running against
my own report, since I don't have the samples installed. I am using:
/Report Project1/118-2 as a path.
Don't know if that is correct, but that is what I see when I run it in the
browser. Except the '/' char turns into %2F, and the space into a '+'.
So it's %2FReport+Project1%2F118-2 in the browser.
Has anybody else tried this sample program with their own reports?
GerhardThe path of a report is relative to the root on the Report
Server.
So in the Report Manager if you see your report , lets say
report1 under the folder Report Project1 then the path of
your report is Report Project1/report1.
>--Original Message--
>I am having permission problems with the sample report
printing program from
>Bryan Keller.
(http://www.csharphelp.com/archives3/archive545.html)
>The DefaultCredentials from the CredentialCache certainly
has no data, and I
>don't seem to be able to get valid data into the cache
>Not sure about the relative path of the report either. I
am running against
>my own report, since I don't have the samples installed.
I am using:
>/Report Project1/118-2 as a path.
>Don't know if that is correct, but that is what I see
when I run it in the
>browser. Except the '/' char turns into %2F, and the
space into a '+'.
>So it's %2FReport+Project1%2F118-2 in the browser.
>Has anybody else tried this sample program with their own
reports?
>Gerhard
>
>.
>|||Ok, thanks, Ravi, that makes sense.
What about the DefaultCredentials? There are null strings for user/pw and
domain right now.
How do I get my domain credentials into the cache?
Gerhard
"Ravi" <anonymous@.discussions.microsoft.com> wrote in message
news:253e01c48e1e$c8cae640$a601280a@.phx.gbl...
> The path of a report is relative to the root on the Report
> Server.
> So in the Report Manager if you see your report , lets say
> report1 under the folder Report Project1 then the path of
> your report is Report Project1/report1.
> >--Original Message--
> >I am having permission problems with the sample report
> printing program from
> >Bryan Keller.
> (http://www.csharphelp.com/archives3/archive545.html)
> >
> >The DefaultCredentials from the CredentialCache certainly
> has no data, and I
> >don't seem to be able to get valid data into the cache
> >
> >Not sure about the relative path of the report either. I
> am running against
> >my own report, since I don't have the samples installed.
> I am using:
> >/Report Project1/118-2 as a path.
> >Don't know if that is correct, but that is what I see
> when I run it in the
> >browser. Except the '/' char turns into %2F, and the
> space into a '+'.
> >So it's %2FReport+Project1%2F118-2 in the browser.
> >
> >Has anybody else tried this sample program with their own
> reports?
> >
> >Gerhard
> >
> >
> >.
> >|||Ok, got the path and credentials problem solved. I can elaborated if it
will help others.
Path is: /folder/report
Credentials is: rs.Credentials = new
NetworkCredential("user","pw","domain")
DefaultCredentials may work if you're on a Lan, I'm on a VPN.
But now the question is: How do I pass parameters, as part of the URL? And
syntax?
Yeah I know, I'm a pain. <g> Sorry, this is all hitting me a little fast
too.
Gerhard
"Ravi" <anonymous@.discussions.microsoft.com> wrote in message
news:253e01c48e1e$c8cae640$a601280a@.phx.gbl...
> The path of a report is relative to the root on the Report
> Server.
> So in the Report Manager if you see your report , lets say
> report1 under the folder Report Project1 then the path of
> your report is Report Project1/report1.
> >--Original Message--
> >I am having permission problems with the sample report
> printing program from
> >Bryan Keller.
> (http://www.csharphelp.com/archives3/archive545.html)
> >
> >The DefaultCredentials from the CredentialCache certainly
> has no data, and I
> >don't seem to be able to get valid data into the cache
> >
> >Not sure about the relative path of the report either. I
> am running against
> >my own report, since I don't have the samples installed.
> I am using:
> >/Report Project1/118-2 as a path.
> >Don't know if that is correct, but that is what I see
> when I run it in the
> >browser. Except the '/' char turns into %2F, and the
> space into a '+'.
> >So it's %2FReport+Project1%2F118-2 in the browser.
> >
> >Has anybody else tried this sample program with their own
> reports?
> >
> >Gerhard
> >
> >
> >.
> >|||> Has anybody else tried this sample program with their own reports?
After making modifications for credencials I have used this code
successfully. Thursday I will try running it as a assembly from a web
page - we shall see. Looks good.
dlr
"Gerhard Paulman" <gerhardp@.inch.com> wrote in message
news:%23M$IbFejEHA.3428@.TK2MSFTNGP11.phx.gbl...
> I am having permission problems with the sample report printing program
from
> Bryan Keller. (http://www.csharphelp.com/archives3/archive545.html)
> The DefaultCredentials from the CredentialCache certainly has no data, and
I
> don't seem to be able to get valid data into the cache
> Not sure about the relative path of the report either. I am running
against
> my own report, since I don't have the samples installed. I am using:
> /Report Project1/118-2 as a path.
> Don't know if that is correct, but that is what I see when I run it in the
> browser. Except the '/' char turns into %2F, and the space into a '+'.
> So it's %2FReport+Project1%2F118-2 in the browser.
> Has anybody else tried this sample program with their own reports?
> Gerhard
>