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

Friday, March 9, 2012

how to call Excel file in SSRS

Hi ,

I have one report in SSRS , in my report I have one table that display severel links,

and when I click in one line in the table I want to display the Excel file linked to this line.

exemmple :

Line1: Report Balance

Line2: Report Statistic

.....

and When i click on the line1 it will call one Excel file called RPTBAL.xls

Thanks for your help

Where are these Excel files? On a web server? If so, you can add a hyperlink expression that points to the Excel file for each row.

You can't add them on an entire row but you could add them on all the textboxes in the row. You can also make the hyperlink dynamic based on the content of the textbox. That way each row could point to a different file.

|||

Thanks for your eplay , is correct and I tested it and it works fine,

but each time it gives meesage when I call this Excel file , so please you have solution about this , to don't ask me in each call ,

I have the same problem in sharepoint when I call Excel file it dispay message before to open the file .

Regards

How to call an image via code behind

I'm running ssrs 2005 and want to write a function in the code in the page
something like this:
Public Shared Function ShowImage(val as integer) AS Image
IF val = 4 Then
Return apply.png
ELSE
Return nothing
END IF
End Function
Where apply.png is an image in the report project folder (source=external)
How can I do this?
--
moondaddy@.newsgroup.nospamI found a solution.
Basically, if a condition is true then I want to display the image. so I
put the following iff function in the images visibility property's hidden
section.
=IIF(Fields!VP_qpcCap.Value = 4,False,True)
I suppose if I had more complex logic, I could run a function in the code
behind and have it return true or false. then call that function in the
visibility property's hidden section.
"moondaddy" <moondaddy@.newsgroup.nospam> wrote in message
news:%23MMR56TPIHA.4740@.TK2MSFTNGP02.phx.gbl...
> I'm running ssrs 2005 and want to write a function in the code in the page
> something like this:
> Public Shared Function ShowImage(val as integer) AS Image
> IF val = 4 Then
> Return apply.png
> ELSE
> Return nothing
> END IF
> End Function
> Where apply.png is an image in the report project folder (source=external)
> How can I do this?
>
> --
> moondaddy@.newsgroup.nospam
>|||On Dec 12, 11:44 pm, "moondaddy" <moonda...@.newsgroup.nospam> wrote:
> I found a solution.
> Basically, if a condition is true then I want to display the image. so I
> put the following iff function in the images visibility property's hidden
> section.
> =IIF(Fields!VP_qpcCap.Value = 4,False,True)
> I suppose if I had more complex logic, I could run a function in the code
> behind and have it return true or false. then call that function in the
> visibility property's hidden section.
> "moondaddy" <moonda...@.newsgroup.nospam> wrote in message
> news:%23MMR56TPIHA.4740@.TK2MSFTNGP02.phx.gbl...
>
> > I'm running ssrs 2005 and want to write a function in the code in the page
> > something like this:
> > Public Shared Function ShowImage(val as integer) AS Image
> > IF val = 4 Then
> > Return apply.png
> > ELSE
> > Return nothing
> > END IF
> > End Function
> > Where apply.png is an image in the report project folder (source=external)
> > How can I do this?
> > --
> > moonda...@.newsgroup.nospam- Hide quoted text -
> - Show quoted text -
1. Add an Image object to your Report
2. Set the Value expression to "=Code.ShowImage( Fields!
VP_qpcCap.Value )
3. Change the ShowImage function to return a String
4. Change the Return line to Return "apply.pjm" (put it in double
quotes)
-- Scott

Friday, February 24, 2012

How To Calculate Deviation in Matrix?

Hi All,

I want to create following matrix report on SSRS.

Yearmonth

Jan-07

Feb-07

Mar-07

Apr-07

May-07

Sales

Deviation

Sales

Deviation

Sales

Deviation

Sales

Deviation

Sales

Deviation

Product X1 100 0 110 10 130 20 100 -30 90 -10

Here the Problem is i want calculate Deviation:

Deviation for Feb 07= Sales in Feb - Sales In Jan

Deviation For Mar 07 = Sales in Mar - Sales in Feb.

I don't know how to apply formula in Matrix:

Is anybody hele me?

Thank You.

Balwant Patel.

I do not think there is a striaght-forward formula for this since use of the Previous function is not supported in the Matrix data cell. You can either try calculating the deviation from the query itself, or implement it in the following manner using Custom Code:

Place the following VB.Net code in the code tab under report properties:

Shared Public PrevSales as Integer

Public Function CalDeviation(ColCount as Integer,CurSales as Integer) as Integer
Dim deviation as Integer

If ColCount=1 Then
PrevSales=CurSales
deviation=0

Else
deviation=CurSales-PrevSales
PrevSales=CurSales

End If

Return deviation

End Function

Then use the following call to the function in the textbox where you want to show the deviation:

=Code.CalDeviation(RunningValue(Fields!Month.Value,Count,"matrix1_Product"),Sum(Fields!Sales.Value))

Here, I have assumed the names Product, Month & Sales for the respective fields. Also, the Matrix Row Grouping is on Product & Column Grouping is on Month.

Hope this suits your purpose

-Aayush


|||

Hi Aayush,

Thank you very much for your response...

I tried the code given by you...But when try to write the code in code window as below:

=Code.CalDeviation

the function .CalDeviation doesn't come up....

Thank you,

Regards,

Balwant Patel.

|||

Hi Aayush,

The idea that you give me works now but it will not work when i view Report for Year Or Quarter .....

Please help me on this issue...

Thank you,

Regards,

Balwant Patel.

|||I guess it depends on your requirement, and how your Matrix is designed. What kind of functionality do you desire? Suppose you replace your Column Grouping from Month to either Year or Quarter, then it will work. If your column grouping changes on some condition etc, then it might be a bit more complicated.|||

Hi Aayush,

Thank you very much for your response...

I did solve the problem....I applied following logic to solve the problem...In my Data Table I add Six Columns Like CurrMonthSales , PrevMonthSales , CurreQuarterSales , PrevQuarterSales , CurrYearSales , PrevYearSales...And then Updates these columns through Stored proc...And Then Based in Inscope Function...I Apply The Formula.

Thank you very much again..

Regards,

Balwant Patel.

How To Calculate Deviation in Matrix?

Hi All,

I want to create following matrix report on SSRS.

Yearmonth

Jan-07

Feb-07

Mar-07

Apr-07

May-07

Sales

Deviation

Sales

Deviation

Sales

Deviation

Sales

Deviation

Sales

Deviation

Product X1 100 0 110 10 130 20 100 -30 90 -10

Here the Problem is i want calculate Deviation:

Deviation for Feb 07= Sales in Feb - Sales In Jan

Deviation For Mar 07 = Sales in Mar - Sales in Feb.

I don't know how to apply formula in Matrix:

Is anybody hele me?

Thank You.

Balwant Patel.

I do not think there is a striaght-forward formula for this since use of the Previous function is not supported in the Matrix data cell. You can either try calculating the deviation from the query itself, or implement it in the following manner using Custom Code:

Place the following VB.Net code in the code tab under report properties:

Shared Public PrevSales as Integer

Public Function CalDeviation(ColCount as Integer,CurSales as Integer) as Integer
Dim deviation as Integer

If ColCount=1 Then
PrevSales=CurSales
deviation=0

Else
deviation=CurSales-PrevSales
PrevSales=CurSales

End If

Return deviation

End Function

Then use the following call to the function in the textbox where you want to show the deviation:

=Code.CalDeviation(RunningValue(Fields!Month.Value,Count,"matrix1_Product"),Sum(Fields!Sales.Value))

Here, I have assumed the names Product, Month & Sales for the respective fields. Also, the Matrix Row Grouping is on Product & Column Grouping is on Month.

Hope this suits your purpose

-Aayush


|||

Hi Aayush,

Thank you very much for your response...

I tried the code given by you...But when try to write the code in code window as below:

=Code.CalDeviation

the function .CalDeviation doesn't come up....

Thank you,

Regards,

Balwant Patel.

|||

Hi Aayush,

The idea that you give me works now but it will not work when i view Report for Year Or Quarter .....

Please help me on this issue...

Thank you,

Regards,

Balwant Patel.

|||I guess it depends on your requirement, and how your Matrix is designed. What kind of functionality do you desire? Suppose you replace your Column Grouping from Month to either Year or Quarter, then it will work. If your column grouping changes on some condition etc, then it might be a bit more complicated.|||

Hi Aayush,

Thank you very much for your response...

I did solve the problem....I applied following logic to solve the problem...In my Data Table I add Six Columns Like CurrMonthSales , PrevMonthSales , CurreQuarterSales , PrevQuarterSales , CurrYearSales , PrevYearSales...And then Updates these columns through Stored proc...And Then Based in Inscope Function...I Apply The Formula.

Thank you very much again..

Regards,

Balwant Patel.

Sunday, February 19, 2012

How to build a report from a cube in SSRS 2005

Hi, All

I am trying to create a report from analysis service cube but I am facing some problems.

While creating new dataset in report designer, MDX query designer is not displaying while giving Sql Server Analysis Service in Data source.

Please give the details of creating reports using cube.

When you look at the data source, what is it's type? It should be "Microsoft SQL Server Analysis Services" and not "OLEDB" if you want a multidimensional view of the data.