Showing posts with label section. Show all posts
Showing posts with label section. Show all posts

Thursday, March 29, 2012

Embedded or DB images not showing in ReportViewer

I have a report which has an embedded image in the heading and an image control that loads images from the database (Image control Data section configured as MIMEType=image/jpg, Source=Database, Value=Fields!Img_Data.Value).

In both cases I can see the embedded heading image and the database images in design mode (VS2005) and through the report manager web pages. When I try to render the report through the ReportViewer web control in my web application, the images do not display (standard missing image red "X" appears).

I have a button on my web form which re-runs the report and exports it to PDF, and when pressed the report is displayed correctly in PDF with all images.

What do I need to do to the ReportViewer web control for it to show embedded and database images? I am using the ReportViewer for 2005.

Please advise of give me some place to look.

Mark

Anyone?|||

Have the same problem.

Nowhere can find some answer.

Checked registration of http handler for reportViewer.

All seems ok.

But no one embedded image is not displayed.

We invested much time (read money) in the solution, and got stucked with this problem, because sorting images that uses reporting services dont display also.

If you found the solution, please help!

|||

I copied image URI from rendered report,

then tried to access embedded image from browser.

Copied url: http://localhost:2403/SITE/Reserved.ReportViewerWebControl.axd?ReportSession=w0bnfsz5qhowblqcixc22eix&ControlID=12fb7de86eea4d9080dda118312ed121&Culture=1049&UICulture=1049&ReportStack=2&OpType=ReportImage&StreamID=612c1bae-af83-408b-b385-25b08a827bc4

Result was Error

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.Reporting.WebForms.ReportServerException: The stream cannot be found. The stream identifier that is provided to an operation cannot be located in the report server database. (rsStreamNotFound)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[ReportServerException: The stream cannot be found. The stream identifier that is provided to an operation cannot be located in the report server database. (rsStreamNotFound)] Microsoft.Reporting.WebForms.ServerReport.InternalRenderStream(String format, String streamId, String deviceInfo, String& mimeType, String& encoding) +216 Microsoft.Reporting.WebForms.ServerReportControlSource.GetStreamImage(String streamID, String deviceInfo, String& mimeType) +59 Microsoft.Reporting.WebForms.ReportImageOperation.GetStreamImage(String streamID, HttpResponse response) +216 Microsoft.Reporting.WebForms.ReportImageOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +94 Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +215 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

Seems, that is ugly implementation bugSad

|||Solved the PROBLEM by installing SQL Server Service Pack 2.Smile)))|||

No, images showed only once, and then all goes wrong once again.

It's bad job that microsoft had done with this report controlSad((

SP2 dosnt solve this problem!

sql

Embedded or DB images not showing in ReportViewer

I have a report which has an embedded image in the heading and an image control that loads images from the database (Image control Data section configured as MIMEType=image/jpg, Source=Database, Value=Fields!Img_Data.Value).

In both cases I can see the embedded heading image and the database images in design mode (VS2005) and through the report manager web pages. When I try to render the report through the ReportViewer web control in my web application, the images do not display (standard missing image red "X" appears).

I have a button on my web form which re-runs the report and exports it to PDF, and when pressed the report is displayed correctly in PDF with all images.

What do I need to do to the ReportViewer web control for it to show embedded and database images? I am using the ReportViewer for 2005.

Please advise of give me some place to look.

Mark

Anyone?|||

Have the same problem.

Nowhere can find some answer.

Checked registration of http handler for reportViewer.

All seems ok.

But no one embedded image is not displayed.

We invested much time (read money) in the solution, and got stucked with this problem, because sorting images that uses reporting services dont display also.

If you found the solution, please help!

|||

I copied image URI from rendered report,

then tried to access embedded image from browser.

Copied url: http://localhost:2403/SITE/Reserved.ReportViewerWebControl.axd?ReportSession=w0bnfsz5qhowblqcixc22eix&ControlID=12fb7de86eea4d9080dda118312ed121&Culture=1049&UICulture=1049&ReportStack=2&OpType=ReportImage&StreamID=612c1bae-af83-408b-b385-25b08a827bc4

Result was Error

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

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.Reporting.WebForms.ReportServerException: The stream cannot be found. The stream identifier that is provided to an operation cannot be located in the report server database. (rsStreamNotFound)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[ReportServerException: The stream cannot be found. The stream identifier that is provided to an operation cannot be located in the report server database. (rsStreamNotFound)] Microsoft.Reporting.WebForms.ServerReport.InternalRenderStream(String format, String streamId, String deviceInfo, String& mimeType, String& encoding) +216 Microsoft.Reporting.WebForms.ServerReportControlSource.GetStreamImage(String streamID, String deviceInfo, String& mimeType) +59 Microsoft.Reporting.WebForms.ReportImageOperation.GetStreamImage(String streamID, HttpResponse response) +216 Microsoft.Reporting.WebForms.ReportImageOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +94 Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +215 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

Seems, that is ugly implementation bugSad

|||Solved the PROBLEM by installing SQL Server Service Pack 2.Smile)))|||

No, images showed only once, and then all goes wrong once again.

It's bad job that microsoft had done with this report controlSad((

SP2 dosnt solve this problem!

Tuesday, March 27, 2012

Embedded code: what's the trick?

I am trying to put some embedded Visual Basic code into my report (RS 2005), using the "Code" section in the report properties.

Here's the function I'm trying to use:

Public Shared Function ReportTotal(ByVal IsUnitCost As Boolean,ByVal TotalDirectCosts As Double, ByVal SalaryBenefitsTotal As Double, ByVal IndirectRate As Double, ByVal SS_Screened As Integer, ByVal UnitRate As Double) As Double
If IsUnitCost Then
Return SS_Screened * UnitRate
Else
Return TotalDirectCosts + SalaryBenefitsTotal * IndirectRate
End If
End Function

Supposedly, after entering this you can access it in the expression for a field by typing the following: =Code.ReportTotal(... parameters ...)

However, when I try this, "ReportTalk" does not show up in the intellisense after I type "Code.". If I type it in anyway, a red squiggly line shows up under it, and if I attempt to preview the report, I get the following error: "The definition of report [report name] is invalid. Exception of type 'Microsoft.ReportingServices.ReportProcessing.ReportProcessingException' was thrown."

This is not a very helpful error message! I tried with and without "Public" and "Shared" and got the same thing.

What am I doing wrong?


Unfortunately, Custom code is not compiled until the report is published, so any custom methods will not show up in intellisense or be resolved (which results in the red underline) by the report designer.

If you are using RS 2005, then it should be evident in the exception message if the custom code generated the error. So, inorder to help you debug the issue I have a few questions:
What version of Reporting Services are you using?|||

Oh OK, you are right -- when I deploy the report, my code does work! Thank you very much.

You'd think there would be ONE mention of this little fact in SOME documentation, somewhere! It never would have occurred to me that the error was occurring only on preview.

In the SQL Server books online, the following is the entire entry for How to Add Code to a Report:

1. On the Report menu, click Report Properties.

Note: If the Report menu is not available, click within the report design area.

2. On the Code tab, in Custom code, type the code.

I kid you not. Anyway, thank you very much!

Embedded code: what's the trick?

I am trying to put some embedded Visual Basic code into my report (RS 2005), using the "Code" section in the report properties.

Here's the function I'm trying to use:

Public Shared Function ReportTotal(ByVal IsUnitCost As Boolean,ByVal TotalDirectCosts As Double, ByVal SalaryBenefitsTotal As Double, ByVal IndirectRate As Double, ByVal SS_Screened As Integer, ByVal UnitRate As Double) As Double
If IsUnitCost Then
Return SS_Screened * UnitRate
Else
Return TotalDirectCosts + SalaryBenefitsTotal * IndirectRate
End If
End Function

Supposedly, after entering this you can access it in the expression for a field by typing the following: =Code.ReportTotal(... parameters ...)

However, when I try this, "ReportTalk" does not show up in the intellisense after I type "Code.". If I type it in anyway, a red squiggly line shows up under it, and if I attempt to preview the report, I get the following error: "The definition of report [report name] is invalid. Exception of type 'Microsoft.ReportingServices.ReportProcessing.ReportProcessingException' was thrown."

This is not a very helpful error message! I tried with and without "Public" and "Shared" and got the same thing.

What am I doing wrong?


Unfortunately, Custom code is not compiled until the report is published, so any custom methods will not show up in intellisense or be resolved (which results in the red underline) by the report designer.

If you are using RS 2005, then it should be evident in the exception message if the custom code generated the error. So, inorder to help you debug the issue I have a few questions:
What version of Reporting Services are you using?|||

Oh OK, you are right -- when I deploy the report, my code does work! Thank you very much.

You'd think there would be ONE mention of this little fact in SOME documentation, somewhere! It never would have occurred to me that the error was occurring only on preview.

In the SQL Server books online, the following is the entire entry for How to Add Code to a Report:

1. On the Report menu, click Report Properties.

Note: If the Report menu is not available, click within the report design area.

2. On the Code tab, in Custom code, type the code.

I kid you not. Anyway, thank you very much!

Embedded Code Executing SQL

I'm trying to execute a stored procedure in the header section of a report
(so I can't use a dataset in the data tab) using the shared datasource of the
report. Does anyone have a simple example executing SQL from the embedded
code of a report?Bryan,
You can use the objects from the detail section to show in the header
or...try to have a select statement in the code behind function.
if u are okay with the first line, just pop up again, i will check and give
u the code
"Bryan" wrote:
> I'm trying to execute a stored procedure in the header section of a report
> (so I can't use a dataset in the data tab) using the shared datasource of the
> report. Does anyone have a simple example executing SQL from the embedded
> code of a report?

Wednesday, March 7, 2012

EM does not display Login Name

All,
After adding Domain users to a database I get the situation where some
display in the "Users" section without a Login Name.
The users still function correctly, but some have Login Names and some
don't. Another note is that we have Production and Test servers on differen
t
boxes and a user can display different ways on each.
So, my question is, why does this happen? And more importantly, is there
some subtle problem behind the scenes that means I can't just ignore this
symptom?
Thanks,
Simon.
P.S. For example:
Name Login Name Database Access
---
User1 Domain\U1 Permit
User2 Permit
User3 Domain\U3 Permit
^- no login name for Domain\U2Simon wrote:

> Name Login Name Database Access
> ---
> User1 Domain\U1 Permit
> User2 Permit
> User3 Domain\U3 Permit
> ^- no login name for Domain\U2
Simon,
we are encountering the same effect, when I do a RESTORE from a Database Bac
kup
from a Server which is not in the Windows Domain. I suppose it has something
to
do with an orphaned User SID.
I suppose when you enter
use mydb
sp_helpuser
you get NULL in the Login column.
Suggestion: Use a script with 'sp_dropuser' resp. 'sp_revokedbaccess' and 'g
rantdbaccess' to delete and rebuild the
user(s).
If the DB owner user dbo is also void, use 'sp_changedbowner' to reassign it
.
Joachim|||Hi Joachim,
Yes, sp_helpuser does return null. However, we are using a script with the
mentioned sp's to add users to this database. Way the app works is by a use
r
entering details passed through to the script (sp). Some work, some don't.
We have two machines (Prod & Test) and the results can differ. UserA might
be fine on Prod but not on Test, UserB might befine on Test but not on Prod.
Repeatedly dropping and adding the user gets consistent results on each
machine, whether that be by script, Query Analyser, Enterprise Manager. I
can spot no common denominator, and have found no way to make a "nulling"
user not-null.
Only other thing that I can think worth mentioning: at the Security | Logins
level we have added "Domain\All Users" to grant all users server access.
Database access is granted on a user by user basis (via the script mentioned
earlier.)
Simon.
"Joachim Hofmann" wrote:

> Simon wrote:
>
> Simon,
> we are encountering the same effect, when I do a RESTORE from a Database B
ackup
> from a Server which is not in the Windows Domain. I suppose it has somethi
ng to
> do with an orphaned User SID.
> I suppose when you enter
> use mydb
> sp_helpuser
> you get NULL in the Login column.
> Suggestion: Use a script with 'sp_dropuser' resp. 'sp_revokedbaccess' and
'grantdbaccess' to delete and rebuild the
> user(s).
> If the DB owner user dbo is also void, use 'sp_changedbowner' to reassign
it.
>
> Joachim
>|||You can have null for the login name where there isn't a
matching record in the syslogins table in the master
database. The syslogins table and the sysusers table will be
joined on sid. If no matching record is found in syslogins
by sid, then the login name is null and nothing will display
for Login Name in Enterprise Manager.
-Sue
On Mon, 28 Feb 2005 14:53:03 -0800, "Simon"
<Simon@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Hi Joachim,
>Yes, sp_helpuser does return null. However, we are using a script with the
>mentioned sp's to add users to this database. Way the app works is by a us
er
>entering details passed through to the script (sp). Some work, some don't.
>We have two machines (Prod & Test) and the results can differ. UserA might
>be fine on Prod but not on Test, UserB might befine on Test but not on Prod
.
>Repeatedly dropping and adding the user gets consistent results on each
>machine, whether that be by script, Query Analyser, Enterprise Manager. I
>can spot no common denominator, and have found no way to make a "nulling"
>user not-null.
>Only other thing that I can think worth mentioning: at the Security | Login
s
>level we have added "Domain\All Users" to grant all users server access.
>Database access is granted on a user by user basis (via the script mentione
d
>earlier.)
>Simon.
>
>"Joachim Hofmann" wrote:
>

Friday, February 24, 2012

E-learning Course in SQL

I started a course and got to the lab section. It asked for a password giving me the name of student. I don't know if I was given a password when subscribing for the course. Certainly no in the confirmation email.

Where did I go wrong?

John.

You didn't write down the information or save the email.|||

Hi Arnie,

Thanks for the reply.

I have contacted Microsoft.

I received only one email confilrming payment. It contains no passwods etc.

There may have been something on screen. I am usually very careful to make multiple copies of such info.

Thanks anyway.

John

|||

Who is the class being offered through? Can you contact their customer support to obtain your info and get you back on track?

Thanks,
Sam Lester (MSFT)

|||When you click launch on the left there may be a menu option All content, click that and search in the opened window for Password. I found out this from another website|||

Hi all,

That is the answer.

It only appears when one prints or right clicks and opens. The text in that area otherwise does not give any hint of a logon procedure.

Well done! Smile)

John