Wednesday, March 7, 2012
repairing damaged sql server MDF and LDF files
thing happen and I wondered if anyone has used it (I
posted this as a topic)...it's called MSSQLRECOVERY 2.0
and can be found at www.mssqlrecovery.com
Kevin
>--Original Message--
>Hi All,
>My SQL server's data files all corrupted during a severe
power failure, we manage to get back the data files and
reinstall the sql server. but unforunately we failed to
attaching the database back to the server. The error
message indicating it is caused by corrupted MDF or LDF
files.
>Is there a way to perform a file level repair before we
can attach it back to sql server again ?
>Any help is very much appreciated.
>Bernard Gh
>.
>
Hi there,
We have tried that, but the result isn't impressive for us (2 tables out of 20+), perhaps the corruption is too servere for our case. but you can try your luck.
what other program have you tried ?
Bernard goh
"Kevin" wrote:
> I found this program on the web...we just had the same
> thing happen and I wondered if anyone has used it (I
> posted this as a topic)...it's called MSSQLRECOVERY 2.0
> and can be found at www.mssqlrecovery.com
> Kevin
>
> power failure, we manage to get back the data files and
> reinstall the sql server. but unforunately we failed to
> attaching the database back to the server. The error
> message indicating it is caused by corrupted MDF or LDF
> files.
> can attach it back to sql server again ?
>
repairing damaged sql server MDF and LDF files
thing happen and I wondered if anyone has used it (I
posted this as a topic)...it's called MSSQLRECOVERY 2.0
and can be found at www.mssqlrecovery.com
Kevin
>--Original Message--
>Hi All,
>My SQL server's data files all corrupted during a severe
power failure, we manage to get back the data files and
reinstall the sql server. but unforunately we failed to
attaching the database back to the server. The error
message indicating it is caused by corrupted MDF or LDF
files.
>Is there a way to perform a file level repair before we
can attach it back to sql server again ?
>Any help is very much appreciated.
>Bernard Gh
>.
>Hi there,
We have tried that, but the result isn't impressive for us (2 tables out of
20+), perhaps the corruption is too servere for our case. but you can try yo
ur luck.
what other program have you tried ?
--
Bernard goh
"Kevin" wrote:
> I found this program on the web...we just had the same
> thing happen and I wondered if anyone has used it (I
> posted this as a topic)...it's called MSSQLRECOVERY 2.0
> and can be found at www.mssqlrecovery.com
> Kevin
>
>
> power failure, we manage to get back the data files and
> reinstall the sql server. but unforunately we failed to
> attaching the database back to the server. The error
> message indicating it is caused by corrupted MDF or LDF
> files.
> can attach it back to sql server again ?
>
Monday, February 20, 2012
RENDERSTREAM - What am I doing wrong?
So far, pretty good, but I can't seem to make RENDERSTREAM Work.
Do you have any idea what is wrong with this code?
The error I get is that RenderStream can not find the stream...
RenderedReport = myReportService.Render
(myReport, Format, HistoryID, DeviceInfo, myParameters, Credentials,
ShowHideToggle, Encoding, MimeType, UsedParameters, Warnings, StreamIDs)
For Each streamid As String In StreamIDs
RenderedStreams = myReportService.RenderStream _
(myReport, Format, streamid, Nothing, Nothing, Nothing,
Nothing, Nothing)
My DEVINFO for the RENDER is
DeviceInfo = "<DeviceInfo>"
DeviceInfo += "<HTMLFragment>True</HTMLFragment>"
DeviceInfo += "<Parameters>False</Parameters>"
DeviceInfo += "<Toolbar>False</Toolbar>"
DeviceInfo += "<StreamRoot>/" + Session("RSFolder") +
"/resources/</StreamRoot>"
DeviceInfo += "</DeviceInfo>"
Thanks.IraD wrote:
> I'm writing my own app that calls the RS Web Service.
> So far, pretty good, but I can't seem to make RENDERSTREAM Work.
> Do you have any idea what is wrong with this code?
> The error I get is that RenderStream can not find the stream...
Ira..
Try this:
Dim result As Byte() = Nothing
Dim image As Byte()
result = rs.Render(path, format, historyID, deviceInfo, parameters, Nothing,
Nothing, encoding, _
mimeType, parametersUsed, warnings, streamIds)
Select Case format
Case "HTML4.0", "HTML3.2"
' render stream for each image and save to disk
Dim stream As System.IO.FileStream
For Each streamid As String In streamIds
Dim encodingImage As String
Dim mimeTypeImage As String
image = rs.RenderStream(path, format, streamid, Nothing, Nothing,
parameters, encodingImage, mimeTypeImage)
stream = System.IO.File.OpenWrite(Server.MapPath("./Temp") & "\" &
streamid)
stream.Write(image, 0, CInt(image.Length))
stream.Close()
Next
Dim enc As System.Text.Encoding = System.Text.Encoding.UTF8
ReportPlaceholder.InnerHtml = enc.GetString(result)
Case Else
Response.ClearContent()
Response.AppendHeader("content-length", result.Length.ToString())
Response.ContentType = mimeType
Response.BinaryWrite(result)
Response.Flush()
Response.Close()
End Select|||Frank,
Much closer. My error was that I did not pass the "parameters" argument
correctly to RENDERSTREAM. I had NOTHING, now that I have sent along the
parameters, renderstream works.
But I don't understand the reportplaceholder.innerhtml statement. What I
now see on my screen is a box that looks like it wants to hold my chart - but
it doesn't have it. Do I have to send the results of renderstream to the
response object as well as the results of the render?
Thanks.
"Frank Matthiesen" wrote:
> IraD wrote:
> > I'm writing my own app that calls the RS Web Service.
> > So far, pretty good, but I can't seem to make RENDERSTREAM Work.
> >
> > Do you have any idea what is wrong with this code?
> > The error I get is that RenderStream can not find the stream...
> Ira..
> Try this:
> Dim result As Byte() = Nothing
> Dim image As Byte()
> result = rs.Render(path, format, historyID, deviceInfo, parameters, Nothing,
> Nothing, encoding, _
> mimeType, parametersUsed, warnings, streamIds)
>
> Select Case format
> Case "HTML4.0", "HTML3.2"
> ' render stream for each image and save to disk
> Dim stream As System.IO.FileStream
> For Each streamid As String In streamIds
> Dim encodingImage As String
> Dim mimeTypeImage As String
> image = rs.RenderStream(path, format, streamid, Nothing, Nothing,
> parameters, encodingImage, mimeTypeImage)
> stream = System.IO.File.OpenWrite(Server.MapPath("./Temp") & "\" &
> streamid)
> stream.Write(image, 0, CInt(image.Length))
> stream.Close()
> Next
> Dim enc As System.Text.Encoding = System.Text.Encoding.UTF8
> ReportPlaceholder.InnerHtml = enc.GetString(result)
> Case Else
> Response.ClearContent()
> Response.AppendHeader("content-length", result.Length.ToString())
> Response.ContentType = mimeType
> Response.BinaryWrite(result)
> Response.Flush()
> Response.Close()
> End Select
>
>|||IraD wrote:
> But I don't understand the reportplaceholder.innerhtml statement.
> What I
> now see on my screen is a box that looks like it wants to hold my
> chart - but it doesn't have it. Do I have to send the results of
> renderstream to the response object as well as the results of the
> render?
PlaceHolder is declared on aspx-page
Send me your mail-adress...i will send you the files with full code.
regards
Frank|||Much appreciated: IDOBROW@.AIB.ORG
"IraD" wrote:
> I'm writing my own app that calls the RS Web Service.
> So far, pretty good, but I can't seem to make RENDERSTREAM Work.
> Do you have any idea what is wrong with this code?
> The error I get is that RenderStream can not find the stream...
> RenderedReport = myReportService.Render
> (myReport, Format, HistoryID, DeviceInfo, myParameters, Credentials,
> ShowHideToggle, Encoding, MimeType, UsedParameters, Warnings, StreamIDs)
> For Each streamid As String In StreamIDs
> RenderedStreams = myReportService.RenderStream _
> (myReport, Format, streamid, Nothing, Nothing, Nothing,
> Nothing, Nothing)
> My DEVINFO for the RENDER is
> DeviceInfo = "<DeviceInfo>"
> DeviceInfo += "<HTMLFragment>True</HTMLFragment>"
> DeviceInfo += "<Parameters>False</Parameters>"
> DeviceInfo += "<Toolbar>False</Toolbar>"
> DeviceInfo += "<StreamRoot>/" + Session("RSFolder") +
> "/resources/</StreamRoot>"
> DeviceInfo += "</DeviceInfo>"
> Thanks.
Rendering URL in EXCEL format
Hi Everyone,
I am trying to diaply my report on the web form by pasting the URL
in ReportViewer1.ReportPath = " " inside the codes. My URL is
/web
Test/FirstReport&rs:Command=Render&rs:Format=HTML4.0&rc:Toolbar=false
It is working fine and diaplying the report, but when I change the
Format to Excel. It does not display the report properly. It gives me
an error that report cannot be found. Same thing with PDF, when I
change the format to PDF. IT gives me the same error.
"There was error opening the file. File does not exist". In excel
format if I save the file. The file is saved but when I want to open
the file from save/open dialog box it does not display properly.
Can anyone please let me know what the problem is.
Thanks,
Hi,
Excel rendering has been a problem since the Reporting Services is used.
With the retail version some versions was not supported. SP1 added some new supported versions. And SP2 is adding more.
You may be running into such a problem.
SP2 will support Excel 97 and later versions.
SP1 supports Excel 10 (Office 2002) or later
Eralper
http://www.kodyaz.com
Rendering true Excel
the web application's rendering of reports in Excel mode are not true
Excel, but rather still retain HTML. Has anyone else experienced this?
I have included my rendering code snippet below:
--
try
{
data = render.RunReport(ConfigurationSettings.AppSettings[ePledgeConstants.REPORT_SERVER_URL_PROPERTY],
fullReportName, reportParameters, format, out
encoding,
out mimeType, out parametersUsed, out warnings,
out streamIds);
Response.Clear();
Response.ContentType = mimeType;
string fileName = report.Name +
GetFileExtension(mimeType);
if (mimeType != "text/html")
{
Response.AddHeader("Content-Disposition",
"attachment; filename=" + fileName);
}
switch(encoding)
{
case "Unicode (UTF-8)":
Response.ContentEncoding = new UTF8Encoding();
break;
case "Unicode (UTF-7)":
Response.ContentEncoding = new UTF7Encoding();
break;
default:
Response.ContentEncoding = new UTF8Encoding();
break;
}
Response.BinaryWrite(data);
}
catch (Exception exception)
{
Console.Out.Write(exception.ToString());
}
---
The run report method in turn is like this:
---
public byte[] RunReport(string ServerUrl, string ReportName,
ParameterValue[] parameters, string Format, out string encoding, out
string mimeType, out ParameterValue[] parametersUsed, out Warning[]
warnings, out string[] streamIds)
{
ReportingService rs = new ReportingService();
rs.Timeout = -1;
rs.Url = ServerUrl;
rs.Credentials = new NetworkCredential(UserName, Password);
return rs.Render(ReportName, Format, null, null, parameters, null,
null, out encoding, out mimeType, out parametersUsed, out warnings,
out streamIds);
}Have you deployed Reporting Services SP1. In SP1, we output native XLS.
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bryon" <blape@.whittmanhart.com> wrote in message
news:OVl$MrGGFHA.2932@.TK2MSFTNGP15.phx.gbl...
> My users are complaining that the Excel files they are getting back from
> the web application's rendering of reports in Excel mode are not true
> Excel, but rather still retain HTML. Has anyone else experienced this? I
> have included my rendering code snippet below:
> --
> try
> {
> data => render.RunReport(ConfigurationSettings.AppSettings[ePledgeConstants.REPORT_SERVER_URL_PROPERTY],
> fullReportName, reportParameters, format, out
> encoding,
> out mimeType, out parametersUsed, out warnings, out
> streamIds);
> Response.Clear();
> Response.ContentType = mimeType;
> string fileName = report.Name +
> GetFileExtension(mimeType);
> if (mimeType != "text/html")
> {
> Response.AddHeader("Content-Disposition",
> "attachment; filename=" + fileName);
> }
> switch(encoding)
> {
> case "Unicode (UTF-8)":
> Response.ContentEncoding = new UTF8Encoding();
> break;
> case "Unicode (UTF-7)":
> Response.ContentEncoding = new UTF7Encoding();
> break;
> default:
> Response.ContentEncoding = new UTF8Encoding();
> break;
> }
> Response.BinaryWrite(data);
> }
> catch (Exception exception)
> {
> Console.Out.Write(exception.ToString());
> }
> ---
> The run report method in turn is like this:
> ---
> public byte[] RunReport(string ServerUrl, string ReportName,
> ParameterValue[] parameters, string Format, out string encoding, out
> string mimeType, out ParameterValue[] parametersUsed, out Warning[]
> warnings, out string[] streamIds)
> {
> ReportingService rs = new ReportingService();
> rs.Timeout = -1;
> rs.Url = ServerUrl;
> rs.Credentials = new NetworkCredential(UserName, Password);
> return rs.Render(ReportName, Format, null, null, parameters, null,
> null, out encoding, out mimeType, out parametersUsed, out warnings, out
> streamIds);
> }|||Lukasz Pawlowski [MSFT] wrote:
> Have you deployed Reporting Services SP1. In SP1, we output native XLS.
> -Lukasz
>
Yes I have.
An interesting side note to this problem is that on a Mac, it only sees
the HTML, never the Excel information. In Windows, the file looks like
Excel, but does not save as Excel.
Also, is there a way to display gridlines? The Excel comes back as
Excel for the web and does not have gridlines by default.|||Grid lines are based on how you designed your report. If you created for
example a table with inner boarders, you should see grid lines.
Are you supplying any device info parameters to your excel rendering?
-Lukasz
This posting is provided "AS IS" with no warranties, and confers no rights.
"Bryon" <blape@.whittmanhart.com> wrote in message
news:%23ynRKTHGFHA.128@.TK2MSFTNGP14.phx.gbl...
> Lukasz Pawlowski [MSFT] wrote:
>> Have you deployed Reporting Services SP1. In SP1, we output native XLS.
>> -Lukasz
>>
> Yes I have.
> An interesting side note to this problem is that on a Mac, it only sees
> the HTML, never the Excel information. In Windows, the file looks like
> Excel, but does not save as Excel.
> Also, is there a way to display gridlines? The Excel comes back as Excel
> for the web and does not have gridlines by default.|||Lukasz Pawlowski [MSFT] wrote:
> Grid lines are based on how you designed your report. If you created for
> example a table with inner boarders, you should see grid lines.
> Are you supplying any device info parameters to your excel rendering?
> -Lukasz
>
I'm not sure what you mean by device parameters.
Rendering reports using SOAP API vsURL Addressing
I have been developing a reporting services application and have had to rely
on rendering using the web service API.
Before I go any further let me explain why we are going this way instead
of using URL addressing.
The client has a couple of reports where the selection criteria can get quite
long and in the past has exceeded the number of characters allowed in the
querystring. This will obvious cause the eport gen to fail.
Ok now that the background is over, here are some things I hope to find out.
First, is there anyway to use the URL addressing via POSTing the variables
to the report server or do all params have to be in the querystring?
Next, since I do not think the POSTing will work, is there any way with SP2
or a hot fix that there is a way to get the total number of pages in a report
that is rendered to HTML? I have found two hacks out there so far. First
the suggestion of rendering the entire report via the API then counting the
number of <HR> tags to ge tthe total number of pages. The second method,
found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_intro_7vqa.asp,
suggests to render the first page of the report as an image then get the
length + 1 of the streamId's parameter.
The first method, may work but I cant imagine it would be good on reports
where there is 50 or 60 pages. The second method does not seem to work for
us. When we fire the code against a report that has two pages it gives us
back a streamId.Length of 5.
Finally, I can not imagine that I am the only one that has had the issue
of not being able to call URL address to get my report due to param length.
Has anyone else encountered this and if so how did they get around it.
Thanks for any guidance,
RichPOST should work.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Rich" <rich@.online.nospam> wrote in message
news:923159632507411681250000@.msnews.microsoft.com...
> Hello,
> I have been developing a reporting services application and have had to
> rely on rendering using the web service API.
> Before I go any further let me explain why we are going this way instead
> of using URL addressing.
> The client has a couple of reports where the selection criteria can get
> quite long and in the past has exceeded the number of characters allowed
> in the querystring. This will obvious cause the eport gen to fail.
> Ok now that the background is over, here are some things I hope to find
> out.
> First, is there anyway to use the URL addressing via POSTing the variables
> to the report server or do all params have to be in the querystring?
> Next, since I do not think the POSTing will work, is there any way with
> SP2 or a hot fix that there is a way to get the total number of pages in a
> report that is rendered to HTML? I have found two hacks out there so far.
> First the suggestion of rendering the entire report via the API then
> counting the number of <HR> tags to ge tthe total number of pages. The
> second method, found here:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_prog_intro_7vqa.asp,
> suggests to render the first page of the report as an image then get the
> length + 1 of the streamId's parameter.
> The first method, may work but I cant imagine it would be good on reports
> where there is 50 or 60 pages. The second method does not seem to work
> for us. When we fire the code against a report that has two pages it
> gives us back a streamId.Length of 5.
> Finally, I can not imagine that I am the only one that has had the issue
> of not being able to call URL address to get my report due to param
> length. Has anyone else encountered this and if so how did they get around
> it.
> Thanks for any guidance,
> Rich
>
>|||I wrote a dumb little function to get the page count... not the most
efficient, but does the job: if you find out a better way of doing it
(supported fully by rs), let me know?
private int FindNumOfPages(string input)
{
string blah = input;
int counter = 1;
int end = blah.Length;
int start = 0;
int at = 0;
int count = 0;
while (start <= end && at > -1)
{
count = end - start;
at = blah.IndexOf("<hr/>", start, count);
if (at == -1)
break;
else
{
counter++;
start = at+1;
}
}
return counter;
}
--
Foober
"Rich" wrote:
> Thanks. So what about my other questions such as getting page count from
> RS API.
> Also if posting works, will the toolbar render correctly? In other words
> will the toolbar just post ot the next page or wil it try to put all the
> params on the querystring.
> Thanks for any additional information.
> Rich
> Hello Lev Semenets [MSFT],
> > POST should work.
> >
> > "Rich" <rich@.online.nospam> wrote in message
> > news:923159632507411681250000@.msnews.microsoft.com...
> >
> >> Hello,
> >>
> >> I have been developing a reporting services application and have had
> >> to
> >> rely on rendering using the web service API.
> >> Before I go any further let me explain why we are going this way
> >> instead
> >> of using URL addressing.
> >> The client has a couple of reports where the selection criteria can
> >> get
> >> quite long and in the past has exceeded the number of characters
> >> allowed
> >> in the querystring. This will obvious cause the eport gen to fail.
> >> Ok now that the background is over, here are some things I hope to
> >> find
> >> out.
> >> First, is there anyway to use the URL addressing via POSTing the
> >> variables to the report server or do all params have to be in the
> >> querystring?
> >>
> >> Next, since I do not think the POSTing will work, is there any way
> >> with
> >>
> >> SP2 or a hot fix that there is a way to get the total number of pages
> >> in a
> >>
> >> report that is rendered to HTML? I have found two hacks out there so
> >> far.
> >>
> >> First the suggestion of rendering the entire report via the API then
> >>
> >> counting the number of <HR> tags to ge tthe total number of pages.
> >> The
> >>
> >> second method, found here:
> >>
> >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rspr
> >> og/htm/rsp_prog_intro_7vqa.asp,
> >>
> >> suggests to render the first page of the report as an image then get
> >> the
> >>
> >> length + 1 of the streamId's parameter.
> >>
> >> The first method, may work but I cant imagine it would be good on
> >> reports
> >>
> >> where there is 50 or 60 pages. The second method does not seem to
> >> work
> >>
> >> for us. When we fire the code against a report that has two pages it
> >>
> >> gives us back a streamId.Length of 5.
> >>
> >> Finally, I can not imagine that I am the only one that has had the
> >> issue
> >>
> >> of not being able to call URL address to get my report due to param
> >>
> >> length. Has anyone else encountered this and if so how did they get
> >> around
> >>
> >> it.
> >>
> >> Thanks for any guidance,
> >>
> >> Rich
> >>
>
>|||That method sounds a lot better than my method :) Better than rendering the
ENTIRE report first, counting horizontal rules, and then rerendering page 1.
I'll implement that instead.
I saw a post *somewhere* that microsoft was aware of the issue and were
looking into a fix in a "future release". Maybe in SQL2005?
--
Foober
"Rich" wrote:
> Hello Foober,
> Thanks for posting this solution. Here is what I ended up coming up with
> regarding a solution. I added a parameter on the report called "ShowpageCount
> set it to a boolean type with a default of false. I then created a textbox
> whose value was set to "~*" & Globals!TotalPages & "*~". Then I set the
> property of the Hidden to "Not Parameters!ShowPages". So now when I want
> the pages on the report, I can call into this report via the api and set
> the showPages param. I then take the rendered stream and regex it for the
> ~*<number>*~ token somewhere (I dont care where) in the stream and pull that
> number. I then turn around and call the report again without setting that
> param. A hack...yes. Best thing I could thinki of so I did not have to
> render what could be a 60 page report.
> Let me know what you thik of this idea. I just wonder....did they at least
> fix this for us in the new version?
>
> > I wrote a dumb little function to get the page count... not the most
> > efficient, but does the job: if you find out a better way of doing it
> > (supported fully by rs), let me know?
> >
> > private int FindNumOfPages(string input)
> > {
> > string blah = input;
> > int counter = 1;
> > int end = blah.Length;
> > int start = 0;
> > int at = 0;
> > int count = 0;
> > while (start <= end && at > -1)
> > {
> > count = end - start;
> > at = blah.IndexOf("<hr/>", start, count);
> > if (at == -1)
> > break;
> > else
> > {
> > counter++;
> > start = at+1;
> > }
> > }
> > return counter;
> > }
> > "Rich" wrote:
> >
> >> Thanks. So what about my other questions such as getting page count
> >> from RS API.
> >>
> >> Also if posting works, will the toolbar render correctly? In other
> >> words will the toolbar just post ot the next page or wil it try to
> >> put all the params on the querystring.
> >>
> >> Thanks for any additional information.
> >>
> >> Rich
> >>
> >> Hello Lev Semenets [MSFT],
> >>
> >> POST should work.
> >>
> >> "Rich" <rich@.online.nospam> wrote in message
> >> news:923159632507411681250000@.msnews.microsoft.com...
> >> Hello,
> >>
> >> I have been developing a reporting services application and have
> >> had
> >> to
> >> rely on rendering using the web service API.
> >> Before I go any further let me explain why we are going this way
> >> instead
> >> of using URL addressing.
> >> The client has a couple of reports where the selection criteria can
> >> get
> >> quite long and in the past has exceeded the number of characters
> >> allowed
> >> in the querystring. This will obvious cause the eport gen to fail.
> >> Ok now that the background is over, here are some things I hope to
> >> find
> >> out.
> >> First, is there anyway to use the URL addressing via POSTing the
> >> variables to the report server or do all params have to be in the
> >> querystring?
> >> Next, since I do not think the POSTing will work, is there any way
> >> with
> >>
> >> SP2 or a hot fix that there is a way to get the total number of
> >> pages in a
> >>
> >> report that is rendered to HTML? I have found two hacks out there
> >> so far.
> >>
> >> First the suggestion of rendering the entire report via the API
> >> then
> >>
> >> counting the number of <HR> tags to ge tthe total number of pages.
> >> The
> >>
> >> second method, found here:
> >>
> >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rs
> >> pr og/htm/rsp_prog_intro_7vqa.asp,
> >>
> >> suggests to render the first page of the report as an image then
> >> get the
> >>
> >> length + 1 of the streamId's parameter.
> >>
> >> The first method, may work but I cant imagine it would be good on
> >> reports
> >>
> >> where there is 50 or 60 pages. The second method does not seem to
> >> work
> >>
> >> for us. When we fire the code against a report that has two pages
> >> it
> >>
> >> gives us back a streamId.Length of 5.
> >>
> >> Finally, I can not imagine that I am the only one that has had the
> >> issue
> >>
> >> of not being able to call URL address to get my report due to param
> >>
> >> length. Has anyone else encountered this and if so how did they get
> >> around
> >>
> >> it.
> >>
> >> Thanks for any guidance,
> >>
> >> Rich
> >>
>
>
Rendering Reports to Web Application Interactive Features
available to internet users).
(Windows Authentication now but can be change to Form authentication)
To let outside users to view the report through internet, I create a asp.net
page to render the report: [Product Line Sales]
You can see here:
http://207.14.208.161/UnicareReport/frmImage.aspx
There is a linked report [Employee Sales Summary]: when click the [Employee
Name], ie [Jang, Stephen] in the above report, it should go to the linked
report: [Employee Sales Summary].
The problem is:
(1) How to also render the linked report in asp.net pages to allow internet
users click the [Employee Name] in the above report to go to the linked
report?
(2) The real problem is: How to pass the parameter value in the report
[Product Line Sales] (ie, enp id=20, etc) in the asp.net page to go to the
linked report [Employee Sales Summary].
(it's easy to do in the report designer in VS 2003: jump to URL or Report:
but the linked report in the report server [Unicube] is not availablre to
internet users).I found the solution:
http://207.14.208.161/UnicareReport/frmImage.aspx
You can click the Employee Name such as [Caro, Fernando],[Ito, Shu] to view
the linked report.
My solution is:
(1) First render the first report [Product Line Sales] on the web use render
method:
(You can see the code on RS BOOK ONLINE: ReportingService.Render Method
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_ref_soapapi_service_lz_6x0z.asp )
For my example, the report rendered on The ASP.Net page frmImage.aspx
(2) Change the [jumpe to report] to [Jump to URL] in report [Product Line
Sales]
then deploy the report on Report Server:
For my example, the [jump to URL] Code is:
="http://207.14.208.161/UnicareReport/ESS.aspx?EmpID="&Fields!EmployeeID.Value
&""
(You need to change it to your web site domain/directory setting)
(3)Render the linked report [Product Line Sales] on the web use render
method
You have to render the 2 linked report [Employee Sales Summary] on webpage:
My ASP.net page is ESS.aspx:
Note:
To pass the parameter you can use request.querystring method, for example,
' Prepare report parameter.
Dim parameters(2) As ParameterValue
Dim EMPIDV As String
EMPIDV = Request.QueryString("EmpID")
parameters(0) = New ParameterValue
parameters(0).Name = "EmpID"
parameters(0).Value = EMPIDV
parameters(1) = New ParameterValue
parameters(1).Name = "ReportMonth"
parameters(1).Value = "6" ' June
parameters(2) = New ParameterValue
parameters(2).Name = "ReportYear"
parameters(2).Value = "2004"
"John Chen" <jchen@.uneriercarecorp.com> wrote in message
news:ewjry75tEHA.2072@.tk2msftngp13.phx.gbl...
>I installed RS on a Windows 2003 Server: [Unicube] (inside our network, not
>available to internet users).
> (Windows Authentication now but can be change to Form authentication)
> To let outside users to view the report through internet, I create a
> asp.net page to render the report: [Product Line Sales]
> You can see here:
> http://207.14.208.161/UnicareReport/frmImage.aspx
> There is a linked report [Employee Sales Summary]: when click the
> [Employee Name], ie [Jang, Stephen] in the above report, it should go to
> the linked report: [Employee Sales Summary].
> The problem is:
> (1) How to also render the linked report in asp.net pages to allow
> internet users click the [Employee Name] in the above report to go to the
> linked report?
> (2) The real problem is: How to pass the parameter value in the report
> [Product Line Sales] (ie, enp id=20, etc) in the asp.net page to go to the
> linked report [Employee Sales Summary].
> (it's easy to do in the report designer in VS 2003: jump to URL or Report:
> but the linked report in the report server [Unicube] is not availablre to
> internet users).
>
>|||Correct:
(3)Render the linked report [Employee Sales Summary] on another webpage:
My ASP.net page is ESS.aspx:
Note:
To pass the parameter you can use request.querystring method, for example,
' Prepare report parameter.
Dim parameters(2) As ParameterValue
Dim EMPIDV As String
EMPIDV = Request.QueryString("EmpID")
parameters(0) = New ParameterValue
parameters(0).Name = "EmpID"
parameters(0).Value = EMPIDV
parameters(1) = New ParameterValue
parameters(1).Name = "ReportMonth"
parameters(1).Value = "6" ' June
parameters(2) = New ParameterValue
parameters(2).Name = "ReportYear"
parameters(2).Value = "2004"
"John Chen" <jchen@.uneriercarecorp.com> wrote in message
news:eJWU8JEuEHA.348@.tk2msftngp13.phx.gbl...
>I found the solution:
> http://207.14.208.161/UnicareReport/frmImage.aspx
> You can click the Employee Name such as [Caro, Fernando],[Ito, Shu] to
> view the linked report.
> My solution is:
> (1) First render the first report [Product Line Sales] on the web use
> render method:
> (You can see the code on RS BOOK ONLINE: ReportingService.Render Method
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_ref_soapapi_service_lz_6x0z.asp )
> For my example, the report rendered on The ASP.Net page frmImage.aspx
> (2) Change the [jumpe to report] to [Jump to URL] in report [Product Line
> Sales]
> then deploy the report on Report Server:
> For my example, the [jump to URL] Code is:
> ="http://207.14.208.161/UnicareReport/ESS.aspx?EmpID="&Fields!EmployeeID.Value
> &""
> (You need to change it to your web site domain/directory setting)
> (3)Render the linked report [Product Line Sales] on the web use render
> method
> You have to render the 2 linked report [Employee Sales Summary] on
> webpage:
> My ASP.net page is ESS.aspx:
> Note:
> To pass the parameter you can use request.querystring method, for example,
> ' Prepare report parameter.
> Dim parameters(2) As ParameterValue
> Dim EMPIDV As String
> EMPIDV = Request.QueryString("EmpID")
> parameters(0) = New ParameterValue
> parameters(0).Name = "EmpID"
> parameters(0).Value = EMPIDV
> parameters(1) = New ParameterValue
> parameters(1).Name = "ReportMonth"
> parameters(1).Value = "6" ' June
> parameters(2) = New ParameterValue
> parameters(2).Name = "ReportYear"
> parameters(2).Value = "2004"
>
> "John Chen" <jchen@.uneriercarecorp.com> wrote in message
> news:ewjry75tEHA.2072@.tk2msftngp13.phx.gbl...
>>I installed RS on a Windows 2003 Server: [Unicube] (inside our network,
>>not available to internet users).
>> (Windows Authentication now but can be change to Form authentication)
>> To let outside users to view the report through internet, I create a
>> asp.net page to render the report: [Product Line Sales]
>> You can see here:
>> http://207.14.208.161/UnicareReport/frmImage.aspx
>> There is a linked report [Employee Sales Summary]: when click the
>> [Employee Name], ie [Jang, Stephen] in the above report, it should go to
>> the linked report: [Employee Sales Summary].
>> The problem is:
>> (1) How to also render the linked report in asp.net pages to allow
>> internet users click the [Employee Name] in the above report to go to the
>> linked report?
>> (2) The real problem is: How to pass the parameter value in the report
>> [Product Line Sales] (ie, enp id=20, etc) in the asp.net page to go to
>> the linked report [Employee Sales Summary].
>> (it's easy to do in the report designer in VS 2003: jump to URL or
>> Report: but the linked report in the report server [Unicube] is not
>> availablre to internet users).
>>
>>
>
Rendering Reports to Web Application
Reporting Service in it.
I can render a report to a page from my application. The problem is the if a
report has links to other reports then those links send you strait to Report
Service site and not back to my application.
Is there a way out of this?
Thanks,
ShimonShimon,
I assume that your application:
1. Renders reports by SOAP on the server side of the application.
2. By report links to the Report Service site you mean reports are requested
by URL but you want them to redirect to your application.
If the above is correct, can you replace those links with your page URL?
--
Hope this helps.
---
Teo Lachev, MVP [SQL Server], MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
---
"Shimon Sim" <estshim@.att.net> wrote in message
news:uuxWcSssEHA.904@.TK2MSFTNGP11.phx.gbl...
> I have Web application and I am trying to integrate Reports from SQL
> Reporting Service in it.
> I can render a report to a page from my application. The problem is the if
a
> report has links to other reports then those links send you strait to
Report
> Service site and not back to my application.
> Is there a way out of this?
> Thanks,
> Shimon
>|||I am using ASP.NET and I was trying to figure out if I can use RS for our
project. I have form based security access for my ASP.NET application.
Besides that we have role based application check that is custom
implemented. Window based security of RS is a big issue and I am trying to
get around it.
I saw the article that you sent me to about ASPNET account. Some how it just
doesn't work on my machine.
If pass account of local administrator with name and password it does work
on my machine.
The issue with link is following
I report doesn't have drill down, drill through or charts - anything that
requires links for working works fine. But if I have chart - picture is
missing, if I have drill done + then I am sent to regular site
MYSERVER/Reports... and of cause if user doesn't have proper windows account
he is denied. The same thing with drill through - links to other reports-
they send me to wrong page.
I don't know how to replace link.
This is the code that I am using:
private void Page_Load(object sender, System.EventArgs e)
{
string path=Request.Params["Path"];
string format=Request.Params["Format"];
// Create service
ReportingService rs=new WebReports.ReportingService.ReportingService();
System.Net.NetworkCredential nwc=new
System.Net.NetworkCredential("MyName","pass","server");
rs.Credentials=nwc;
ParameterValue[] parameters=new ParameterValue[0];
string encoding;
string mimeType;
ParameterValue[] parametersUsed;
Warning[] warnings;
string[] streamIds;
//render the report
byte[] data;
data=rs.Render(path,format, null,null,parameters,null,null,
out encoding, out mimeType, out parametersUsed, out warnings, out
streamIds);
string extension=this.GetExtension(mimeType); //this is just a private
function to get
//an extension for the mimeType
string reportName=path.Substring(path.LastIndexOf("/")+1);
string fileName=reportName+"."+extension;
//write report back to response object
Response.Clear();
Response.ContentType=mimeType;
//add the file name to the response if it is not a web browser format
if(mimeType!="text/html")
Response.AddHeader("Content-Disposition","attachment;filename=" + fileName);
Response.BinaryWrite(data);
}
(I got it from a book)
I don't see any way to control links.
Can you help?
Shimon.
"Teo Lachev [MVP]" <teo.lachev@.nospam.prologika.com> wrote in message
news:O3mwG1xsEHA.3972@.TK2MSFTNGP15.phx.gbl...
> Shimon,
> I assume that your application:
> 1. Renders reports by SOAP on the server side of the application.
> 2. By report links to the Report Service site you mean reports are
> requested
> by URL but you want them to redirect to your application.
> If the above is correct, can you replace those links with your page URL?
> --
> Hope this helps.
> ---
> Teo Lachev, MVP [SQL Server], MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com: http://shrinkster.com/eq
> Home page and blog: http://www.prologika.com/
> ---
> "Shimon Sim" <estshim@.att.net> wrote in message
> news:uuxWcSssEHA.904@.TK2MSFTNGP11.phx.gbl...
>> I have Web application and I am trying to integrate Reports from SQL
>> Reporting Service in it.
>> I can render a report to a page from my application. The problem is the
>> if
> a
>> report has links to other reports then those links send you strait to
> Report
>> Service site and not back to my application.
>> Is there a way out of this?
>> Thanks,
>> Shimon
>>
>|||This happens because the report interactive features require direct access
to the Report Server by URL and there is no way around it. Basically, you
have two approaches:
1. Render the reports on the server side of the application by calling the
Render SOAP API.
- Pros: better security since the report URL cannot be intercepted by
the end user.
- Cons: the reports CANNOT have interactive features since they rely on
URL addressability, you have to take extra steps to handle report images and
the presenting the report to the end user. If you take the SOAP approach,
you may find the enchanced version of the ReportViewer control ( can be
downloaded from the publisher website) useful.
2. Replace the Windows-based security with custom security.
- Pros: you can authenticate and authorize the users any way you want
including integrating RS with your web application.
- Cons: Development effort required.
--
Hope this helps.
---
Teo Lachev, MVP [SQL Server], MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
---
"Shimon Sim" <estshim@.att.net> wrote in message
news:eARiBe%23sEHA.3324@.TK2MSFTNGP15.phx.gbl...
> I am using ASP.NET and I was trying to figure out if I can use RS for our
> project. I have form based security access for my ASP.NET application.
> Besides that we have role based application check that is custom
> implemented. Window based security of RS is a big issue and I am trying to
> get around it.
> I saw the article that you sent me to about ASPNET account. Some how it
just
> doesn't work on my machine.
> If pass account of local administrator with name and password it does
work
> on my machine.
> The issue with link is following
> I report doesn't have drill down, drill through or charts - anything that
> requires links for working works fine. But if I have chart - picture is
> missing, if I have drill done + then I am sent to regular site
> MYSERVER/Reports... and of cause if user doesn't have proper windows
account
> he is denied. The same thing with drill through - links to other reports-
> they send me to wrong page.
> I don't know how to replace link.
> This is the code that I am using:
> private void Page_Load(object sender, System.EventArgs e)
> {
> string path=Request.Params["Path"];
> string format=Request.Params["Format"];
> // Create service
> ReportingService rs=new WebReports.ReportingService.ReportingService();
> System.Net.NetworkCredential nwc=new
> System.Net.NetworkCredential("MyName","pass","server");
> rs.Credentials=nwc;
> ParameterValue[] parameters=new ParameterValue[0];
> string encoding;
> string mimeType;
> ParameterValue[] parametersUsed;
> Warning[] warnings;
> string[] streamIds;
> //render the report
> byte[] data;
> data=rs.Render(path,format, null,null,parameters,null,null,
> out encoding, out mimeType, out parametersUsed, out warnings, out
> streamIds);
> string extension=this.GetExtension(mimeType); //this is just a private
> function to get
> //an extension for the mimeType
> string reportName=path.Substring(path.LastIndexOf("/")+1);
> string fileName=reportName+"."+extension;
> //write report back to response object
> Response.Clear();
> Response.ContentType=mimeType;
> //add the file name to the response if it is not a web browser format
> if(mimeType!="text/html")
> Response.AddHeader("Content-Disposition","attachment;filename=" +
fileName);
> Response.BinaryWrite(data);
> }
> (I got it from a book)
> I don't see any way to control links.
> Can you help?
> Shimon.
>
> "Teo Lachev [MVP]" <teo.lachev@.nospam.prologika.com> wrote in message
> news:O3mwG1xsEHA.3972@.TK2MSFTNGP15.phx.gbl...
> > Shimon,
> >
> > I assume that your application:
> > 1. Renders reports by SOAP on the server side of the application.
> > 2. By report links to the Report Service site you mean reports are
> > requested
> > by URL but you want them to redirect to your application.
> >
> > If the above is correct, can you replace those links with your page URL?
> >
> > --
> > Hope this helps.
> >
> > ---
> > Teo Lachev, MVP [SQL Server], MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ---
> >
> > "Shimon Sim" <estshim@.att.net> wrote in message
> > news:uuxWcSssEHA.904@.TK2MSFTNGP11.phx.gbl...
> >> I have Web application and I am trying to integrate Reports from SQL
> >> Reporting Service in it.
> >> I can render a report to a page from my application. The problem is the
> >> if
> > a
> >> report has links to other reports then those links send you strait to
> > Report
> >> Service site and not back to my application.
> >>
> >> Is there a way out of this?
> >>
> >> Thanks,
> >> Shimon
> >>
> >>
> >
> >
>|||Thank you for the answer. I will go through all the approaches before making
final decision.
Just how do I replace Windows security.Can I work with it as any ASP.NET
application - changing config file and publishing my pages? Can I use code
behind files?
Thanks,
Shimon.
"Teo Lachev [MVP]" <teo.lachev@.nospam.prologika.com> wrote in message
news:uCm08WJtEHA.2808@.TK2MSFTNGP14.phx.gbl...
> This happens because the report interactive features require direct access
> to the Report Server by URL and there is no way around it. Basically, you
> have two approaches:
> 1. Render the reports on the server side of the application by calling the
> Render SOAP API.
> - Pros: better security since the report URL cannot be intercepted by
> the end user.
> - Cons: the reports CANNOT have interactive features since they rely on
> URL addressability, you have to take extra steps to handle report images
> and
> the presenting the report to the end user. If you take the SOAP approach,
> you may find the enchanced version of the ReportViewer control ( can be
> downloaded from the publisher website) useful.
> 2. Replace the Windows-based security with custom security.
> - Pros: you can authenticate and authorize the users any way you want
> including integrating RS with your web application.
> - Cons: Development effort required.
> --
> Hope this helps.
> ---
> Teo Lachev, MVP [SQL Server], MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com: http://shrinkster.com/eq
> Home page and blog: http://www.prologika.com/
> ---
> "Shimon Sim" <estshim@.att.net> wrote in message
> news:eARiBe%23sEHA.3324@.TK2MSFTNGP15.phx.gbl...
>> I am using ASP.NET and I was trying to figure out if I can use RS for our
>> project. I have form based security access for my ASP.NET application.
>> Besides that we have role based application check that is custom
>> implemented. Window based security of RS is a big issue and I am trying
>> to
>> get around it.
>> I saw the article that you sent me to about ASPNET account. Some how it
> just
>> doesn't work on my machine.
>> If pass account of local administrator with name and password it does
> work
>> on my machine.
>> The issue with link is following
>> I report doesn't have drill down, drill through or charts - anything that
>> requires links for working works fine. But if I have chart - picture is
>> missing, if I have drill done + then I am sent to regular site
>> MYSERVER/Reports... and of cause if user doesn't have proper windows
> account
>> he is denied. The same thing with drill through - links to other reports-
>> they send me to wrong page.
>> I don't know how to replace link.
>> This is the code that I am using:
>> private void Page_Load(object sender, System.EventArgs e)
>> {
>> string path=Request.Params["Path"];
>> string format=Request.Params["Format"];
>> // Create service
>> ReportingService rs=new WebReports.ReportingService.ReportingService();
>> System.Net.NetworkCredential nwc=new
>> System.Net.NetworkCredential("MyName","pass","server");
>> rs.Credentials=nwc;
>> ParameterValue[] parameters=new ParameterValue[0];
>> string encoding;
>> string mimeType;
>> ParameterValue[] parametersUsed;
>> Warning[] warnings;
>> string[] streamIds;
>> //render the report
>> byte[] data;
>> data=rs.Render(path,format, null,null,parameters,null,null,
>> out encoding, out mimeType, out parametersUsed, out warnings, out
>> streamIds);
>> string extension=this.GetExtension(mimeType); //this is just a private
>> function to get
>> //an extension for the mimeType
>> string reportName=path.Substring(path.LastIndexOf("/")+1);
>> string fileName=reportName+"."+extension;
>> //write report back to response object
>> Response.Clear();
>> Response.ContentType=mimeType;
>> //add the file name to the response if it is not a web browser format
>> if(mimeType!="text/html")
>> Response.AddHeader("Content-Disposition","attachment;filename=" +
> fileName);
>> Response.BinaryWrite(data);
>> }
>> (I got it from a book)
>> I don't see any way to control links.
>> Can you help?
>> Shimon.
>>
>> "Teo Lachev [MVP]" <teo.lachev@.nospam.prologika.com> wrote in message
>> news:O3mwG1xsEHA.3972@.TK2MSFTNGP15.phx.gbl...
>> > Shimon,
>> >
>> > I assume that your application:
>> > 1. Renders reports by SOAP on the server side of the application.
>> > 2. By report links to the Report Service site you mean reports are
>> > requested
>> > by URL but you want them to redirect to your application.
>> >
>> > If the above is correct, can you replace those links with your page
>> > URL?
>> >
>> > --
>> > Hope this helps.
>> >
>> > ---
>> > Teo Lachev, MVP [SQL Server], MCSD, MCT
>> > Author: "Microsoft Reporting Services in Action"
>> > Publisher website: http://www.manning.com/lachev
>> > Buy it from Amazon.com: http://shrinkster.com/eq
>> > Home page and blog: http://www.prologika.com/
>> > ---
>> >
>> > "Shimon Sim" <estshim@.att.net> wrote in message
>> > news:uuxWcSssEHA.904@.TK2MSFTNGP11.phx.gbl...
>> >> I have Web application and I am trying to integrate Reports from SQL
>> >> Reporting Service in it.
>> >> I can render a report to a page from my application. The problem is
>> >> the
>> >> if
>> > a
>> >> report has links to other reports then those links send you strait to
>> > Report
>> >> Service site and not back to my application.
>> >>
>> >> Is there a way out of this?
>> >>
>> >> Thanks,
>> >> Shimon
>> >>
>> >>
>> >
>> >
>>
>|||Shimon,
A good place to start with RS custom security is the Forms Authentication
white paper by Microsoft
(http://msdn.microsoft.com/library/?url=/library/en-us/dnsql2k/html/ufairs.a
sp?frame=true#ufairs_topic3).
Custom security (a.k.a Forms Authentication) has been discussed in this
forum on many occasions. So, please be sure to check the forum to understand
the pros and cons before you decide whether you want to go for it.
--
Hope this helps.
---
Teo Lachev, MVP [SQL Server], MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
---
"Shimon Sim" <estshim@.att.net> wrote in message
news:uPURWOKtEHA.2560@.tk2msftngp13.phx.gbl...
> Thank you for the answer. I will go through all the approaches before
making
> final decision.
> Just how do I replace Windows security.Can I work with it as any ASP.NET
> application - changing config file and publishing my pages? Can I use code
> behind files?
> Thanks,
> Shimon.
> "Teo Lachev [MVP]" <teo.lachev@.nospam.prologika.com> wrote in message
> news:uCm08WJtEHA.2808@.TK2MSFTNGP14.phx.gbl...
> > This happens because the report interactive features require direct
access
> > to the Report Server by URL and there is no way around it. Basically,
you
> > have two approaches:
> >
> > 1. Render the reports on the server side of the application by calling
the
> > Render SOAP API.
> > - Pros: better security since the report URL cannot be intercepted by
> > the end user.
> > - Cons: the reports CANNOT have interactive features since they rely
on
> > URL addressability, you have to take extra steps to handle report images
> > and
> > the presenting the report to the end user. If you take the SOAP
approach,
> > you may find the enchanced version of the ReportViewer control ( can be
> > downloaded from the publisher website) useful.
> >
> > 2. Replace the Windows-based security with custom security.
> > - Pros: you can authenticate and authorize the users any way you want
> > including integrating RS with your web application.
> > - Cons: Development effort required.
> >
> > --
> > Hope this helps.
> >
> > ---
> > Teo Lachev, MVP [SQL Server], MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ---
> >
> > "Shimon Sim" <estshim@.att.net> wrote in message
> > news:eARiBe%23sEHA.3324@.TK2MSFTNGP15.phx.gbl...
> >> I am using ASP.NET and I was trying to figure out if I can use RS for
our
> >> project. I have form based security access for my ASP.NET application.
> >> Besides that we have role based application check that is custom
> >> implemented. Window based security of RS is a big issue and I am trying
> >> to
> >> get around it.
> >>
> >> I saw the article that you sent me to about ASPNET account. Some how it
> > just
> >> doesn't work on my machine.
> >> If pass account of local administrator with name and password it does
> > work
> >> on my machine.
> >> The issue with link is following
> >> I report doesn't have drill down, drill through or charts - anything
that
> >> requires links for working works fine. But if I have chart - picture is
> >> missing, if I have drill done + then I am sent to regular site
> >> MYSERVER/Reports... and of cause if user doesn't have proper windows
> > account
> >> he is denied. The same thing with drill through - links to other
reports-
> >> they send me to wrong page.
> >>
> >> I don't know how to replace link.
> >>
> >> This is the code that I am using:
> >>
> >> private void Page_Load(object sender, System.EventArgs e)
> >>
> >> {
> >>
> >> string path=Request.Params["Path"];
> >>
> >> string format=Request.Params["Format"];
> >>
> >> // Create service
> >>
> >> ReportingService rs=new WebReports.ReportingService.ReportingService();
> >>
> >> System.Net.NetworkCredential nwc=new
> >> System.Net.NetworkCredential("MyName","pass","server");
> >>
> >> rs.Credentials=nwc;
> >>
> >> ParameterValue[] parameters=new ParameterValue[0];
> >>
> >> string encoding;
> >>
> >> string mimeType;
> >>
> >> ParameterValue[] parametersUsed;
> >>
> >> Warning[] warnings;
> >>
> >> string[] streamIds;
> >>
> >> //render the report
> >>
> >> byte[] data;
> >>
> >> data=rs.Render(path,format, null,null,parameters,null,null,
> >>
> >> out encoding, out mimeType, out parametersUsed, out warnings, out
> >> streamIds);
> >>
> >> string extension=this.GetExtension(mimeType); //this is just a private
> >> function to get
> >>
> >> //an extension for the mimeType
> >>
> >> string reportName=path.Substring(path.LastIndexOf("/")+1);
> >>
> >> string fileName=reportName+"."+extension;
> >>
> >> //write report back to response object
> >>
> >> Response.Clear();
> >>
> >> Response.ContentType=mimeType;
> >>
> >> //add the file name to the response if it is not a web browser format
> >>
> >> if(mimeType!="text/html")
> >>
> >> Response.AddHeader("Content-Disposition","attachment;filename=" +
> > fileName);
> >>
> >> Response.BinaryWrite(data);
> >>
> >> }
> >>
> >> (I got it from a book)
> >> I don't see any way to control links.
> >>
> >> Can you help?
> >> Shimon.
> >>
> >>
> >>
> >> "Teo Lachev [MVP]" <teo.lachev@.nospam.prologika.com> wrote in message
> >> news:O3mwG1xsEHA.3972@.TK2MSFTNGP15.phx.gbl...
> >> > Shimon,
> >> >
> >> > I assume that your application:
> >> > 1. Renders reports by SOAP on the server side of the application.
> >> > 2. By report links to the Report Service site you mean reports are
> >> > requested
> >> > by URL but you want them to redirect to your application.
> >> >
> >> > If the above is correct, can you replace those links with your page
> >> > URL?
> >> >
> >> > --
> >> > Hope this helps.
> >> >
> >> > ---
> >> > Teo Lachev, MVP [SQL Server], MCSD, MCT
> >> > Author: "Microsoft Reporting Services in Action"
> >> > Publisher website: http://www.manning.com/lachev
> >> > Buy it from Amazon.com: http://shrinkster.com/eq
> >> > Home page and blog: http://www.prologika.com/
> >> > ---
> >> >
> >> > "Shimon Sim" <estshim@.att.net> wrote in message
> >> > news:uuxWcSssEHA.904@.TK2MSFTNGP11.phx.gbl...
> >> >> I have Web application and I am trying to integrate Reports from SQL
> >> >> Reporting Service in it.
> >> >> I can render a report to a page from my application. The problem is
> >> >> the
> >> >> if
> >> > a
> >> >> report has links to other reports then those links send you strait
to
> >> > Report
> >> >> Service site and not back to my application.
> >> >>
> >> >> Is there a way out of this?
> >> >>
> >> >> Thanks,
> >> >> Shimon
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
Rendering Reports on aspx (SOAP)
established a prox class for the web service RS, and authenticated with the
Report Server (I think). Now, how do I go about getting a particular report
to display on my page (on Page Load or other)? Also, once I get past this,
what control should contain the report (something like aReportViewer)?
DavidHi Jones,
You have fully source code for render a report in ASP.NET here
http://www.rdlcomponents.com/ASPExamples/default.aspx
Thanks
Jerry
--
The First RDL reader/writer of the Market
http://www.rdlcomponents.com/
"DJONES" wrote:
> I've never worked with a Web Service before and am confused. I have
> established a prox class for the web service RS, and authenticated with the
> Report Server (I think). Now, how do I go about getting a particular report
> to display on my page (on Page Load or other)? Also, once I get past this,
> what control should contain the report (something like aReportViewer)?
> David|||When you use this method, you're opening a can of worms that may break some
RS functionality. Do you really need to use SOAP rendering?
Another, easier technique is to create the URL string for a Get request and
set the source of an IFrame to that URL (set the NavigateURL property of a
hyperlink control to the report URL and set the target to the name of the
IFrame.)
If you really need to use the web service method, you can send the output of
the Render method to the Response.BinaryWrite() method to render the report
in the current page.
Paul Turley
"DJONES" <DJONES@.discussions.microsoft.com> wrote in message
news:82FFFE8E-9F6A-419D-8782-A09284AD989B@.microsoft.com...
> I've never worked with a Web Service before and am confused. I have
> established a prox class for the web service RS, and authenticated with
> the
> Report Server (I think). Now, how do I go about getting a particular
> report
> to display on my page (on Page Load or other)? Also, once I get past this,
> what control should contain the report (something like aReportViewer)?
> David|||Well, I'm looking at this option for security reasons. Internally, I use the
ReportViewer. I'm under the impression that the SOAP method will allow me to
keep my data secure on a Internet facing implementation with less effort.
Can you give me an example of the functionalities I will be giving up going
this route?
"Paul Turley" wrote:
> When you use this method, you're opening a can of worms that may break some
> RS functionality. Do you really need to use SOAP rendering?
> Another, easier technique is to create the URL string for a Get request and
> set the source of an IFrame to that URL (set the NavigateURL property of a
> hyperlink control to the report URL and set the target to the name of the
> IFrame.)
> If you really need to use the web service method, you can send the output of
> the Render method to the Response.BinaryWrite() method to render the report
> in the current page.
> Paul Turley
> "DJONES" <DJONES@.discussions.microsoft.com> wrote in message
> news:82FFFE8E-9F6A-419D-8782-A09284AD989B@.microsoft.com...
> > I've never worked with a Web Service before and am confused. I have
> > established a prox class for the web service RS, and authenticated with
> > the
> > Report Server (I think). Now, how do I go about getting a particular
> > report
> > to display on my page (on Page Load or other)? Also, once I get past this,
> > what control should contain the report (something like aReportViewer)?
> >
> > David
>
>
Rendering report in ASP.Net
web service.
When I use the render function I get a SOAP exception ...
The permissions granted to user '"Server1\ASPNET' are insufficient for
performing this operation.
This same code runs fine in a windows form, but I want a web form.
What permissions does this user need to have?
Regards RichardGive the user sufficient permissions via Report Manager.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Richard Wrench" <rwrench@.icsecurity.com> wrote in message
news:u%23d8zL0cEHA.3480@.TK2MSFTNGP11.phx.gbl...
> I am now trying to render a report in ASP.Net using the reporting service
> web service.
> When I use the render function I get a SOAP exception ...
> The permissions granted to user '"Server1\ASPNET' are insufficient for
> performing this operation.
> This same code runs fine in a windows form, but I want a web form.
> What permissions does this user need to have?
> Regards Richard
>
>
>|||Thanks again Ravi
"Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in message
news:uzJCKd0cEHA.2812@.tk2msftngp13.phx.gbl...
> Give the user sufficient permissions via Report Manager.
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Richard Wrench" <rwrench@.icsecurity.com> wrote in message
> news:u%23d8zL0cEHA.3480@.TK2MSFTNGP11.phx.gbl...
> > I am now trying to render a report in ASP.Net using the reporting
service
> > web service.
> >
> > When I use the render function I get a SOAP exception ...
> > The permissions granted to user '"Server1\ASPNET' are insufficient for
> > performing this operation.
> >
> > This same code runs fine in a windows form, but I want a web form.
> > What permissions does this user need to have?
> >
> > Regards Richard
> >
> >
> >
> >
> >
>
Rendering report
In the request i also set this parameter:
<DeviceInfo><HTMLFragment>true</HTMLFragment>
The rendering is ok, but the problem is that the images in the report are
not displaied.
Any ideas?
Thanks!
--
OSVALDO COLITTIOsvaldo,
With SOAP you need to download the images explicitly. The most flexible
approach I could have come up with that works accross XP and Windows 2003 is
explained in chapter 11 of my book. It involves writing an ASP.NET-based
image handler page and setting StreamRoot to it. If you don't feel like
buying my book, you can download the source code from the publisher website.
--
Hope this helps.
---
Teo Lachev, MVP [SQL Server], MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
---
"Osvaldo Colitti" <OsvaldoColitti@.discussions.microsoft.com> wrote in
message news:09B91460-6F93-48F2-B04D-36B2129617A5@.microsoft.com...
> I request a report from a web service to be rendered in html 4.0 format.
> In the request i also set this parameter:
> <DeviceInfo><HTMLFragment>true</HTMLFragment>
> The rendering is ok, but the problem is that the images in the report are
> not displaied.
> Any ideas?
> Thanks!
> --
> OSVALDO COLITTI
>
Rendering on Web page
stream and place somewhere on a web page. I would like to have a web page
with the usual things like navigation and render the report within this. How
is this done? Regards, Chris.This is a multi-part message in MIME format.
--=_NextPart_000_005F_01C7547F.90AE72C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
data =3D rs.Render(path, format, Nothing, Nothing, parameters, Nothing, =_
Nothing, Encoding, "text/html", parametersUsed, warnings, streamids)
Dim str As String =3D System.Text.Encoding.ASCII.GetChars(data)
label1.Text =3D str
This seems to work.
"Chris" <nospam@.nospam.com> wrote in message =news:%23now%23rGVHHA.5108@.TK2MSFTNGP06.phx.gbl...
>I am rendering my first report on a web page. How do I take the binary =data > stream and place somewhere on a web page. I would like to have a web =page > with the usual things like navigation and render the report within =this. How > is this done? Regards, Chris. > >
--=_NextPart_000_005F_01C7547F.90AE72C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
data =3D rs.Render(path, format, Nothing, =Nothing, parameters, Nothing, _Nothing, Encoding, "text/html", =parametersUsed, warnings, streamids)
Dim str As String =3D System.Text.Encoding.ASCII.GetChars(data)label1.Text =3D =str
This seems to work.
"Chris"
--=_NextPart_000_005F_01C7547F.90AE72C0--