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

Friday, March 9, 2012

Displaying images from SSAS data source

I'm trying to display the images from the Adventure Works SSAS database in a SSRS report.

I've added an image object to the table, set MIME to image/jpeg (as it is set in the value fiel of the attribute in AW SSAS database) but I'm getting just a 'x' instead of the image and following output:

Preview complete -- 0 errors, 1 warnings

[rsInvalidExpressionDataType] The Value expression used in textbox ‘LargePhoto’ returned a data type that is not valid.

Preview complete -- 0 errors, 1 warnings

[rsInvalidExpressionDataType] The Value expression used in textbox ‘LargePhoto’ returned a data type that is not valid.

Preview complete -- 0 errors, 1 warnings

[rsInvalidExpressionDataType] The Value expression used in image ‘image1’ returned a data type that is not valid.

[rsInvalidDatabaseImage] The Value expression for the image ‘image1’ did not evaluate to an image.

Preview complete -- 0 errors, 2 warnings

But displaying images the same way just using the relational AW DW table DimProduct works well.

(the only difference I've seen is: in the query generator from SSAS there is a cryptic text value displayed as the value of the LargePhoto attribute, if using relational table there is a '<binary>')

relational query:

select productalternatekey, largephoto from dimproduct

SSAS query:

WITH MEMBER measures.test

AS

[Product].[Large Photo].currentmember.membervalue

SELECT NON EMPTY

{ [Measures].[Internet Sales Amount], measures.test } ON COLUMNS,

NON EMPTY { ([Product].[Product].[Product].ALLMEMBERS * [Product].[Large Photo].[Large Photo].ALLMEMBERS) } ON ROWS

FROM [Adventure Works]

Where is the problem ? How can I display images from SSAS in SSRS ?

Any ideas are appreciated.

Jan.

A binary member value comes from SSAS as Base64-encoded. You need to use the following expression in your textbox Value property in SSRS:

=System.Convert.FromBase64String(Fields!test.Value)

|||

Great help Teo!

That's it, thanks a lot !

Jan.

Saturday, February 25, 2012

Displaying a trend line (in line chart) in SSRS

We have a line graph which plots the actual data points (x,y), everything is working fine with this graph. Now we need to add a trend line to this existing graph after going thro. the articles we came to know that there is no direct option in SSRS to draw a trend line. So we need to calculate the trend values ourselves which we need to plot as atrend line. This trend line is similar to the trend line which comes in Excel chart, do anyone know how to calculate the trend values from the actual data points. We got through several formulas, but were not clear, have anyone tried out exactly the same, if so please help us out by providing an example to calculate the trend values.

The default functionality of Reporting Services does not support trend lines. There are some additional tools you can purchase to achieve this though, which is talked about in the first link below.

You can take a look at this post: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1148970&SiteID=1
and this one: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=322398&SiteID=1

Jarret

Display User Name

We are looking at deploying SSRS. What I would like to do is display the
user on the home page. Something like:
Welcome Back, Russ Farris!
Is this possible?
Thanks,
RussHi Russ,
You can get the id of the person running the report from the user
collection (ck in books online for syntax). However ... that probably
wouldnt be the users name contained in the user id so you could then use that
to query a table to get the user's full name to display
"Russ Farris" wrote:
> We are looking at deploying SSRS. What I would like to do is display the
> user on the home page. Something like:
> Welcome Back, Russ Farris!
> Is this possible?
> Thanks,
> Russ

Sunday, February 19, 2012

Display of reports on browser with Custom Assembly

Hi friends,

We are using SQL Server Reportin Services 2005 (SSRS) for development of our reports instead of Crystal Reports. As per our clients requirement we want to make all reports dynamic eg. whatever background color user select should appear for that report etc etc.

So for this we have written one function and created DLL for that. Now we are refering that DLL in all our reports as Assembly Name in Reports \ Report Properties \ Referance. We have stored that DLL at two different locations also

C:\Program Files \Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies

so when we run our reports from Preview tab DLL is just wroking fine.

But when we deploy all our report on Brwoser and when we try to execute them from browser DLL is now working i.e no function value is working. only normal report without styleing is coming.

So can anyone help me out coz this is very argent

any help will be greatly appreciated

RTFM ;)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_prog_rdl_6d0i.asp

especially:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSPROG/htm/rsp_prog_rdl_0so6.asp

I gave my custom assembly FullTrust:

<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="MyNewCodeGroup"
Description="A special code group for my custom assembly.">
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\bin\MyAssembly.dll"/>
</CodeGroup>