Showing posts with label clean. Show all posts
Showing posts with label clean. Show all posts

Monday, March 19, 2012

Has "Select All" option been checked for Multi-Valued Parameter?

Greetings.

I have downloaded the patch to SP1 that restores the Select All choice for MVP. I am now wondering if there is a clean way (property?) to know if the Select All box is checked. My reason for needing this is that I want to selectively print a block near the top of the report that shows all of the parameters used to create the report. There are many blocks of parameters and each can have 5-10 possible choices. It would be much cleaner if I could print "all" rather than list all of the possible values, if in fact that category was not really used to filter the rows.

Perhaps I need to build a dynamic where clause but I would rather not go to that trouble if I can use a built in feature or property.

Thanks in advance. I hope this makes sense.

No, this is by design. All values will be passed as a comma separated string.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de|||One possibility that you may use is to add an 'All' option to your selection list. Then in your SQL you could use specify WHERE ((FieldName IN (@.Parameter)) OR ('All' = @.Parameter)). Ugly but functional.

Monday, February 27, 2012

Handling out-dated transaction records

For performance issue, I believe many program should have a house-keeping procedure to clean up transaction history. Is there any best practice to perform this? Or should it be done simply by moving transaction data from the transaction table into a history table? Any better or consideration that I should be concerned of?Depends on your environment. Many places would like to keep records for atleast 2 years, but if you are in the medical field and some of your stuff may fall under HIPAA, then you need to keep the records I believe for like 7+ years. In those cases, I usually have an audit table that contains all the transaction data (It's written to via a trigger). Then I keep the transaction table fairly clean (only recent/open/pending), and if you need historical data, then I run my queries off the audit table instead which is never purged and has a good set of indexes on it.