Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 IIf condition

Author  Topic 

kdnichols
Posting Yak Master

232 Posts

Posted - 2006-12-21 : 14:33:53
Hello,

I am trying to get the false part of this IIf to work correctly.

I only want this row totaled on this one parameter.


= "LSU Total for " & IIf( Parameters!SummaryBy3.Value = "Vendor", Fields!VendorId.Value = 7)


I tried adding ,1 after the last parenthesis but stillg et an error.

TIA

Have a Merry Christmas Everyone!

Kurt

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-21 : 14:41:39
It is the TRUE part that triggers the error!

First part is the condition to met, second part is the TRUE handling and third part is FALSE handling.

IIF(Check this!, If true do this, if false do this)


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

kdnichols
Posting Yak Master

232 Posts

Posted - 2006-12-21 : 15:03:34
Hello Peso,

Thanks I am beginning to understand that part and I understand even more now on the IIf in a divide statement thanks to your help on an earlier post.

I only want that line totaled if the VendorId=7 and nothing else. What is the correct form on the syntax?

Thanks,

Kurt
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-21 : 15:04:59
= "LSU Total for " & IIf( Parameters!SummaryBy3.Value = "Vendor" AND Fields!VendorId.Value = 7, "true", "false")


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

kdnichols
Posting Yak Master

232 Posts

Posted - 2006-12-21 : 15:39:29
Hello Peso,

One last part of this and thanks for your help!

You are definitely Patron of the Yaks!

How can I get this to show up on the last page? I have tried page break at end and I am using SSRS 2000.

TIA again!



Kurt
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-21 : 15:44:16
I don't know.
Is there not a setting for this? Like "keep on same page", "print last page" or something?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-22 : 03:12:22
<<
How can I get this to show up on the last page? I have tried page break at end and I am using SSRS 2000.
>>

In Crystal Reports there is function called Next

If Next(col) is null
--There are no more records so it is last page. Do what you want
End

Check if there is any such function in SSRS

<<
TIA again!
>>

What does it mean?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-22 : 03:49:15
This Is All


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

kdnichols
Posting Yak Master

232 Posts

Posted - 2006-12-22 : 07:43:27
Hello Peso,

I thought TIA meant Thanks In Advance.

Sorry about that

Thanks In Advance.

Kurt
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-12-22 : 07:46:17
At least I tried to influence you unconsiencly...


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

kdnichols
Posting Yak Master

232 Posts

Posted - 2006-12-22 : 08:18:16
Hello,

Instead of printing false I only want this to work if it sees VendorId=7 and then to display those titles on the last page. I was able to get it to quit showing on the other pages by taking out the "LSU For" part of the statement. Instead of showing the word "false" I would like it to show the name of the VendorId field.

What am I missing here.

Thanks In Advance.

Kurt
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-22 : 09:40:29
quote:
Originally posted by Peso

This Is All


Peter Larsson
Helsingborg, Sweden


New Definition?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

kdnichols
Posting Yak Master

232 Posts

Posted - 2006-12-22 : 09:55:48
Hello Peso,

Like the Dilbert comic strip. I will not use Telekenesis.

Peso give me the answer. Peso give me the answer.

Repeat in your mind 1,000,000 times.

LOL

Kurt
Go to Top of Page
   

- Advertisement -