Showing posts with label display. Show all posts
Showing posts with label display. Show all posts

Monday, March 12, 2012

I am using the reportingservice web service, everything runs fine but does'nt display report

Please am i doing something wrong, i debug the code no where it is giving me an error:

I am using the reportservice.asmx web service to render the report, but it is not displaying the report at all. it just shows me on IE saying Done with out any error, please can you tell me am i doing something wrong, after a very hard time i reached upto this point, on my form i just have a button on its click event i wrote the following code. and i have no other control on the form. except this code. just referencing the webservice.

thank you.

Dim rs As New ReportingService

Dim LogonCredentials As System.Net.NetworkCredential

Dim Items As CatalogItem

LogonCredentials = New System.Net.NetworkCredential("username", "password", "mydomainname")

rs.Credentials = LogonCredentials

'rs.Credentials = System.Net.CredentialCache.DefaultCredentials

rs.PreAuthenticate = True

' Render arguments

Dim result As Byte() = Nothing

Dim reportPath As String = "/PCSnetReports/StatusReport"

Dim format As String = "MHTML"

Dim historyID As String = Nothing

Dim devInfo As String = "<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>"

' Prepare report parameter.

Dim parameters(1) As ParameterValue

parameters(0) = New ParameterValue

parameters(0).Name = "eStatus"

parameters(0).Value = "All"

parameters(1) = New ParameterValue

parameters(1).Name = "UserName"

parameters(1).Value = "johnsmith" ' June

Dim credentials As DataSourceCredentials() = Nothing

Dim showHideToggle As String = 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 sh As New 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

Console.WriteLine("SessionID after call to Render: {0}", rs.SessionHeaderValue.SessionId)

Console.WriteLine("Execution date and time: {0}", rs.SessionHeaderValue.ExecutionDateTime)

Console.WriteLine("Is new execution: {0}", rs.SessionHeaderValue.IsNewExecution)

Catch e1 As SoapException

Console.WriteLine(e1.Detail.OuterXml)

End Try

' Write the contents of the report to an MHTML file.

Try

Dim stream As FileStream = File.Create("report.mhtml", result.Length)

Console.WriteLine("File created.")

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

Console.WriteLine("Result written to the file.")

stream.Close()

Catch e2 As Exception

Console.WriteLine(e2.Message)

End Try

Hi,

You need to call the LoadReport method on the RS object before you call the Render method. For example:

rsExecService.ExecutionInfo execInfo = new rsExecService.ExecutionInfo();

rsExecService.ExecutionHeader execHeader = new rsExecService.ExecutionHeader();

rsExec.ExecutionHeaderValue = execHeader;

execInfo = rsExec.LoadReport(reportPath, historyID);

rsExec.SetExecutionParameters(execParameterValues, "en-gb");

String SessionId = rsExec.ExecutionHeaderValue.ExecutionID;

try

{

// Cache the results within the report definition.

report.Data = rsExec.Render(format, devInfo, out extension, out encoding, out mimeType, out warnings, out streamIDs);

}

catch (SoapException e)

{

Console.WriteLine(e.Detail.OuterXml);

}

Regards

Sanjay

Friday, March 9, 2012

I am not able to load two different images dynamically in an Image control

HI,

Base on pagenumber, i need to display a particular image in first page and another image in next page.

there are two images and has to be displayed alternatively in the pages.

but, it is displaying only one image everytime.

I am using Exteranl and URL based concept and using parameters to pass the values from the front end to the report

One more thing I did was, I place two image controls and passing the URL through two parameters having the URL as the value.

but still the both the image controls display only one image.

it should be possible to use expression to show image conditionally.

set image value property to expression, for example, for URL image:

=iif(<Some condition>,
"http://localhost/Reports/images/48folderopen.jpg",
"http://localhost/Reports/images/16prop.gif")

|||

Hi,

I am using an expression.

One more thing I am getting the path thru the Parameters.

I have two different Paths one for customer logo and another is company logo

and i have used the parameters in iif conditon.

example: iif((Globals!PageNumber) Mod 2 = 0,Parameters!RgLogoPath.Value,Parameters!CustLogoPath.Value)

one more thing i tried is

place two image controls in Page Header and in the Value i used expression and for both the images i gave Parameters!RgLogoPath.Value and Parameters!CustLogoPath.Value respectively. when i saw the preview , only one image was displayed in both image controls

|||Is this happening in page headers only? Does it work differently if put in the report body?

I am not able to load two different images dynamically in an Image control

HI,

Base on pagenumber, i need to display a particular image in first page and another image in next page.

there are two images and has to be displayed alternatively in the pages.

but, it is displaying only one image everytime.

I am using Exteranl and URL based concept and using parameters to pass the values from the front end to the report

One more thing I did was, I place two image controls and passing the URL through two parameters having the URL as the value.

but still the both the image controls display only one image.

it should be possible to use expression to show image conditionally.

set image value property to expression, for example, for URL image:

=iif(<Some condition>,
"http://localhost/Reports/images/48folderopen.jpg",
"http://localhost/Reports/images/16prop.gif")

|||

Hi,

I am using an expression.

One more thing I am getting the path thru the Parameters.

I have two different Paths one for customer logo and another is company logo

and i have used the parameters in iif conditon.

example: iif((Globals!PageNumber) Mod 2 = 0,Parameters!RgLogoPath.Value,Parameters!CustLogoPath.Value)

one more thing i tried is

place two image controls in Page Header and in the Value i used expression and for both the images i gave Parameters!RgLogoPath.Value and Parameters!CustLogoPath.Value respectively. when i saw the preview , only one image was displayed in both image controls

|||Is this happening in page headers only? Does it work differently if put in the report body?

I am not able to load two different images dynamically in an Image control

HI,

Base on pagenumber, i need to display a particular image in first page and another image in next page.

there are two images and has to be displayed alternatively in the pages.

but, it is displaying only one image everytime.

I am using Exteranl and URL based concept and using parameters to pass the values from the front end to the report

One more thing I did was, I place two image controls and passing the URL through two parameters having the URL as the value.

but still the both the image controls display only one image.

it should be possible to use expression to show image conditionally.

set image value property to expression, for example, for URL image:

=iif(<Some condition>,
"http://localhost/Reports/images/48folderopen.jpg",
"http://localhost/Reports/images/16prop.gif")

|||

Hi,

I am using an expression.

One more thing I am getting the path thru the Parameters.

I have two different Paths one for customer logo and another is company logo

and i have used the parameters in iif conditon.

example: iif((Globals!PageNumber) Mod 2 = 0,Parameters!RgLogoPath.Value,Parameters!CustLogoPath.Value)

one more thing i tried is

place two image controls in Page Header and in the Value i used expression and for both the images i gave Parameters!RgLogoPath.Value and Parameters!CustLogoPath.Value respectively. when i saw the preview , only one image was displayed in both image controls

|||Is this happening in page headers only? Does it work differently if put in the report body?

Friday, February 24, 2012

Hyperlink on a report to download a file

I have an XML field (of type XML) in my report's underlying table. I want to
display a hyperlink in my report. When the user clicks on this hyperlink, I
want them to be able to save the xml value as an XML file on disk (i.e.
"Save File As" in MSIE). Has anyone tried this?
Thank you,
--
Alain Quesnel
alainsansspam@.logiquel.com
www.logiquel.comYou might be able to use javascript to make it open the file in a new
window.|||Any luck on getting this to work? I'm trying to do the same thing but can't
find any way to do it.|||Nope. I even reposted with the subject "XML field content to be downloaded
as a file" in case my first post wasn't clear enough. But no luck.
I'll keep watching and/or post the answer if I ever figure out a way of
doing it.
Alain Quesnel
alainsansspam@.logiquel.com
www.logiquel.com
"Elliott" <Elliott@.discussions.microsoft.com> wrote in message
news:A0650A48-7DAB-42AE-A300-8A9DA17E5401@.microsoft.com...
> Any luck on getting this to work? I'm trying to do the same thing but
> can't
> find any way to do it.
>|||This is the closest possible solution I've found so far and it's from a
Microsoft employee:
http://tinyurl.com/2gs6sp
Basically you'd just have to create a separate web page/site that serves up
the file/xml from a hyperlink in the report. Not quite as easy has getting
it right out of the report directly, but it's definitely doable for my
project.
I'd be happy enough if the report would let me just display the xml with an
associated xsl file.|||Displaying the XML content on your report is pretty easy. Just put the
field's value in a gird like you would any other field type (char, int,
float, etc.). It's just that the cell containing the XML gets pretty big.
--
Alain Quesnel
alainsansspam@.logiquel.com
www.logiquel.com
"Elliott" <Elliott@.discussions.microsoft.com> wrote in message
news:3EE4182B-7C2C-4A37-A71F-F007DE1D6A5C@.microsoft.com...
> This is the closest possible solution I've found so far and it's from a
> Microsoft employee:
> http://tinyurl.com/2gs6sp
> Basically you'd just have to create a separate web page/site that serves
> up
> the file/xml from a hyperlink in the report. Not quite as easy has
> getting
> it right out of the report directly, but it's definitely doable for my
> project.
> I'd be happy enough if the report would let me just display the xml with
> an
> associated xsl file.|||Yeah, I realized I could do that. However I need mine formatted for the
users; I didn't want them to see the raw xml. If they could download it
directly from the report and open it in IE (which is default), then they'd
see it formatted like a webpage since the xml references an xsl file. That
would have been my preference.
Anyway, I took Chris Hays' advice and implemented a small ASP.NET site that
serves up the xml file with the xsl. It was pretty painless and took about
an hour.

Hyperlink in the report

I want to display a hyperlink in the report. I browsed a little bit and found that the TextBox can be used as a hyperlink.
Under the Navigation tab in the selection "Jump To Url", I wrote http://www.microsoft.com.
It's taking me to microsoft site but its using up the existing window. How to open the site in a
different window.

And Just as an example Iam hardcoding the Url as microsoft.com. Can we also give this value
dynamically as one of the fields in the database.

the control where the report will run can be configured with "Target" so it will go to the window you want to,

The "Jump To Url" can be an expression that you program with data from your report and constants.

|||

I will be opening this report as pdf. So, when I click the link its going to the Url but using up an existing window, instead of opening in a new window.

Hyperlink files

How do I get the *.xls and *.txt files from 'c:\files1\*.*' and
'c:\files2\*.*' ?
I need to display a hyperlink from my web page (I am using Reporting
Services project) instead of going to each folder.
I would to list in my report all files from these folders and able to open
them in Excel or text format. I try to use 'Jump To URL' it did not work.
Probably I was doing something wrong.
Please help.On Nov 12, 1:05 pm, JT <J...@.discussions.microsoft.com> wrote:
> How do I get the *.xls and *.txt files from 'c:\files1\*.*' and
> 'c:\files2\*.*' ?
> I need to display a hyperlink from my web page (I am using Reporting
> Services project) instead of going to each folder.
> I would to list in my report all files from these folders and able to open
> them in Excel or text format. I try to use 'Jump To URL' it did not work.
> Probably I was doing something wrong.
> Please help.
As far as I know, wild cards are not allowed like this, otherwise, in
terms of SSRS/Reporting Services, you will want to right-click the top
left corner of either a table cell, textbox control, etc. >> select
Properties >> select the Navigation tab >> in Jump to URL, enter in
something like: ="file:///C:/Test" where 'Test' is a subdirectory.
This should get you as close as possible. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

Sunday, February 19, 2012

Hyperlink

How can I put a friendly name or tool tip on a hyperlink? This is the
link I use in my graph, but I would like it to display the value when I
hover.
Thanks.
="javascript:void(window.open('http://domain.com/userdatapopup.asp?Initials="
& Fields!soldby.Value & "','popup','width=400,height=200'))"John Geddes wrote:
> How can I put a friendly name or tool tip on a hyperlink? This is the
> link I use in my graph, but I would like it to display the value when I
> hover.
>
> Thanks.
> ="javascript:void(window.open('http://domain.com/userdatapopup.asp?Initials="
> & Fields!soldby.Value & "','popup','width=400,height=200'))"
>
Use the Title="my tool tip" attribute in the a href
EG <a href="http://links.10026.com/?link=#" title="Link to something">Link</a>|||Hi Tony,
Can U please Explain me where I need to put this code'
This can be put directly in the expression for the TextBox'
Thanks in Advance,
Chandra.
"Tony G" wrote:
> <a
> href="http://links.10026.com/?link=javascript:void(window.open('http://domain.com/userdatapopup.asp?Initials=
> & Fields!soldby.Value & "','popup','width=400,height=200'))" title="your
> text">link</a>
>
> John Geddes wrote:
> > I can put TITLE in the function?
> >
> > --
> >
> >
> >
> > John Geddes
> > jgeddes@.email.uophx.edu <mailto:jgeddes@.email.uophx.edu>
> > John.R.Geddes@.gmail.com <mailto:John.R.Geddes@.gmail.com>
> >
> >
> > "Tony G" <b6@.blueyonder.co.yuk> wrote in message news:b6@.blueyonder.co.yuk:
> > > John Geddes wrote:
> > > > How can I put a friendly name or tool tip on a hyperlink? This is the
> > > >
> > > > link I use in my graph, but I would like it to display the value when I
> > > >
> > > > hover.
> > > >
> > > >
> > > > Thanks.
> > > >
> > > >
> > > >
> > ="javascript:void(window.open('http://domain.com/userdatapopup.asp?Initials=
> > > > "
> > > > & Fields!soldby.Value & "','popup','width=400,height=200'))"
> > > >
> > >
> > >
> > > Use the Title="my tool tip" attribute in the a href
> > >
> > > EG <a href="http://links.10026.com/?link=#" title="Link to something">Link</a>
>|||Right mouse click on a textbox (or a field of a table control, etc),
properties, advanced, navigation tab, jump to URL.
(from memory so might be slightly different).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Chandra" <Chandra@.discussions.microsoft.com> wrote in message
news:7F7942F6-F094-4DB4-B6D9-8F556BCB2460@.microsoft.com...
> Hi Tony,
> Can U please Explain me where I need to put this code'
> This can be put directly in the expression for the TextBox'
> Thanks in Advance,
> Chandra.
> "Tony G" wrote:
>> <a
>> href="http://links.10026.com/?link=javascript:void(window.open('http://domain.com/userdatapopup.asp?Initials=
>> & Fields!soldby.Value & "','popup','width=400,height=200'))" title="your
>> text">link</a>
>>
>> John Geddes wrote:
>> > I can put TITLE in the function?
>> >
>> > --
>> >
>> >
>> >
>> > John Geddes
>> > jgeddes@.email.uophx.edu <mailto:jgeddes@.email.uophx.edu>
>> > John.R.Geddes@.gmail.com <mailto:John.R.Geddes@.gmail.com>
>> >
>> >
>> > "Tony G" <b6@.blueyonder.co.yuk> wrote in message
>> > news:b6@.blueyonder.co.yuk:
>> > > John Geddes wrote:
>> > > > How can I put a friendly name or tool tip on a hyperlink? This is
>> > the
>> > > >
>> > > > link I use in my graph, but I would like it to display the value
>> > when I
>> > > >
>> > > > hover.
>> > > >
>> > > >
>> > > > Thanks.
>> > > >
>> > > >
>> > > >
>> > ="javascript:void(window.open('http://domain.com/userdatapopup.asp?Initials=
>> > > > "
>> > > > & Fields!soldby.Value & "','popup','width=400,height=200'))"
>> > > >
>> > >
>> > >
>> > > Use the Title="my tool tip" attribute in the a href
>> > >
>> > > EG <a href="http://links.10026.com/?link=#" title="Link to something">Link</a>|||I got the javascript to open up a window, however, I cannot pass paramaters
into the string. If the string is hard-coded then it works fine.
-tim
"Bruce L-C [MVP]" wrote:
> Right mouse click on a textbox (or a field of a table control, etc),
> properties, advanced, navigation tab, jump to URL.
> (from memory so might be slightly different).
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Chandra" <Chandra@.discussions.microsoft.com> wrote in message
> news:7F7942F6-F094-4DB4-B6D9-8F556BCB2460@.microsoft.com...
> > Hi Tony,
> > Can U please Explain me where I need to put this code'
> > This can be put directly in the expression for the TextBox'
> >
> > Thanks in Advance,
> > Chandra.
> >
> > "Tony G" wrote:
> >
> >> <a
> >> href="http://links.10026.com/?link=javascript:void(window.open('http://domain.com/userdatapopup.asp?Initials=
> >> & Fields!soldby.Value & "','popup','width=400,height=200'))" title="your
> >> text">link</a>
> >>
> >>
> >> John Geddes wrote:
> >> > I can put TITLE in the function?
> >> >
> >> > --
> >> >
> >> >
> >> >
> >> > John Geddes
> >> > jgeddes@.email.uophx.edu <mailto:jgeddes@.email.uophx.edu>
> >> > John.R.Geddes@.gmail.com <mailto:John.R.Geddes@.gmail.com>
> >> >
> >> >
> >> > "Tony G" <b6@.blueyonder.co.yuk> wrote in message
> >> > news:b6@.blueyonder.co.yuk:
> >> > > John Geddes wrote:
> >> > > > How can I put a friendly name or tool tip on a hyperlink? This is
> >> > the
> >> > > >
> >> > > > link I use in my graph, but I would like it to display the value
> >> > when I
> >> > > >
> >> > > > hover.
> >> > > >
> >> > > >
> >> > > > Thanks.
> >> > > >
> >> > > >
> >> > > >
> >> > ="javascript:void(window.open('http://domain.com/userdatapopup.asp?Initials=
> >> > > > "
> >> > > > & Fields!soldby.Value & "','popup','width=400,height=200'))"
> >> > > >
> >> > >
> >> > >
> >> > > Use the Title="my tool tip" attribute in the a href
> >> > >
> >> > > EG <a href="http://links.10026.com/?link=#" title="Link to something">Link</a>
> >>
>
>