SQL Reporting :: Correct The Expression Of The Textbox Field?
Nov 16, 2010
i've written the code in expression field...
=format(sum(fields!salary.value),"##,##,##,##,##,##,##0.00")
the code is for printing the number in this format(12,23,23,34,123.00)
now i got an problem i.e if i give 5 digit the it will print ,,,,,12,123.00 the remaining commas
are printed.. i dont want to print the extra commas.. how the word length is there that much it
should take..i.e( for 5 digit 12,123.00 and for 9 digit 12,23,23,123.00)...
i've tried by removing some of the #'s but it is for fixed number..
View 3 Replies
Similar Messages:
Apr 14, 2010
writting the following Field Expression in SSRS
View 2 Replies
Aug 13, 2010
I have a textbox labeled BudgetUsed with the following Color expression: =IIF(ReportItems!BudgetUsed.Value > 1 or ReportItems!BudgetUsed="Div/0","Red","Black") When I display the report, even when the value meets 1 of the criteria in my IIF statement, it still shows up as Black when it should be Red.
If I take out one of the criteria from my original expression, and change it to:
=IIF(ReportItems!BudgetUsed.Value > 1,"Red","Black")
Or change it to:
=IIF(ReportItems!BudgetUsed="Div/0","Red","Black")
The values in the BudgetUsed textbox display correctly in Red. Why can't I use the 2 criteria together using the OR operator? When used alone, both work, so I don't think it's a syntax issue.
View 2 Replies
Dec 10, 2010
How to write a MDX expression to pass the value of a multiselected filter while working with ReportAction in Cubes.
I know how to pass the currently selected value, but want to pass the more than one value selected in the filter.
View 1 Replies
Dec 21, 2010
I am creating a report and I have several paragraphs of text making up my document inside those paragraphs I have data from my database so its made up of static and data driven fields. I need to bold and under line some of my fields inside my expression. I tried creating several columns and putting in my fields in other columns and that does work however it doesn't look that great sometimes there are large gaps in my text between the static and the dynamic.
here is an example of one of about 14 paragrahs in my report.
="The Borrower hereby notifies MACED that it will use "& FormatCurrency(Fields!TotalAmount.Value) & " to fund the costs reflected in this Requisition No. " & Fields!pk_ReqID.Value & ". The above described loan proceeds will be used for the following purposes and in the following amounts:"
As you can see thats one large field I have it works great other than I need to bold and underline my Value and my date can this be done inside my expression in some way like FormatCurrency(Fields!TotalAmount.Value,"BOLD")
View 2 Replies
Feb 25, 2010
i am using .rdlc report .I have three fields like length,width ,height.I want to display Length X Width X Height.This is not multiplication .i want to show in a single column.
View 2 Replies
Nov 24, 2010
i want regular expression for my password field 1. which will not allow to enter two same consecutive charcters 2. it should contain min 8 charcters.3. should contain atleast 2 numeric charcters and if possible code for not allowing user to enter comman passwords
View 2 Replies
Nov 7, 2013
I have qi1 decimal field ... coming error in line ...
txtCostPrice = Convert.ToInt32(((TextBox)GridView2.Rows[i].FindControl("txtcostprice")).Text);
my code
public void savedata() {
con = new SqlConnection(dbcon);
con.Open();
int txtCostPrice = 0;
//int txtSellPrice = 0;
int Primarykey = 0;
[code].....
View 1 Replies
Aug 16, 2010
I have an Entity class which has a Dictionary of fields called Data. Now I want to sort Entities by a field in Data. I was able to verify the Linq expression for using fields in a dictionary as e.Data["UserId"] as this seemed to work perfectly when I used LINQ to Objects. e.g. Entities.OrderBy(e => e.Data["UserId"])
However this same expression does not generate the correct NHibernate criteria and errors out finally with a NullReferenceException for propertyName at Hibernate.Loader.Criteria.CriteriaQueryTranslator.GetEntityName(ICriteria subcriteria, String propertyName)in CriteriaQueryTranslator.cs: line 541.
On debugging through NHibernate code, I figured that NHibernate.Linq.Visitors.MemberNameVisitor.GetMemberName(ICriteria rootCriteria, Expression expr) returns a null string in place of the field name after visiting expr using its visitor. This seems to be the cause of grief. I am using an older version of NHibernate (2.1). Are there any limitations in the NHibernate Linq visitor I should be aware of?
View 1 Replies
Nov 18, 2010
I need to get two fields from a database table (retrieved using linq-to-sql), one field is a datetime (and is a fixed field) and the other is always a decimal, but the field can be different.
The table holds currency data which is processed twice a day and in different currencies so could have fields such as AM_USD, PM_USD, AM_EUR etc. And I need to get data such as a list of the date against PM_USD or the date against AM_EUR.
I would like to be able to call the data using a lambda expression for example (this is a stripped out example):
data = TableData.Select(x=>new {x.DateTimeAdded, x.[**field name as string**]});
I have been trying to write a function to do this, and am failing dismally.
The closest I have managed is:
private Func<TableData, KeyValuePair<DateTime, decimal>> CreateSelect(string FieldName)
{
var parameterExp = Expression.Parameter(typeof(TableData), "sel");
var dateParameter = Expression.Parameter(typeof(DateTime), "DateTimeAdded");
var fieldParameter = Expression.Parameter(typeof(decimal), FieldName);
ConstructorInfo constructorInfo = typeof(KeyValuePair<DateTime, decimal>).GetConstructor(new[] { typeof(DateTime), typeof(decimal) });
NewExpression constructExpression = Expression.New(constructorInfo, new ParameterExpression[] { dateParameter, fieldParameter});
var lambda = Expression.Lambda<Func<TableData, KeyValuePair<DateTime, decimal>>>( constructExpression, parameterExp);
return lambda.Compile();
}
Which fails with "System.InvalidOperationException: Lambda Parameter not in scope".
I'm sure I missing something obvious, or going about it wrong way.
View 2 Replies
Apr 20, 2010
I hosted my web application in IIS on windows server.Also i did mod_aspdotnet(i configured my aspx in httpd.conf of apache server in a linux box).now when i hit the URL of linux box...Im able ot view my aspx....but the problem is no button click event id fired and ASP validators are not working and the javascript written by me also not working.
View 8 Replies
Oct 5, 2010
I'm currently develop a monitoring and evaluation database with many indicators
For example: I have two input indicator : car , truck
Input_IndicatorID quantity
Car 3
Truck 2
I'd like to create an output indicator have field: formular. The result of vehicle =
car + truck = 5
Output_indicatorID formular
Vehicle Car + truck
I don't now how to parse this string, detect parameter: car, truck to get the answer
I search on Google and find some Math parse like: muParser, bcnet but it just for a string
View 8 Replies
Jan 18, 2011
We are using regular expression and required field validators. They work fine, especially in out of the box environments like the log in control.
When used on other controls, e.g. a textbox, they also work, but we note that the whole site is in effect shut down until the expression is valid. I.e. the user cannot click cancel, or a link. The site only starts working again after the expression has been made valid.
How can this be fixed?
The validators should only apply to the control to validate and to the control that would cause the value of that control to be posted back to the server (e.g. a button), not the whole site.
View 2 Replies
Nov 16, 2010
how to use regular expression in vbscript to validate username field. ie it should have minimum of 4 characters and at the same time it should contain minimum of 3 ALPHABETS. ie
1234 - not allowed
abc1 -allowed
My code
dim regObj,retVal
set regObj = new RegExp
regObj.Pattern ="[A-Za-z0-9_s]{4,}"
regObj.IgnoreCase = true
regObj.Global=True
retVal = regObj.Test(sString)
View 2 Replies
Nov 11, 2010
Say I have a table Comments with these columns: Id, Comment, Category, CreatedDate, CommenterIdI want to get the top 5 categories from the Comments table (based on the count of each category in that table). How can I do this in linq, to return either List or IQueryable?
View 2 Replies
Sep 23, 2010
I am passing in a value to the form that I ultimately assign to a textbox using javascript. The value is a calculation based on values from another page/form. However, the textbox is editable.
When reloading the form with the previously saved data, I don't want the value of the textbox to be overwritten with the pre-calculated value from another page if it was edited manually upon save.
The other stipulation is, the page/form that has the values that the calculation is created from, can be changed. Therefore, I would also want to check to see if the calculated value has changed since last load, and if so, load that over the manually entered value.
So...
If textbox is blank populate with calculated value else if Manually entered value trumps calculated value else if calculated value has changed since last calculation, it trumps manually entered value.
The other concern with this all, is how do I determine if the user has typed in the textbox to determine if the value was manually entered?
View 2 Replies
Feb 17, 2010
I have a regular expression
ValidationExpression="^((?!script).)*$"
this works good when I am using it for a normal(singleline) textbox.But when i use this with Multiline textbox it does not work. I am using RegularExpressionValidator control of asp.net for the same.Would there be any way I can make it compatible with Multiline textbox?
View 1 Replies
Oct 26, 2011
What I am trying to do is have a label a textbox and a regular expression in one line and that for 3 lines.
label ---->textbox-->reg expression
label ---->textbox-->reg expression
label ---->textbox-->reg expression
in 3 different lines one above the other.
My problem is that the textbox (and possibly reg expression but i haven't tryied it yet) is not only lossing possition with it's above textbox when zooming but also it will have another position with another browser.So i cannot center the textboxes in one common position one above the other for all zooming and browsing.
What i think is the problem is that the label is pushing the textboxes to the right when zooming and also the letters will zoom a little more or less, according the phrase(so hello will zoom a little more that iiihi, cuz h and e and o take more space).That is just a thought.Anyhow i have tried several html designs starting with one of 3 divs that will include each line but it does not work.My latest try is this one(i'll just use 2 lines for now).
May I also mention that this goes on inside a tab of a TabContainer
Css:
Code:
.BackColorTab
{
position:relative;
background-image:url("images/backrnd.jpg");
width:100%;
height:280px;
}
.textboxrelativator
[Code] ....
So what I'm trying is to have a full line div then 2 included spans,a span for the label and a span for the textbox.This will work but the below textbox will not center and it will also have to have more or less "%" value because clearly it does not ignore the label spacing.
View 5 Replies
Jun 16, 2010
I have a problem with regular expression because I want to validate a textbox and I want that mark the error text when the textbox be empty.
View 1 Replies
Nov 20, 2010
I am using regex for server side validations.
I am facing a problem with regex. I want to check for sepecial characters like ><*&()%$@!~+...
I need to filter these special charecters...but the problem is in my 10 textboxes there only 3 are required...
I can submit the form without entering anything...but my regex is not allowing me to submit the form without giving a space from keyboard...
I just want to check for special charecters and empty textbox without giving a spacebar...
I just check these sites(http://regexlib.com/ and http://www.regular-expressions.info/) and read some documentation on regex...its kind of confusing....
Here is my regex for Middlename: ^[a-zA-Z''-'s]|[ ]{1,40}$ its worked but its not correct....then I changed it to ^[a-zA-Z''-'sd*]{1,40}$ this also not taking emptytextbox without giving a space...
My Goal:
In most of the textboxes I need to allow only numbers and - # _ in some textboxes....
For Address: need to allow alphabets and numbers and #-_' "
City: numbers and alphabets no special chars...
Main problem is I can write regex for most of these stuff but need to all textboxes without entering anything (empty textboxes).My work got stoped due to this.
View 1 Replies
Jul 13, 2010
How can I use a Regular Expression Validator to ensure that only a number like 3.00 is entered into a text box?
View 1 Replies
Sep 8, 2010
i'm stuck with password validation in c#.
I'm using regular expression to validate the string.
Password criteria is alphanumeric.
The password must have atleast one number(0-9), atleast one character(a-z or A-Z)
View 2 Replies
Jul 1, 2010
I want to validate a textbox with regular expression so you only can enter numeric characters, but now I want that the error validation appear if the textbox be empty. here is the code
Types.Add("NUMBER",
new
Validation(@"[d]{1,255}","Only
numbers can be entered in this field."));
View 3 Replies
Apr 26, 2010
I am new to regular expression. Could you give me the syntax in asp.net??
The textbox string should be int value, non zero, non-negative.
View 6 Replies
Apr 2, 2010
I have the following within a gridview:
<asp:Textbox
ID="txtACK855Quantity"
runat="server"
Text='<%# Eval("ACK855Quantity") %>'></asp:Textbox>
<asp:RegularExpressionValidator
id="RegularExpressionValidator1"
runat="server"
ErrorMessage="Invalid" ControlToValidate="txtEstimatedDeliveryDate"
ValidationExpression="^d+$"
Display="Dynamic"></asp:RegularExpressionValidator>
But it's not working. I key a 1 in the textbox and I get the "invalid" errormessage. What am I doing wrong?
View 2 Replies