Showing posts with label order. Show all posts
Showing posts with label order. Show all posts

Tuesday, March 27, 2012

Forms Authentication Requirements

Do you need to be running the Enterprise edition of SQL in order to use
forms authentication or can it work with the standard edition?Custom security extensions (forms based authentication is a custom security
extension) are supported in the Enterprise/Developer/Evaluation edition of
Reporting Services. It is not supported in the Standard edition. Check out
the link below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSinstall/htm/gs_installingrs_v1_72jq.asp
Adrian M.
MCP
"Stephen Farmer" <Stephen.Farmer@.LucrumInc.Com> wrote in message
news:OaKNefwVFHA.1040@.TK2MSFTNGP10.phx.gbl...
> Do you need to be running the Enterprise edition of SQL in order to use
> forms authentication or can it work with the standard edition?
>
>sql

Monday, March 26, 2012

Formatting totals with the table footer

Here's a scenario that i'm trying to figure out.

In the table details, i return order number, item, manufacturer, and total cost of the order.

This is what it originally looked like:

Order Number Item Manufacturer Total Order Cost

1 portable DVD Company A $100

1 portable DVD Company B $100

1 portable DVD Company C $100

2 portable DVD Company B $100

2 portable DVD Company D $100

2 portable DVD Company F $100

Grand Total $600

I can get the table to look like this after hiding duplicates:

Order Number Item Manufacturer Total Order Cost

1 portable DVD Company A $100

1 portable DVD Company B $100

1 portable DVD Company C $100

2 portable DVD Company B $100

2 portable DVD Company D $100

2 portable DVD Company F $100

Grand Total $600

The problem is the grand total. It should be $200 but it takes in the all total costs in the row because I have:

=FormatCurrency(Sum(Fields!TotalCost.Value)) in the footer and it'll sum up all.

I'm stumped here. Any suggestions are greatly appreciated.

Thanks a lot for taking the time to read.

Hiding duplicates will invariably give you wrong values especially when adding. I have had the same scenario and I found the answer here on this fourm long time back. You need to do a sum of TotalOrderCost for distinct values of OrderNumber. In the Code block (available from the Report Properties dialog), you would add:

Dim orderIDs As System.Collections.Hashtable
Dim total As Double

Function MyFunc(ByVal orderID As Object, ByVal TotalOrderCost As Obect) As Double
If (orderIDs Is Nothing) Then
orderIDs = New System.Collections.Hashtable
End If
If (orderID Is Nothing) Then
MyFunc = total
Else
If (Not orderIDs.Contains(orderID)) Then
total = total + TotalOrderCost
orderIDs.Add(orderID, TotalOrderCost)
End If
MyFunc = total
End If
End Function

3.) In your report, you add a hidden textbox with the value expression to compute the value:

=Sum(Code.MyFunc(Fields!OrderID.Value, Fields!TotalOrderCost.Value))

4.)In the footer of the table, you add a textbox with the value expression:

=Code.MyFunc(Nothing, Fields!TotalOrderCost.Value)

to return the total value.

Hope this helps....

|||

Thanks for your help.

I'll give it a try.

Monday, March 19, 2012

formatting columns in a view

I have a view that I created from 4 SQL tables in order to query data for a report. I can't change the format of columns in the original table but would like to format the columns in the view as a different data type.

The original table has the values formated as varchar, the info in the columns is numbers and I would like to have the values changed to decimal when the view is queried.

Is this even possible? Any help would be appreciated.

You should be able to cast them in the select clause of your view (Assuming ALL of the data in those columns is numeric)

CREATE VIEW v1

AS

SELECT CAST(charcol1 AS Decimal(18,2)) AS numcol1, ...

|||Perfect. Thank you!

Wednesday, March 7, 2012

Format question of text concatenation

I have a text like this '*'& Field!Item.Value. I would like to highlight the
asterisk '*' as red color and bold in order to make the end user notice it
easier.
How can I do it? Thanks for your help.you could have 2 textboxes adjacent to each other. the first one would show
the '*' and the second one could show the Field!item.value. You could then
set the first text color to red.|||Because the asterisk which is showing off are based on the value of Item
field. I can use two adjacent boxes to do it. I wonder if there is no way to
do it in one textbox?
Thanks,
"george" wrote:
> you could have 2 textboxes adjacent to each other. the first one would show
> the '*' and the second one could show the Field!item.value. You could then
> set the first text color to red.|||One way to do any special formatting of items in a textbox is with some
custom code. Maybe there is an easier way to do this, but if you just
created a function that showed or did not show the asterisk based on
the field value, you could then reference it in the textbox.|||A single textbox cannot display text in multiple colors. We will enable this
in a future version of Reporting Services via support for rich text.
--
Rajeev Karunakaran [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Sally" <Sally@.discussions.microsoft.com> wrote in message
news:99831223-41CE-4734-8E90-519A6FDCDDEC@.microsoft.com...
> Because the asterisk which is showing off are based on the value of Item
> field. I can use two adjacent boxes to do it. I wonder if there is no way
> to
> do it in one textbox?
> Thanks,
> "george" wrote:
>> you could have 2 textboxes adjacent to each other. the first one would
>> show
>> the '*' and the second one could show the Field!item.value. You could
>> then
>> set the first text color to red.

Sunday, February 19, 2012

Format a number for use as number in Excel

I want to format a number like "#,##0.00" in order to handle it in Excel as a number (i.e. compute a sum).

Excel is able to show a number in a specail format and still allow to compute with ...

Thanks in advance,

Peter

What problem are you having? If you have #,##0.00 set as your format code, you should be able to export to Excel and then do a sum on that column.

Jarret

|||

It doesn't work in my Excel neither with 1 value nor with many values - the sum is 0 anytime.

Peter

|||

I found this on another post (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1072895&SiteID=1):

Apply formatting using N in the Format property, then in the value textbox, apply an explicit cast of the value. E.g.

=CDbl(Fields!Example.Value)

Hope this helps.

Jarret