Showing posts with label showing. Show all posts
Showing posts with label showing. Show all posts

Friday, March 23, 2012

Formatting point labels on a stacked column chart

I have a stacked column chart with two series. The chart by default is
showing point labels in the middle of the bar for each series for each
category on X-axis. I also need to have a label at the top of each
stacked column repesenting sum of Y values for each X value. So if one
series Y value is 5 and second 10 for a particular X value, I need to
show both point labels and a third label at the top of the column
showing 15. Thank you for any feedback.Alibronek,
On the data tab of the chart properties add a new value to the chart, with
the expression of field1 + field2. On the appearance tab check the plot data
as line. This will give you a line above the bars, if you play around with
the markers and style you should be able to hide the line and only show the
markes.
AK Code Rat
"Alibronek" wrote:
> I have a stacked column chart with two series. The chart by default is
> showing point labels in the middle of the bar for each series for each
> category on X-axis. I also need to have a label at the top of each
> stacked column repesenting sum of Y values for each X value. So if one
> series Y value is 5 and second 10 for a particular X value, I need to
> show both point labels and a third label at the top of the column
> showing 15. Thank you for any feedback.
>sql

Friday, March 9, 2012

Formating

Hi ,
I want to display the a numeric field column in two decimal
places.
48.00
48.56
But in the Qty is a Number then it is showing as 48.0. How I can get in two
decimal places
Need Help
BabzWhere do you want to display these numbers? What tool are you talking about?
This is an issue with the client tool you are using.
--
Linchi Shea
linchi_shea@.NOSPAMml.com
"Babz" <notknown@.nodomain.com> wrote in message
news:eL0dzx4lDHA.2080@.TK2MSFTNGP10.phx.gbl...
> Hi ,
> I want to display the a numeric field column in two decimal
> places.
> 48.00
> 48.56
> But in the Qty is a Number then it is showing as 48.0. How I can get in
two
> decimal places
> Need Help
> Babz
>|||Hi
I want this thing in the sql query only.
In the database it is stored as 48.0000. 54.0000, 76.5786.
Even after rounding the value to 2 decimals it is showing in the 4 decimal
places.
I want the data in the following format
48.00
54.00
76.58
Need Help
Babz
"Linchi Shea" <linchi_shea@.NOSPAMml.com> wrote in message
news:Oi#15D5lDHA.2616@.TK2MSFTNGP11.phx.gbl...
> Where do you want to display these numbers? What tool are you talking
about?
> This is an issue with the client tool you are using.
> --
> Linchi Shea
> linchi_shea@.NOSPAMml.com
>
> "Babz" <notknown@.nodomain.com> wrote in message
> news:eL0dzx4lDHA.2080@.TK2MSFTNGP10.phx.gbl...
> > Hi ,
> > I want to display the a numeric field column in two decimal
> > places.
> >
> > 48.00
> > 48.56
> > But in the Qty is a Number then it is showing as 48.0. How I can get in
> two
> > decimal places
> >
> > Need Help
> >
> > Babz
> >
> >
>|||I strongly suggest you follow Linchi's suggestion and have your client tool to format the data. If
you are saying that you are using Query Analyzer, I cannot imagine the format being relevant, as I
trust that you can understand the difference between a value and the presentation and format of such
a value. I do assume that you don't use Query Analyzer to present data to end users.
Having said that, if you *really* want to do this in QA, you need to convert the data to a datatype
for which QA presents two digits to the right of the decimal point. ROUND does *not* change
datatype, it only changes the value. So, you need to use CAST for this. Example:
SELECT CAST(3.1 AS decimal(5,2))
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Babz" <notknown@.nodomain.com> wrote in message news:OfDZbj5lDHA.3688@.TK2MSFTNGP11.phx.gbl...
> Hi
> I want this thing in the sql query only.
> In the database it is stored as 48.0000. 54.0000, 76.5786.
> Even after rounding the value to 2 decimals it is showing in the 4 decimal
> places.
> I want the data in the following format
> 48.00
> 54.00
> 76.58
> Need Help
> Babz
>
> "Linchi Shea" <linchi_shea@.NOSPAMml.com> wrote in message
> news:Oi#15D5lDHA.2616@.TK2MSFTNGP11.phx.gbl...
> > Where do you want to display these numbers? What tool are you talking
> about?
> > This is an issue with the client tool you are using.
> >
> > --
> > Linchi Shea
> > linchi_shea@.NOSPAMml.com
> >
> >
> > "Babz" <notknown@.nodomain.com> wrote in message
> > news:eL0dzx4lDHA.2080@.TK2MSFTNGP10.phx.gbl...
> > > Hi ,
> > > I want to display the a numeric field column in two decimal
> > > places.
> > >
> > > 48.00
> > > 48.56
> > > But in the Qty is a Number then it is showing as 48.0. How I can get in
> > two
> > > decimal places
> > >
> > > Need Help
> > >
> > > Babz
> > >
> > >
> >
> >
>|||THANX FOR REPLYING. I am using dataset object to fetch the data and binding
it with the data list view. In this case how I can format in the front end.
I Know it is .Net related question but still any body knows this can answer
for this.
Thanx and Regards
Babz
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
wrote in message news:eeYBLp5lDHA.2364@.TK2MSFTNGP11.phx.gbl...
> I strongly suggest you follow Linchi's suggestion and have your client
tool to format the data. If
> you are saying that you are using Query Analyzer, I cannot imagine the
format being relevant, as I
> trust that you can understand the difference between a value and the
presentation and format of such
> a value. I do assume that you don't use Query Analyzer to present data to
end users.
> Having said that, if you *really* want to do this in QA, you need to
convert the data to a datatype
> for which QA presents two digits to the right of the decimal point. ROUND
does *not* change
> datatype, it only changes the value. So, you need to use CAST for this.
Example:
> SELECT CAST(3.1 AS decimal(5,2))
> --
> Tibor Karaszi, SQL Server MVP
> Archive at: http://groups.google.com/groups?oi=djq&as
ugroup=microsoft.public.sqlserver
>
> "Babz" <notknown@.nodomain.com> wrote in message
news:OfDZbj5lDHA.3688@.TK2MSFTNGP11.phx.gbl...
> > Hi
> > I want this thing in the sql query only.
> > In the database it is stored as 48.0000. 54.0000, 76.5786.
> >
> > Even after rounding the value to 2 decimals it is showing in the 4
decimal
> > places.
> >
> > I want the data in the following format
> >
> > 48.00
> > 54.00
> > 76.58
> >
> > Need Help
> >
> > Babz
> >
> >
> >
> > "Linchi Shea" <linchi_shea@.NOSPAMml.com> wrote in message
> > news:Oi#15D5lDHA.2616@.TK2MSFTNGP11.phx.gbl...
> > > Where do you want to display these numbers? What tool are you talking
> > about?
> > > This is an issue with the client tool you are using.
> > >
> > > --
> > > Linchi Shea
> > > linchi_shea@.NOSPAMml.com
> > >
> > >
> > > "Babz" <notknown@.nodomain.com> wrote in message
> > > news:eL0dzx4lDHA.2080@.TK2MSFTNGP10.phx.gbl...
> > > > Hi ,
> > > > I want to display the a numeric field column in two
decimal
> > > > places.
> > > >
> > > > 48.00
> > > > 48.56
> > > > But in the Qty is a Number then it is showing as 48.0. How I can
get in
> > > two
> > > > decimal places
> > > >
> > > > Need Help
> > > >
> > > > Babz
> > > >
> > > >
> > >
> > >
> >
> >
>|||Sorry, I'm not that versed with the GUI elements in .NET. Perhaps some other jumps in here, or you
might want to post a new post with a descriptive subject and also include some relevant .net group
in that post.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Babz" <notknown@.nodomain.com> wrote in message news:e8WAyV7lDHA.2272@.tk2msftngp13.phx.gbl...
> THANX FOR REPLYING. I am using dataset object to fetch the data and binding
> it with the data list view. In this case how I can format in the front end.
> I Know it is .Net related question but still any body knows this can answer
> for this.
> Thanx and Regards
> Babz
> "Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
> wrote in message news:eeYBLp5lDHA.2364@.TK2MSFTNGP11.phx.gbl...
> > I strongly suggest you follow Linchi's suggestion and have your client
> tool to format the data. If
> > you are saying that you are using Query Analyzer, I cannot imagine the
> format being relevant, as I
> > trust that you can understand the difference between a value and the
> presentation and format of such
> > a value. I do assume that you don't use Query Analyzer to present data to
> end users.
> >
> > Having said that, if you *really* want to do this in QA, you need to
> convert the data to a datatype
> > for which QA presents two digits to the right of the decimal point. ROUND
> does *not* change
> > datatype, it only changes the value. So, you need to use CAST for this.
> Example:
> > SELECT CAST(3.1 AS decimal(5,2))
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > Archive at: http://groups.google.com/groups?oi=djq&as
> ugroup=microsoft.public.sqlserver
> >
> >
> > "Babz" <notknown@.nodomain.com> wrote in message
> news:OfDZbj5lDHA.3688@.TK2MSFTNGP11.phx.gbl...
> > > Hi
> > > I want this thing in the sql query only.
> > > In the database it is stored as 48.0000. 54.0000, 76.5786.
> > >
> > > Even after rounding the value to 2 decimals it is showing in the 4
> decimal
> > > places.
> > >
> > > I want the data in the following format
> > >
> > > 48.00
> > > 54.00
> > > 76.58
> > >
> > > Need Help
> > >
> > > Babz
> > >
> > >
> > >
> > > "Linchi Shea" <linchi_shea@.NOSPAMml.com> wrote in message
> > > news:Oi#15D5lDHA.2616@.TK2MSFTNGP11.phx.gbl...
> > > > Where do you want to display these numbers? What tool are you talking
> > > about?
> > > > This is an issue with the client tool you are using.
> > > >
> > > > --
> > > > Linchi Shea
> > > > linchi_shea@.NOSPAMml.com
> > > >
> > > >
> > > > "Babz" <notknown@.nodomain.com> wrote in message
> > > > news:eL0dzx4lDHA.2080@.TK2MSFTNGP10.phx.gbl...
> > > > > Hi ,
> > > > > I want to display the a numeric field column in two
> decimal
> > > > > places.
> > > > >
> > > > > 48.00
> > > > > 48.56
> > > > > But in the Qty is a Number then it is showing as 48.0. How I can
> get in
> > > > two
> > > > > decimal places
> > > > >
> > > > > Need Help
> > > > >
> > > > > Babz
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||Have you ensured that your client tool actually holds the value with decimal
places?
The screen output most likely reflects the actual value held.
"Babz" <notknown@.nodomain.com> wrote in message
news:eL0dzx4lDHA.2080@.TK2MSFTNGP10.phx.gbl...
> Hi ,
> I want to display the a numeric field column in two decimal
> places.
> 48.00
> 48.56
> But in the Qty is a Number then it is showing as 48.0. How I can get in
two
> decimal places
> Need Help
> Babz
>

Sunday, February 19, 2012

Format - currency not working

Hi,
I am using reporting services 2000. Setting the format to currency (C) is
not showing the formatted price.
Is this a known problem?What is your value expression for the textbox?
Make sure that the datatype expected for the field is a numeric value.
If the format property doesn't work, set the value of your textbox to
the following expression:
=Format(Fields!MyField.Value, "C")
or
=FormatCurrency(Fields!MyField.Value)
Regards,
Thiago Silva
Gaurav wrote:
> Hi,
> I am using reporting services 2000. Setting the format to currency (C) is
> not showing the formatted price.
> Is this a known problem?|||Thanks Thiago... I was using a Varchar. Changing to numeric did the trick!!
"tafs7" wrote:
> What is your value expression for the textbox?
> Make sure that the datatype expected for the field is a numeric value.
> If the format property doesn't work, set the value of your textbox to
> the following expression:
> =Format(Fields!MyField.Value, "C")
> or
> =FormatCurrency(Fields!MyField.Value)
> Regards,
> Thiago Silva
>
> Gaurav wrote:
> > Hi,
> >
> > I am using reporting services 2000. Setting the format to currency (C) is
> > not showing the formatted price.
> >
> > Is this a known problem?
>

Form submission showing null values

I have designed a for to submit some info to a sql database, but when i enter the information to the form fields and click submit, I get an error saying that a null value cannot be submitted, when it should not be null.

Not to sound whiney, but i really need a code fix, not links to msdn pages that define properties (usually dont do this, but i have a deadline to submit this to my tech admin of my company's site)

Here is the code, and THANK YOU to anyone who helps me with this!!

<%

@.PageLanguage="VB"MasterPageFile="~/MasterPage.master" %>

<

scriptrunat="server">PrivateSub Submitdata(ByVal SourceAsObject,ByVal eAs EventArgs)

SqlDataSource1.Insert()

EndSub' Submitdata

</

script>

<

asp:ContentID="Content1"runat="server"ContentPlaceHolderID="ContentPlaceHolder1"><asp:sqldatasourceid="SqlDataSource1"runat="server"connectionstring="<%$ ConnectionStrings:clientInfoConnectionString %>"selectcommand="SELECT Client Name,Client Address FROM Clients"insertcommand="INSERT INTO Clients (ClientName,ClientAddress) VALUES (@.CName,@.CAddress)"><insertparameters><asp:formparametername="CName"formfield="Namebox"/><asp:formparametername="CAddress"formfield="Addressbox"/></insertparameters></asp:sqldatasource> Name:<br/><asp:TextBoxID="Namebox"runat="server"/><br/>

<asp:RequiredFieldValidatorID="RequiredFieldValidator1"runat="server"ControlToValidate="Namebox"ErrorMessage="Please Enter A Name"></asp:RequiredFieldValidator>

<br/>Address:<br/><asp:TextBoxID="Addressbox"runat="server"/><br/>

<asp:RequiredFieldValidatorID="RequiredFieldValidator2"runat="server"ControlToValidate="Addressbox"ErrorMessage="Please Enter An Address"></asp:RequiredFieldValidator>

<br/><asp:ButtonID="Submitbtn"runat="server"Text="Submit"OnClick="Submitdata"/><br/>

</

asp:Content>

Thanks,

The King

If the columns accept null values your code without any change will work.To Insert into a column wich donot accept null this is the work around.

Make a small change in your code to make it work.

Remove the input parameter specified in the design and add the same in your code .so this part

<insertparameters>

<asp:formparametername="CName"formfield="Namebox"/>

<asp:formparametername="CAddress"formfield="Addressbox"/>

</insertparameters>

can be removed.

In the submit click add this code

SqlDataSource1.InsertParameters.Add(

"CName", Namebox.Text)

SqlDataSource1.InsertParameters.Add(

"CAddress", Addressbox.Text)

Now you are done.

|||

All I can say is

Thank You!!!!!!

It finally works!

Thanks so much,

The King