Showing posts with label based. Show all posts
Showing posts with label based. Show all posts

Wednesday, March 28, 2012

How to make subreport visible based on parameter condition?

Hi,

I have a subreport added to the main report and I want to make this report visible only when the parameter value is met.

Ex, I have a parameter CustName in the main report and want to show the subreport when the custName = xxxxx. There reports are parameter driven not data driven reports.

Any help is greatly appreciated.

Thanks,

Sirisha

When you are binding the Subreport and main report with a parameter , you can accomplish this by doing below steps.

1.) Click on Subreport and go the properties.

2.) In the second tab which is "Visibility" click on Expression radiobutton and press Fx button and paste this code.

=IIF(Fields!CustName.Value= "xxxxx",False,True)

Hope this helps...

|||Thanks Deepak, it worked great

Monday, March 26, 2012

How to make computed field out of conditional

Short Form of Question.
How to do IF statement in computed field. Wanting to concat on to
resulting field based on simple conditional.
made up syntax of what I want:
STR(users_id) + IF(ActiveEmail==1,'A',STR(id))
Long Form:
I want to make a computer field like the following. I'm going to make
up the syntax which of course doesn't work. Wondering if someone
could suggest some syntax that does.
Thanks
Database Columns:
ActiveEmail bit,
users_id Int
id INT
STR(users_id) + IF(ActiveEmail==1,'A',STR(id))
that is, say users_id=10
id=99
ActiveEmail=1
I want for my computer column 10A
users_id=10
if id=99
activeemail=0
I get 1099
THanks,
Peter Kellner
http://peterkellner.net
Peter Kellner
http://peterkellner.netHi Peter
Try something like:
SELECT CAST (users_id AS VARCHAR(10)) + CASE WHEN ActiveEmail = 1 THEN 'A'
ELSE CAST(id AS VARCHAR(10)) END AS Result
FROM MyTable
John
"Peter Kellner" <pkellnernews@.73rdstreet.com> wrote in message
news:uu084259i3cclbbc61uhhju9c834f7c2mg@.
4ax.com...
> Short Form of Question.
> How to do IF statement in computed field. Wanting to concat on to
> resulting field based on simple conditional.
> made up syntax of what I want:
> STR(users_id) + IF(ActiveEmail==1,'A',STR(id))
> --
> Long Form:
> I want to make a computer field like the following. I'm going to make
> up the syntax which of course doesn't work. Wondering if someone
> could suggest some syntax that does.
> Thanks
> Database Columns:
> ActiveEmail bit,
> users_id Int
> id INT
> STR(users_id) + IF(ActiveEmail==1,'A',STR(id))
> that is, say users_id=10
> id=99
> ActiveEmail=1
> I want for my computer column 10A
> users_id=10
> if id=99
> activeemail=0
> I get 1099
> THanks,
> Peter Kellner
> http://peterkellner.net
> Peter Kellner
> http://peterkellner.net|||On Mon, 17 Apr 2006 22:33:32 +0100, "John Bell"
<jbellnewsposts@.hotmail.com> wrote:

>Hi Peter
>Try something like:
>SELECT CAST (users_id AS VARCHAR(10)) + CASE WHEN ActiveEmail = 1 THEN 'A'
>ELSE CAST(id AS VARCHAR(10)) END AS Result
>FROM MyTable
>John
>
Perfect! Thank you John.
Peter Kellner
http://peterkellner.net|||On Mon, 17 Apr 2006 22:33:32 +0100, "John Bell"
<jbellnewsposts@.hotmail.com> wrote:

>Hi Peter
>Try something like:
>SELECT CAST (users_id AS VARCHAR(10)) + CASE WHEN ActiveEmail = 1 THEN 'A'
>ELSE CAST(id AS VARCHAR(10)) END AS Result
>FROM MyTable
>John
>
Perfect! Thank you John.
Peter Kellner
http://peterkellner.net

How to make computed field out of conditional

Short Form of Question.
How to do IF statement in computed field. Wanting to concat on to
resulting field based on simple conditional.
made up syntax of what I want:
STR(users_id) + IF(ActiveEmail==1,'A',STR(id))
--
Long Form:
I want to make a computer field like the following. I'm going to make
up the syntax which of course doesn't work. Wondering if someone
could suggest some syntax that does.
Thanks
Database Columns:
ActiveEmail bit,
users_id Int
id INT
STR(users_id) + IF(ActiveEmail==1,'A',STR(id))
that is, say users_id=10
id=99
ActiveEmail=1
I want for my computer column 10A
users_id=10
if id=99
activeemail=0
I get 1099
THanks,
Peter Kellner
http://peterkellner.net
Peter Kellner
http://peterkellner.netHi Peter
Try something like:
SELECT CAST (users_id AS VARCHAR(10)) + CASE WHEN ActiveEmail = 1 THEN 'A'
ELSE CAST(id AS VARCHAR(10)) END AS Result
FROM MyTable
John
"Peter Kellner" <pkellnernews@.73rdstreet.com> wrote in message
news:uu084259i3cclbbc61uhhju9c834f7c2mg@.4ax.com...
> Short Form of Question.
> How to do IF statement in computed field. Wanting to concat on to
> resulting field based on simple conditional.
> made up syntax of what I want:
> STR(users_id) + IF(ActiveEmail==1,'A',STR(id))
> --
> Long Form:
> I want to make a computer field like the following. I'm going to make
> up the syntax which of course doesn't work. Wondering if someone
> could suggest some syntax that does.
> Thanks
> Database Columns:
> ActiveEmail bit,
> users_id Int
> id INT
> STR(users_id) + IF(ActiveEmail==1,'A',STR(id))
> that is, say users_id=10
> id=99
> ActiveEmail=1
> I want for my computer column 10A
> users_id=10
> if id=99
> activeemail=0
> I get 1099
> THanks,
> Peter Kellner
> http://peterkellner.net
> Peter Kellner
> http://peterkellner.net|||On Mon, 17 Apr 2006 22:33:32 +0100, "John Bell"
<jbellnewsposts@.hotmail.com> wrote:
>Hi Peter
>Try something like:
>SELECT CAST (users_id AS VARCHAR(10)) + CASE WHEN ActiveEmail = 1 THEN 'A'
>ELSE CAST(id AS VARCHAR(10)) END AS Result
>FROM MyTable
>John
>
Perfect! Thank you John.
Peter Kellner
http://peterkellner.net|||On Mon, 17 Apr 2006 22:33:32 +0100, "John Bell"
<jbellnewsposts@.hotmail.com> wrote:
>Hi Peter
>Try something like:
>SELECT CAST (users_id AS VARCHAR(10)) + CASE WHEN ActiveEmail = 1 THEN 'A'
>ELSE CAST(id AS VARCHAR(10)) END AS Result
>FROM MyTable
>John
>
Perfect! Thank you John.
Peter Kellner
http://peterkellner.netsql

How to make Application.LoadPackage() and Package.Execute() to run asynchroniously?

Hi,

I am trying to execute a SSIS package programmatically. When a user drops a file in a shared folder, we execute the package based on that file. I am using SqlServer.DTs.Runtime.Application.LoadPackage() and SqlServer.DTs.Runtime.Package.Execute() functions each time to do this.

The problem is, when, say two people drop a file, the second one will not execute untill the first one is completed. I also tried only calling LoadPackage() a single time, and then storing the instance and calling Execute() in a different thread on each file drop; although the blocking still occurs. I assume the Package object is the one doing the blocking then behind the scenes.

Is there any built in functionality to make these functions (Application.LoadPackage() and Package.Execute()) run async? If not, has anyone had much success sticking these calls into a thread? I tried sticking these calls into a thread using System.Threading.ThreadPool.QueueUserWorkItem(), and this appears to work, however it randomly crashes the program when I drop multiple files one after the other. The exception also isn't too helpfull (pasted below):

"The package failed to load due to error 0xC0011008 "Error loading from XML. No further detailed error information can be specified for this problem because no Events object was passed where detailed error information can be stored.". This occurs when CPackage::LoadFromXML fails."

So, is what I am trying to do possible? I know it must be, because when I was using .NET 1.X, I was just calling dtexec via the command line, and dtexec was able to execute many packages simultaneously....

Thanks for any help,

DrewThe calls are synchronous, but each package object is independent - so if you create a thread per incoming file, create a new package object and do LoadPackage/Execute you should get the behavior you need.

The random errors you see are probably caused by your code trying to load the DTSX file before it was fully copied. So SSIS tries to read partial file and throws the error reporting it is not a valid XML file. You need some way to ensure you only load a file when it is ready, e.g. try opening it exclusively until you succeed (it will fail if someone is still writing to the file).

Friday, March 23, 2012

How to make a datawarehouse?

Hello, as far as I know for making cubes I need forst a Datawarehouse or I can even make a cube based on an OLTP database, but I think this option is not recommended because its the transaction database.

The Analisys Services Projects let me create cubes very easy based on a datawarehouse or a relational database.

The question is How do I make the datawarehouse based on the relational database?
How does the datawarehouse refreshed from the new transactional data?

I think that I will have to make some Iintegration Services Packages to convert relational data to datawarehouse but I have no idea in how to make it in theory and obviously in practice.

Thanks for your helpRalph Kimball is considered to be the "inventor" of data warehouse theory so check out his series of articles on the subject: http://www.rkimball.com/html/articles.html

He also has a couple of books which are generally highly recommended:
http://www.amazon.co.uk/exec/obidos/ASIN/0471200247/qid=1122200276/sr=8-1/ref=sr_8_xs_ap_i1_xgl/026-0530835-6201264
http://www.amazon.co.uk/exec/obidos/ASIN/B0006UEZO6/qid=1122200287/sr=2-1/ref=sr_2_11_1/026-0530835-6201264

A good textbook with worked examples is worth its weight in gold. The one I used is out of date now and I'm not sure which is the best textbook around at the moment. Perhaps someone here has some ideas?

-Jamie|||Your second amazon link is broken. Could you please provide the name ant the author?
Many thanks!
|||I would assume Jamie meant to link you to several of Ralph Kimball's books.
The two I have on my desk are the Data Warehouse Toolkit and the Data Warehouse ETL Toolkit. Both are primarily written by Ralph Kimball. Ralph also has another book called The Datawarehouse Lifecycle toolkit, but I haven't read it yet.
There is a philosophical schism in the area Data Warehouse design, architecture and implementation. Kimball is by far the more popular and is the camp that I tend to follow. The other camp is lead by Bill Inmon. You can find some more information at his website (http://www.inmongif.com).
Larry

How to make a datawarehouse?

Hello, as far as I know for making cubes I need forst a Datawarehouse or I can even make a cube based on an OLTP database, but I think this option is not recommended because its the transaction database.

The Analisys Services Projects let me create cubes very easy based on a datawarehouse or a relational database.

The question is How do I make the datawarehouse based on the relational database?
How does the datawarehouse refreshed from the new transactional data?

I think that I will have to make some Iintegration Services Packages to convert relational data to datawarehouse but I have no idea in how to make it in theory and obviously in practice.

Thanks for your helpRalph Kimball is considered to be the "inventor" of data warehouse theory so check out his series of articles on the subject: http://www.rkimball.com/html/articles.html

He also has a couple of books which are generally highly recommended:
http://www.amazon.co.uk/exec/obidos/ASIN/0471200247/qid=1122200276/sr=8-1/ref=sr_8_xs_ap_i1_xgl/026-0530835-6201264
http://www.amazon.co.uk/exec/obidos/ASIN/B0006UEZO6/qid=1122200287/sr=2-1/ref=sr_2_11_1/026-0530835-6201264

A good textbook with worked examples is worth its weight in gold. The one I used is out of date now and I'm not sure which is the best textbook around at the moment. Perhaps someone here has some ideas?

-Jamie|||Your second amazon link is broken. Could you please provide the name ant the author?
Many thanks!
|||I would assume Jamie meant to link you to several of Ralph Kimball's books.
The two I have on my desk are the Data Warehouse Toolkit and the Data Warehouse ETL Toolkit. Both are primarily written by Ralph Kimball. Ralph also has another book called The Datawarehouse Lifecycle toolkit, but I haven't read it yet.
There is a philosophical schism in the area Data Warehouse design, architecture and implementation. Kimball is by far the more popular and is the camp that I tend to follow. The other camp is lead by Bill Inmon. You can find some more information at his website (http://www.inmongif.com).
Larry
sql