Showing posts with label ssrs. Show all posts
Showing posts with label ssrs. Show all posts

Wednesday, March 21, 2012

Image From DB - There but not there

Tribe,
I'm struggling with the poorly implemented image handling in SSRS
(which is represented through ASP.NET via
Microsoft.Reporting.WebForms)
First off, SSRS/Reporting team - External Images should mean exactly
that. The report should express EXACTLY what I enter into the Value
field for an External type image in a report. The fact that the engine
interprets and munges this field is an utter travesty. If I enter "/
myDBImageDumper.aspx" this text is what should be expressed out
through the Web report viewer. Period. The use of this property
"UnattendedExecutionAccount" in order to allow the report engine to
render local images is a complete and total hack
Now, in dealing with a simple database supplied image in the reporting
body of a report, I've got an Image type field in a SQLExpress table.
I've loaded this field through a web FileUpload and stored the bytes
in the field. I can render these bytes out through a web page by using
the Response.WriteBinary(reader[IMAGEFIELDPOS]);
I mention this as I know that the image now in the database in the
correct mime format (jpeg).
So, back to the report. I've added an image field to the body of the
report (I want it in the header by alas that is also an
impossibility). To this field I've assigned the mime type "image/
jpeg", the Source of Database, and a Value of:
=System.Convert.ToBase64String(Fields!UserCompanyImage.Value,
"InvoiceHeader_InvoiceHeader")
And of course the image does not render.
Adding that same value to a text field however allows the Base64 to
get dumped out in to that field. Which proves the data is there.
However, I'm baffled as to how to get this image to show up.
Clues anyone
DCTribe,
I lied. I can get the image to show up in the body of the report by
using just the straight byte dump:
=First(Fields!UserCompanyImage.Value, "InvoiceHeader_InvoiceHeader")
But what I'm really trying to do is to get the image up in the header.
So I've got another identical image up in the header and I've got its
Value set to :
=Reportitems!imageLogo.Value
Where imageLogo is the name of the first, body of the report, image.
The header image does not render.
Clues 2?
DC
On Oct 8, 2:44 pm, bangeye <davecl...@.gmail.com> wrote:
> Tribe,
> I'm struggling with the poorly implemented image handling in SSRS
> (which is represented through ASP.NET via
> Microsoft.Reporting.WebForms)
> First off, SSRS/Reporting team - External Images should mean exactly
> that. The report should express EXACTLY what I enter into the Value
> field for an External type image in a report. The fact that the engine
> interprets and munges this field is an utter travesty. If I enter "/
> myDBImageDumper.aspx" this text is what should be expressed out
> through the Web report viewer. Period. The use of this property
> "UnattendedExecutionAccount" in order to allow the report engine to
> render local images is a complete and total hack
> Now, in dealing with a simple database supplied image in the reporting
> body of a report, I've got an Image type field in a SQLExpress table.
> I've loaded this field through a web FileUpload and stored the bytes
> in the field. I can render these bytes out through a web page by using
> the Response.WriteBinary(reader[IMAGEFIELDPOS]);
> I mention this as I know that the image now in the database in the
> correct mime format (jpeg).
> So, back to the report. I've added an image field to the body of the
> report (I want it in the header by alas that is also an
> impossibility). To this field I've assigned the mime type "image/
> jpeg", the Source of Database, and a Value of:
> =System.Convert.ToBase64String(Fields!UserCompanyImage.Value,
> "InvoiceHeader_InvoiceHeader")
> And of course the image does not render.
> Adding that same value to a text field however allows the Base64 to
> get dumped out in to that field. Which proves the data is there.
> However, I'm baffled as to how to get this image to show up.
> Clues anyone
> DC|||Tribe,
Here's the trick (what a mess)
In order to get a dynamic JPEG image out of your database and into the
header of your report you must:
Add a textfield to the body of your report.
Assign the value of that textfield (call this text field
txtImageData):
= Convert.ToBase64String(Fields!MyImageStreamField)
Add an image type to your report header.
Assign the Mime type to image/jpeg and the Source to Database
Assign the value to :
= Convert.FromBase64String(ReportItems!txtImageData.Value)
Your image will then have the byte data that was originally in your
image column in your database table.
DC
On Oct 8, 3:04 pm, bangeye <davecl...@.gmail.com> wrote:
> Tribe,
> I lied. I can get the image to show up in the body of the report by
> using just the straight byte dump:
> =First(Fields!UserCompanyImage.Value, "InvoiceHeader_InvoiceHeader")
> But what I'm really trying to do is to get the image up in the header.
> So I've got another identical image up in the header and I've got its
> Value set to :
> =Reportitems!imageLogo.Value
> Where imageLogo is the name of the first, body of the report, image.
> The header image does not render.
> Clues 2?
> DC
> On Oct 8, 2:44 pm, bangeye <davecl...@.gmail.com> wrote:
> > Tribe,
> > I'm struggling with the poorly implemented image handling in SSRS
> > (which is represented through ASP.NET via
> > Microsoft.Reporting.WebForms)
> > First off, SSRS/Reporting team - External Images should mean exactly
> > that. The report should express EXACTLY what I enter into the Value
> > field for an External type image in a report. The fact that the engine
> > interprets and munges this field is an utter travesty. If I enter "/
> > myDBImageDumper.aspx" this text is what should be expressed out
> > through the Web report viewer. Period. The use of this property
> > "UnattendedExecutionAccount" in order to allow the report engine to
> > render local images is a complete and total hack
> > Now, in dealing with a simple database supplied image in the reporting
> > body of a report, I've got an Image type field in a SQLExpress table.
> > I've loaded this field through a web FileUpload and stored the bytes
> > in the field. I can render these bytes out through a web page by using
> > the Response.WriteBinary(reader[IMAGEFIELDPOS]);
> > I mention this as I know that the image now in the database in the
> > correct mime format (jpeg).
> > So, back to the report. I've added an image field to the body of the
> > report (I want it in the header by alas that is also an
> > impossibility). To this field I've assigned the mime type "image/
> > jpeg", the Source of Database, and a Value of:
> > =System.Convert.ToBase64String(Fields!UserCompanyImage.Value,
> > "InvoiceHeader_InvoiceHeader")
> > And of course the image does not render.
> > Adding that same value to a text field however allows the Base64 to
> > get dumped out in to that field. Which proves the data is there.
> > However, I'm baffled as to how to get this image to show up.
> > Clues anyone
> > DC

Monday, March 19, 2012

I'm not sure what to do...Help

Hi everyone

I have a secure web site with SSRS 2005 installed. The service points to a backend server on our network where the databases reside and we have a firewall.

Previously we have configured our reports and data extentions to use Windows Integrated Security. Now that I have a remote install I need to switch to either forms authentication or Kerberos authentication.

Which one is the easiest to use? My guess is that doing a little coding for forms authentication is the way to go.

With forms authentication I need to create a security extention. What will that do to my custom data extention?

When using Kerberos or Forms authentication can a client still use Report Builder?

I would appreciate any help.

Thanks

-JW

I can't speak to forms authentication, but Kerberos can work.

I say 'can' because if the certificates aren't 100% perfect (URL name matches cert, complete cert chain is trusted, etc), then it will fail, and Kerberos failures are painfully difficult to troubleshoot as normally the only helpful message you receive is 'access denied', with little clue why.

If the server is re-using the client's credentials to access the backend data, then you are already using Kerberos, because that's the only way it's possible to do that, using delegation. An easy way to test if Kerberos will work without having to access outside a firewall is to disable NTLM for that directory in IIS using the adsutil.vbs utility (google can assist with a sample, I don't have the syntax handy), so only the Kerberos half of Windows Authentication is enabled.

And yes, I was able to get Report Builder to work as well. Not sure what effect it might have on the custom data extension without some more details of what it does.

So, my suggestion would be to give Kerberos a try, because if it works, it'll work fairly quickly with no code required. If it gets muddy, then maybe give Forms a try. But as I said, I've never used Forms so can't help you on how.

Geof

Friday, February 24, 2012

IIF problem

Hi all,
I have a problem with an IIF expression on a cell of my report (SSRS 2005).
I have a query that returns some datafields bigint that represent a date.
Because some values are null, I put this expression in my cell:
=IIF(Fields!LedgerReferenceDateIdMinus1.Value="","is null","is not null")
but on report rendering, I get this error:
#Error
in the case of not null.
What have I made wrong?
Thanks a lot.
LuigiOn Apr 14, 8:39 am, Luigi <ciupazNoSpamGra...@.inwind.it> wrote:
> Hi all,
> I have a problem with an IIF expression on a cell of my report (SSRS 2005).
> I have a query that returns some datafields bigint that represent a date.
It looks like you are getting your SQL syntax and your Expression
syntax mixed up when looking for Null values.
When using an expression for an RS field, you can check if a value is
null using the IsNull function, like so:
=IIF(IsNull(Fields!LedgerReferenceDateIDMinus1.value), '',
Fields!LedgerReferenceDateIDMinus1.value)
Or, you could check for Null values within your SQL query which is
probably better, because then you never have to deal with Null values
within that field once the dataset reaches your report:
CASE WHEN LedgerReferenceDateIDMinus1 IS NULL THEN '' ELSE
LedgerReferenceDateIDMinus1 END as LedgerReferenceDateIDMinus1
Good luck!
<
> =IIF(Fields!LedgerReferenceDateIdMinus1.Value="","is null","is not null")
> but on report rendering, I get this error:
> #Error
> in the case of not null.
> What have I made wrong?
> Thanks a lot.
> Luigi|||"Jerry H." wrote:
> When using an expression for an RS field, you can check if a value is
> null using the IsNull function, like so:
>
> =IIF(IsNull(Fields!LedgerReferenceDateIDMinus1.value), '',
> Fields!LedgerReferenceDateIDMinus1.value)
>
> Or, you could check for Null values within your SQL query which is
> probably better, because then you never have to deal with Null values
> within that field once the dataset reaches your report:
>
> CASE WHEN LedgerReferenceDateIDMinus1 IS NULL THEN '' ELSE
> LedgerReferenceDateIDMinus1 END as LedgerReferenceDateIDMinus1
>
> Good luck!
Hi Jerry, I'll try with IsNull in the report.
Thanks a lot for your detailed answer.
Luigi|||I slightly problem.
IfNull give me the "Unrecognized identifier" error.
This is my expression:
=IIF(IsNull(Fields!GrossDeltaMinus1.Value,''),FormatNumber(Fields!GrossDeltaMinus1,2))|||Move your first closing parentheses so that it is between the "e" in
Value and the first comma in your expression.
At the moment, you are passing two parameters over to IsNull, which
only takes one parameter.
On Apr 14, 9:39 am, Luigi <ciupazNoSpamGra...@.inwind.it> wrote:
> I slightly problem.
> IfNull give me the "Unrecognized identifier" error.
> This is my expression:
> =IIF(IsNull(Fields!GrossDeltaMinus1.Value,''),FormatNumber(Fields!GrossDeltaMinus1,2))|||"Jerry H." <boilersrock@.gmail.com> wrote in message
news:7edfeec7-a2fe-4d50-8cef-503e5798b1b5@.f36g2000hsa.googlegroups.com...
> Move your first closing parentheses so that it is between the "e" in
> Value and the first comma in your expression.
> At the moment, you are passing two parameters over to IsNull, which
> only takes one parameter.
> On Apr 14, 9:39 am, Luigi <ciupazNoSpamGra...@.inwind.it> wrote:
>> I slightly problem.
>> IfNull give me the "Unrecognized identifier" error.
>> This is my expression:
>> =IIF(IsNull(Fields!GrossDeltaMinus1.Value,''),FormatNumber(Fields!GrossDeltaMinus1,2))
>
I had that same problem, "Unrecognized identifier" error. and found
IsNothing worked instead.