Showing posts with label cell. Show all posts
Showing posts with label cell. Show all posts

Wednesday, March 28, 2012

Images in a table cell, conditional on a data item value

Phew!
I have a table, and in one cell I want to display an image. No big deal. However, I then want another image to be substituted for the original one, if a certain field value is false.

So the logic is,if field value is true, display image 1
if the same field value is false, display image no 2.

The expression I have written so far is:

-iif(Fields!Expr9.Value=False,"image1","image2")

where both image1 and image2 are images embedded into the report.

It shows the first image when the field value is false, but It isn't showing image 2 on lines where the field value is true.

Any takers?

What happens if you invert a condition, i.e.

=iif(Fields!Expr9.Value,"image2","image1")

Monday, March 12, 2012

Im a noob and i need to make cell editable in studio

I have created a table in sql studio and i need to make cell editable and be able to update them to the server. I have looked around here but all i can find is code for the site side, i need a way to do it in studio if possible. BTW im very new to this so im sorry in advance

Hi,

Do you want to edit your data in the tools such like sql management studio? If so, first you should connect to your remote sql server, and click on your database node, open your datatable, edit your data. If you are familiar with sql statement, you can connect to you database server by Query Analyzer and execute your sql command, it also can help you edit the data in your remote database.

Here are some HowTo articles which might be helpful to you .http://support.microsoft.com/ph/2855/en-us/?aid=1&GSA_AC_More1

Hope that helps. Thanks.

|||

OK, thanks i got it working in studio now. How can i make only a part of a row editable and now the rest? I didnt see a way to do that

|||

Hi,

"only a part of a row..."Do you want to make some of the columns editable? Well, it has related to the role problem. In SQL92, you can use GRANT syntax to set the specific authority against those columns or fields in a table and grant a user the authority. About GRANT, see:http://msdn2.microsoft.com/en-us/library/ms178569.aspx .

The second way is just set the authority against a table. The table contains those columns or fields which should be editable or uneditable and make a View with other tables. In this way, you also can achieve your goal.

Thanks.

I'll be away...

I will be out of the country (and without cell phone, pager, and computer
access) until February 3rd, but that day is Super Bowl Sunday, so make it
February 4th.
I apologize in advance if I abandon any ongoing threads, or if you expect an
answer from me and don't get one. I will have access for another day or so.
I doubt I'll be missed all that much, but I just wanted to have a disclaimer
here just in case.So long as you are at the bar in April :)
--
Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:eCDSNaGXIHA.4712@.TK2MSFTNGP04.phx.gbl...
>I will be out of the country (and without cell phone, pager, and computer
>access) until February 3rd, but that day is Super Bowl Sunday, so make it
>February 4th.
> I apologize in advance if I abandon any ongoing threads, or if you expect
> an answer from me and don't get one. I will have access for another day
> or so.
> I doubt I'll be missed all that much, but I just wanted to have a
> disclaimer here just in case.
>|||> So long as you are at the bar in April :)
Wouldn't miss it!|||Where are you at Aaron ?
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:%23X5tKMHXIHA.4196@.TK2MSFTNGP04.phx.gbl...
>> So long as you are at the bar in April :)
> Wouldn't miss it!
>|||> Where are you at Aaron ?
I work out of Boston, MA.
A|||Cool.. Thanks..
I guess nows my chance to annoy everyone else until you get back. Kidding..
I need to get into trying stuff myself or googling for answers before
posting.
Hope to improve over time.
Thanks for all your help.
Enjoy your time off.
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:e3otpZKXIHA.5340@.TK2MSFTNGP06.phx.gbl...
>> Where are you at Aaron ?
> I work out of Boston, MA.
> A
>|||On Jan 21, 3:14 pm, "Aaron Bertrand [SQL Server MVP]"
<ten...@.dnartreb.noraa> wrote:
> > So long as you are at the bar in April :)
> Wouldn't miss it!
likewise|||"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:e3otpZKXIHA.5340@.TK2MSFTNGP06.phx.gbl...
>> Where are you at Aaron ?
> I work out of Boston, MA.
>
Bastan? Hop in da cah, head down to da bah, hang a left at da rotary...

Friday, February 24, 2012

IIF problem

Hi all,
I have a problem with an IIF expression on a cell of my report (SSRS 2005).
I have a query that returns some datafields bigint that represent a date.
Because some values are null, I put this expression in my cell:
=IIF(Fields!LedgerReferenceDateIdMinus1.Value="","is null","is not null")
but on report rendering, I get this error:
#Error
in the case of not null.
What have I made wrong?
Thanks a lot.
LuigiOn Apr 14, 8:39 am, Luigi <ciupazNoSpamGra...@.inwind.it> wrote:
> Hi all,
> I have a problem with an IIF expression on a cell of my report (SSRS 2005).
> I have a query that returns some datafields bigint that represent a date.
It looks like you are getting your SQL syntax and your Expression
syntax mixed up when looking for Null values.
When using an expression for an RS field, you can check if a value is
null using the IsNull function, like so:
=IIF(IsNull(Fields!LedgerReferenceDateIDMinus1.value), '',
Fields!LedgerReferenceDateIDMinus1.value)
Or, you could check for Null values within your SQL query which is
probably better, because then you never have to deal with Null values
within that field once the dataset reaches your report:
CASE WHEN LedgerReferenceDateIDMinus1 IS NULL THEN '' ELSE
LedgerReferenceDateIDMinus1 END as LedgerReferenceDateIDMinus1
Good luck!
<
> =IIF(Fields!LedgerReferenceDateIdMinus1.Value="","is null","is not null")
> but on report rendering, I get this error:
> #Error
> in the case of not null.
> What have I made wrong?
> Thanks a lot.
> Luigi|||"Jerry H." wrote:
> When using an expression for an RS field, you can check if a value is
> null using the IsNull function, like so:
>
> =IIF(IsNull(Fields!LedgerReferenceDateIDMinus1.value), '',
> Fields!LedgerReferenceDateIDMinus1.value)
>
> Or, you could check for Null values within your SQL query which is
> probably better, because then you never have to deal with Null values
> within that field once the dataset reaches your report:
>
> CASE WHEN LedgerReferenceDateIDMinus1 IS NULL THEN '' ELSE
> LedgerReferenceDateIDMinus1 END as LedgerReferenceDateIDMinus1
>
> Good luck!
Hi Jerry, I'll try with IsNull in the report.
Thanks a lot for your detailed answer.
Luigi|||I slightly problem.
IfNull give me the "Unrecognized identifier" error.
This is my expression:
=IIF(IsNull(Fields!GrossDeltaMinus1.Value,''),FormatNumber(Fields!GrossDeltaMinus1,2))|||Move your first closing parentheses so that it is between the "e" in
Value and the first comma in your expression.
At the moment, you are passing two parameters over to IsNull, which
only takes one parameter.
On Apr 14, 9:39 am, Luigi <ciupazNoSpamGra...@.inwind.it> wrote:
> I slightly problem.
> IfNull give me the "Unrecognized identifier" error.
> This is my expression:
> =IIF(IsNull(Fields!GrossDeltaMinus1.Value,''),FormatNumber(Fields!GrossDeltaMinus1,2))|||"Jerry H." <boilersrock@.gmail.com> wrote in message
news:7edfeec7-a2fe-4d50-8cef-503e5798b1b5@.f36g2000hsa.googlegroups.com...
> Move your first closing parentheses so that it is between the "e" in
> Value and the first comma in your expression.
> At the moment, you are passing two parameters over to IsNull, which
> only takes one parameter.
> On Apr 14, 9:39 am, Luigi <ciupazNoSpamGra...@.inwind.it> wrote:
>> I slightly problem.
>> IfNull give me the "Unrecognized identifier" error.
>> This is my expression:
>> =IIF(IsNull(Fields!GrossDeltaMinus1.Value,''),FormatNumber(Fields!GrossDeltaMinus1,2))
>
I had that same problem, "Unrecognized identifier" error. and found
IsNothing worked instead.

Sunday, February 19, 2012

Iif Functions

In a table im populating I have to leave a data cell blank depending on the
value retrieved.
eg. if the breed type is deer leave the cell blank.
Do i use an Iif function for this or not. And if so how do I write it.
Total sqlnewbie here.
I have this so far....Iif(Fields!Breed.Value = Deer......... not sure
what should come next.Put it in the Visibility/hidden property: ....Iif(Fields!Breed.Value ="Deer", True, False)
"Nat Johnson" wrote:
> In a table im populating I have to leave a data cell blank depending on the
> value retrieved.
> eg. if the breed type is deer leave the cell blank.
> Do i use an Iif function for this or not. And if so how do I write it.
> Total sqlnewbie here.
> I have this so far....Iif(Fields!Breed.Value = Deer......... not sure
> what should come next.