Showing posts with label content. Show all posts
Showing posts with label content. Show all posts

Wednesday, March 28, 2012

How to arrive at Grand total?

Hi All,

My doubt is, how to get gand total in SQL Reporting Services2005 for the following scenario?

Sample report content:

CustomerId Product Name Price

123 Apple $100.00

Orange $77.00

SUB TOTAL $177.00

124 Apple $105.00

Orange $70.00

Olive $450.00

SUB TOTAL $625.00 // sum(Fields!Price)

GRAND TOTAL $802.00 //How to get Grand total? please..

Regards,

Pragash

put the expression "=sum(Fields!Price)" in the report footer

|||

Put it in the footer like in this way:Sum(Fields!Price,"Datset name").

Hope this helps.

|||

Hi Jon,

I tried with the following data but I am getting different result.

CustomerId Product Name Price

123 Apple $100.00

Orange $77.00

SUB TOTAL $177.00

124 Apple $105.00

Orange $70.00

Olive $450.00

SUB TOTAL $625.00

125 Apple $100.00

Orange $10.00

Olive $10.00

SUB TOTAL $120.00 // sum(Fields!Price.value)

GRAND TOTAL $328.00 // sum(Fields!Price.value) but it has to be $922.00 right but what its giving is subtotal2-subtotal1-subtotal3=$328.00 Why?

|||

Hi Mahima,

Its giving #Errr output when I used sum(Fields!Price,"Dataset_Name"), any other way?

|||

Hi ,

I am getting it now by puting sum(Fields!Price.Value) in the Table footer not in the report footer(page footer).

Thanks

Wednesday, March 21, 2012

How to align image in table cell

I have a report that serves as a product catalog and the main content are
thumbnail images of the products with a SKU number on top of each one. All
of the table columns are 1 inch wide, but the images vary in width and often
are .5 inches wide or even less. By default all the images are aligned
top-left. I want to align them in the center. Is there any way to do this?
Thanks.
--
moondaddy@.nospam.comI have the same problem. Even when I create an image that is the width
of the the cell with the content centered inside it, Reporting
Services still aligns it to the left.
Please help. This group does not seem to be very well monitored: no
replies to this question after nearly a month.
Thanks
"moondaddy" <moondaddy@.nospam.com> wrote in message news:<#aVsILfdEHA.216@.TK2MSFTNGP11.phx.gbl>...
> I have a report that serves as a product catalog and the main content are
> thumbnail images of the products with a SKU number on top of each one. All
> of the table columns are 1 inch wide, but the images vary in width and often
> are .5 inches wide or even less. By default all the images are aligned
> top-left. I want to align them in the center. Is there any way to do this?
> Thanks.sql

Monday, March 12, 2012

How to add newline in column of type nvarchar

Hi,
I want to add a newline in a content of sql column (using t-sql and not asp.net textbox) so when content is being rendered in a .net textbox I get separate rows, so instead
col1 col2 col3
I woule like to have
col1
col2
col3
Thanks

You can use CHAR(13) to insert a carriage return into the string. e.g.

INSERT INTO MyTable (MyStringColumn) VALUES('My name is'+CHAR(13)+'Colin Mackay')
See also SQL Server Books-On-Line:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ca-co_6xte.asp
Does this help?

|||Yes, that's it, thanks