Silvaware
Casual discussions in .NET programming, BI, technology, guitars, music, and beyond.
Thursday, June 16, 2011
Customizing the SharePoint 2010 Menu with CSS and jQuery
You can read it here: Credera Blog (http://blogs.credera.com/2011/06/02/customizing-the-sharepoint-2010-menu-with-css-and-jquery/)
Hope you enjoy it!
Monday, October 04, 2010
Windows Phone 7 Developer Launch: coming to a city near you!
If you are a Microsoft developer, or are involved in any mobile phone development, you probably already heard about the new Windows Phone 7 and the developer platform.
Windows Phone 7 is Microsoft’s reset of their mobile phone platform, from the ground up re-written and redesigned in order to compete and stay relevant in the fast paced world of mobile phone technologies. We all know that the aging [dying] Windows Mobile platform (now in its v6.5 incarnation) was way past its expiration date, and if you are like me, suffering through the last few version of WinMo, then you know exactly what I am talking about.
The new WP7 Dev Tools (SDK) was released in mid September 2010, and there’s already a lot of development going on since the early betas of the SDK were announced at PDC 2009. The dev tools support only .NET development and gives developers two options for providing phone apps: Silverlight or XNA.
In the upcoming months, the dev community will have the opportunity to attend FREE launch events either in person (at major cities) or virtually via wecasts.
You can register for these events by clicking the banner at the top of this post (GO, CLICK IT NOW…what are you waiting for???).
Related Links
Wednesday, April 21, 2010
SQL Server 2008 R2 Released Today
SQL Server 2008 R2 RTM’d today (technically a week ago, but publicly announced today), and will be available on MSDN Subscribers downloads on May 3. You can get the Express or trial edition today, though (if you can’t wait two more weeks for the developer edition).
It includes features such as, but not limited to:
- PowerPivot – data visualize Excel add-in for high-performance “self-service BI”.
- Reporting Services improvements, mapping/geospatial capabilities, Report Builder 3.0.
- Master Data Services – an MDM application and service components for any-domain data hubs.
- StreamInsight – event processing platform for monitoring and analytics of data in motion (think real-time business decisions).
- Support for more processors (Datacenter edition).
- Parallel Data Warehouse (formerly “Madison”) – highly scalable data warehouse appliance (based on DATAllegro)
If you like whitepapers and official docs, go here for marketing material: www.sqlserverlaunch.com
Here is the Microsoft Data Platform Insider blog about it: http://blogs.technet.com/dataplatforminsider/
A ZDNet blog post about the release news: blogs.zdnet.com/microsoft/?p=5973&tag=col1;post-5973
Here is the official product website: http://www.microsoft.com/sqlserver/2008/en/us/R2.aspx
Here is a post from a team member on the SSRS group regarding Reporting Services in this release:
http://blogs.msdn.com/robertbruckner/archive/2010/04/21/sql-server-2008-r2-rtm.aspx
Monday, November 16, 2009
Going to PDC 2009
Today i fly out to L.A., to attend Microsoft’s PDC 2009. I am looking forward to the announcements and demos of the 2010 wave of releases coming up. Stay tuned as I post pics and tidbits of content here on my blog, or on my twitter feed (Follow me on twitter).
See you in L.A!
Wednesday, October 28, 2009
Tech support cheat sheet
Thursday, August 27, 2009
Windows 95 still kicking
Just yesterday, I was walking into my client’s office building when I passed one of the kiosk machines setup along the lobby of the building. The machine is supposed to run a custom software in “kiosk mode” (full screen) that helps visitors with a directory of the building.
To my surprise, that little kiosk machine happened to be stuck in the middle of a shutdown/reboot cycle and here’s what I saw:
If you can’t see the details of the picture – it is running Windows 95! That’s right, 14 years later, Win 95 is still kicking it. Who would have thought???
Sunday, July 05, 2009
Love-Hate Relationship With My Lenovo T61p
I have had my current laptop (company issued) for nearly 2 years now. In technology years, that’s more like 8 years. However, I still think my laptop’s hardware specs can kick butt. So why is it that it takes me nearly 5 min to boot up to Vista? Could Windows 7 solve my woes? Perhaps…
To be fair, since Vista SP1 was released most of my headaches with the hardware went away (in particular, the bug with the sleep/hibernate feature). What is taking my laptop 5 minutes to boot up? What is Vista doing that brings my machine to a halt when booting? What apps are being loaded that suck the RAM out of my machine?
My laptop is a Lenovo T61p, souped up with 4 GB or RAM, which are fully utilizable by the 64-bit edition of Vista Enterprise. On top of that it has a pretty decent video card, the NVIDIA Quadro FX 570M with 256MB dedicated graphics RAM. It also sports an Intel Core 2 Duo 2.4GHz CPU. Overall, I get a nice 4.8 on the Windows Experience Index).
This laptop has all the potentials to be a speedy work horse. It includes 3 USB ports and 1 FireWire, WiFi, Bluetooth, 3-in-1 card reader, DVD-ROM, and a 7200RPM hard drive. For a model that has been out on the market for the last 2 years, I would say that the only things that have seriously improved in laptops are the newer Quad-core CPUs, faster graphics, and bigger hard drives.
I have seriously considered re-paving the machine with Windows 7 for the next while, but the only thing keeping me from it is the downtime while I re-install all my required apps. If/when I do that, I will definitely post my updates and opinions on the process right here. I must say that Win 7 64bit, which is running on a secondary drive on my home desktop, has been a very stable and pleasant experience “out of the box”, much different than my first year on Vista.
I wonder what will be the replacement for the Lenovo T61p, under my employer’s equipment lease program – perhaps the W500?
Saturday, January 24, 2009
Let The Morning Come - CD/DVD project RELEASED
This is a really exciting bit of news: my church's 2nd CD recording project, and 1st DVD, is finally complete and available!!!
We have a rather large pool of musicians and creative artists at my church (www.121cc.com), so last Fall, we all got together for 3 days and wrote and collaborated on music. Then we planned a 2-evening event, which we called "Let The Morning Come" where we recorded music and video of the performances.
I was able to participate in 7 songs on the CD, and after having listened to the final mastered versions, this week...THEY SOUND GREAT! Hats off to all of the folks that were involved, especially David Parker and Chris Clayton (www.chrisclayton.com), who headed up this effort.
We have a MySpace page for the Worship and Creative Arts team, which has a few sample tracks from the album (www.myspace.com/121ccworship).
Also, you can view a trailer/preview of the DVD on YouTube (http://www.youtube.com/watch?v=NP9O1FwpCGI)
Hope you and enjoy - and check out the iTunes Music Store soon if you would like to purchase a copy of your own
So long PPS Planning - Long Live SharePoint
This week, in the news, Microsoft made some pretty big announcements. Besides all the planned layoffs (~5000 jobs will be cut from R&D, IT, Marketing, Sales, Finance, and more), the big one came in the BI arena with regards to PerformancePoint Server and their BI strategy for the future.
After nearly 2 very slow years of adoption, Microsoft has decided to stop development and discontinue the Planning package, originally a part of PerformancePoint Server. Microsoft also plans on rolling the Monitoring and Analytics piece of PPS into SharePoint Server, their enterprise content management and portal software. This move will also rebrand the PPS offering to PerformancePoint Services. Previous ProClarity and Business Scorecard Manager products, which have been integrated into PPS, will no longer be available for purchase as Microsoft puts all of their eggs in the one Microsoft Office basket.
By mid 2009, we should see the final cumulative updates to the current PPS offering, and from then on we'll just need to re-shift our focus. After April 2009, customers and partners will no longer be able to purchase PPS, and will need to get a ECAL of SharePoint Server with Software Assurance, in order to obtain any additional licenses for PPS (even for current deployments).
Part of this decision stems from the fact that Microsoft is putting a lot of effort and investments in the next version of SQL Server in 2010 (aka. "Gemini").
You can read more about this topic, including their press release at the following links:
Office MS BI Blog: Microsoft BI Strategy Update
Wednesday, September 10, 2008
Notification Services on SQL Server 2008
While Notification Services has been officially deprecated in SQL Server 2008, in lieu of Reporting Services' data driven subscription model, the product team at Microsoft made an official announcement yesterday to provide some support for SSNS 2005 from within SQL Server 2008.
Yesterday afternoon, a new Release Candidate (RC1) for the SSNS Components Package was posted to the MS Download site. This component release is not putting SSNS back into SQL Server 2008, rather, it's allowing the use of SSNS 2005 from within SQL 2008.
There are lots of people who complained at the decision to phase out this product – although the numbers were slim. But apparently someone at Redmond was listening, and made steps toward addressing the situation. This should keep SSNS alive as a product for at least another revision of SQL Server, while support will continue its lifecycle for customers still in the 2005 platform.
Here are the details from the MS Download page:
Microsoft Downloads - SQL Server 2005 Notification Services Components Package RC1
"…
Version: | 9.00.4014 |
Date Published: | 9/8/2008 |
Language: | English |
Download Size: | 2.1 MB - 9.6 MB* |
The SQL Server 2005 Notification Services components package provides the following server and client components that are required to deploy and run Notification Services:
· Service components that enable the SQL Server 2005 Notification Services service to execute and provide notification-processing capabilities.
· APIs that can be used within custom applications that include SQL Server 2005 Notification Services functionality:
o Subscription management APIs that enable developers to create subscriptions and subscribers, and to manage subscriber devices.
o Event submission APIs that enable users to specify events by using the event APIs or stored procedures.
The SQL Server 2005 Notification Services components package does not include the SQL Server Management Studio components of Notification Services.
This release of the SQL Server 2005 Notification Services components provides interoperability for running SQL Server 2005 Notification Services against either an instance of the SQL Server 2005 Database Engine or SQL Server 2008 Database Engine.
Note: This release is a pre-release version and is available only for testing. Product support is not available for this pre-release version.
…"
Monday, August 11, 2008
Visual Studio 2008 SP1 and .NET 3.5 SP1 Released Today
The teams at Microsoft officially released the Service Pack 1 for Visual Studio 2008, TFS, and the .NET Framework 3.5. You can download the bits from MSDN or TechNet.
Although the official RTM announcement was made today, some of the release bits actually shipped with the SQL Server 2008 RTM which was released 5 days earlier. If you downloaded SQL Server 2008 prior to today, and already had Visual Studio 2008 installed, you may have encountered some issues during the setup. You might have also noticed that Visual Studio 2008 RTM had a few issues connecting to SQL Server 2008. The SP1 should address these compatibility issues and bring both platforms up to speed.
So what's new in this SP1 for .NET 3.5 and Visual Studio:
- ASP.NET Dynamic Data - data scaffolding and quick automated, template-driven CRUD web sites
- ADO.NET Data Services - query you sql server data store using REST-based URIs.
- ASP.NET Routing Engine - map incoming URLs to route handlers for "beautiful" URLs on your web applications (oh and REST, too)
- Improved AJAX script support for browser history (back/fwd buttons), and script combining for fewer (and cacheable) script resource requests to the web server
- Vast performance improvements to the Visual Studio 2008 designer and better Intellisense support for javascript, classic ASP, etc, WCF refactorings, etc.
- New WindowsForms controls, and significant WPF performance improvements (hardware acceleration)
- WCF scalability improvements and support for the ADO.NET Entity Framework.
- Team Foundation Server improvements
plus...improvements to VB and C# and much more!!!
This SP1 provides a ton of new features, fixes, improvements and enhancements, and makes it well worth the download.
For more details and a more exhaustive list of what's new, check out Scott Guthrie's blog post on the pre-release version. Also, check out Brian Harry's post on today's release with more details on the TFS bits.
Thursday, August 07, 2008
SQL Server 2008 Released!
You can read the official press release here.
Robert Bruckner, from the SSRS product team, blogged about the release and some of the new features in SSRS.
I'll be testing out the RTM this weekend, while wrapping up my last chapter on the Wrox book on SSRS. I'll definitely put out a post about my favorite new features in SQL Server (not just SSRS)....although I can already tell you that I LOVE the Intellisense support for T-SQL within Management Studio...that is da bomb!
Go get your copy from MSDN or TechNet! And let's hear some comments and feedback.
Wednesday, July 09, 2008
SQL Server 2008 On The Horizon
Rumors are floating around that SQL Server 2008 could be RTM'd as early as July 31!!! That's right, the product team has hinted at an August release time frame (thanks to Francois Ajenstat).
This release will align with the soon-to be-RTM SP1 for .NET 3.5 and Visual Studio 2008, which has hooks into the new features of SQL Server 2008. SQL Server 2008's installer now also requires that the .NET 3.5 SP1 be installed, and will attempt to download it as part of installation process.
If you're trying to install the RC0 rev of SQL Server 2008, you will be asked to install the beta SP1 for .NET 3.5 first.
NOTE TO VISUAL STUDIO 2008 USERS:
If you installed the hotfixes for the Web Designer in VS 2008, which were recently shortly after the IDE was released, YOU WILL HAVE TO UNINSTALL THE HOTFIXES prior to intalling SP1.
These hotfixes were rolled up into SP1, and will cause the beta installer to fail if you've already got them. The installation log actually details the KB articles related to those hotfixes.
Once you've removed these hotfixes, the SP1 installer will finish up without a hitch, and you can move on with the setup for SQL Server 2008 (note to self: blog about the new installer experience of SQL Server).
Sunday, June 08, 2008
News from TechEd 2008 - Developer
The conference was fun and I had the pleasure to meet some great new folks as well as see and talk with some well known people in the Microsoft developer community, including Scott Hanselman, Carl Franklin, Juval Lowy, Marc Mercuri, and Ted Neward.
Bill Gates' last official keynote as a Microsoft "employee" (does he count as an employee?) was interesting as he slowly revealed the tip of the iceberg for Microsoft's latest vision for the Software+Services offerings and the newest additions to their development efforts.
This was my 3rd TechEd event, and I have noticed a pattern with attendees: newbies tend to want to attend every possible session, especially those with renowned speakers, while seasoned developers and architects stick to the TLC (Technical Learning Centers), hands on labs, and 1-1 meetings with the product groups.
I realized that when I noticed I'd only attended 5 sessions altogether, and had spent quite a bit of time talking with other like-minded individuals, networking, swapping biz cards, and interacting with Microsoft program managers and developers.
Below are some of the latest announcements from TechEd 2008 Developers (and I expect the IT Pro week to provide another handful of these):
- SQL Server 2008 RC0 - this means they're really close to shipping!
- Silverlight 2.0 Beta 2
- Microsoft "Velocity" CTP1 - distributed in-memory caching
Sunday, April 13, 2008
What's up with the new SSRS 2008 Report Designer
The new Report Designer for 2008 will be included, as of CTP6 and into RTM, in Visual Studio 2008, and also as a standalone installed application. This is significant because it means that business analysts and information workers do not have to license and install Visual Studio (a developer-oriented environment) in order to design/develop reports for SSRS. In SSRS 2005, the only other option that end-users had to develop reports was the Report Builder application.
Report Builder – RB 2005 – is a click-once Windows Forms application that allows users to create ad-hoc reports. However it limits users to retrieving data from Report Models (SMDL files) that were deployed to a report server. Report Models had to created beforehand, by a developer, well-versed in the data structures (DB, Cubes, etc) and business needs, in order to provide the appropriate entities and fields that could be consumed by ad-hoc reports in RB. An interesting concept that came from SMDL and the models is that of infinite drill-through. Basically, the idea is that once the model is created, and a report consumes that modeled data, a field that is displayed on the report can be clicked by the end-user allowing them to drill into the information. The semantic model would understand relationships and hierarchies presented by the data, and provided a generated report with all the attributes and aggregates that were significant to the drilled down information. In theory, the user could keep on clicking through the data “infinitely.”
Unfortunately, the latest I've heard from the SSRS product team on this topic was that, while the SSRS 2008 Standalone Report Designer (codename “blue”) would allow users to create reports, using the same design interface as developers in Visual Studio, which consume SMDL models, they would not be able to perform “infinite drill-through” using these reports, and they would not get an integrated query designer.
In order to address that shortcoming, they chose to keep the 2005 RB click-once application with the RTM version of SSRS 2008. Once they’ve completed this feature with the new designer, they will release the updated Report Designer (blue). This will come in the form of a SQL Server Service Pack (probably SP1).
To summarize, when SQL Server 2008 is released, developers will get the new report designer in Visual Studio 2008,
When SP1 for SQL 2008 is done (or the next available update after RTM), the new Report Designer will have incorporated all of the missing features available in RB 2005, and Microsoft will phase out the RB 2005 tool at that point, in favor of “blue.”
LET’S NOT FORGET ALL THE OTHER NEW FEATURES IN SSRS 2008:
Re-designed memory management (say goodbye to memory leaks in your report servers).
- Directly leveraging HTTP.sys driver - does away with dependency on IIS. This reduces server footprint (and possible attack surface) on dedicated report servers, and allows all of the Reporting Services components to function within one single application pool, under one windows service, by one single service account. This also makes server deployment a breeze.
- Integration of the acquired Dundas Charts and Gauges component – this brings new charts and gauges, with tons of new features that will allow users to create very pretty reports.
- Say good bye to the old matrix and table paradigm…..hello, TABLIX!
- New MS Word (2003) rendering extension, will allow users to export reports to Word .doc files.
- Still get all the neat SharePoint integration features….
Saturday, December 01, 2007
Report Designers For SQL Server 2008 and Visual Studio 2008 - CTP5 and future
I've seen a lot of questions and misunderstanding as to how these products are bundled/SKU'd and what Microsoft's plans are for when SQL Server 2008 RTMs, and what designer will be supported by what IDE. So I'll try to explain, to the best of my knowledge, how these different permutation of SQL and VS versions work together.
Visual Studio 2005/2008 is an IDE shell that can include several dev environments, such as C#, C++, VB, ASP.NET/HTML, RDL/RptProj, etc.
When you install SQL Server 2005 or 2008 (CTP), and specify the client/dev tools option, the setup will check if you already have a SKU of Visual Studio 2005 installed, and if you do, it will only need to install the Report Designer and RptProject support into your existing VS shell.
However if you did not have VS 2005 installed, the setup for SSRS will install the VS shell, and the Report Designer and RptProject. This shell with only support for SSRS (and SSAS, SSIS, if you were installing those as well) is branded BI Development Studio (BIDS).
BIDS is not really a different application than Visual Studio 2005. You can notice, because when you click the BIDS shortcut on your Start/Programs menu, it will show the VS 2005 splash screen. You can also check the target path of the shortcut and notice that it's the same as the target path of your original VS 2005 shortcut (if you did have VS prior to installing SSRS).
When you're developing reports in BIDS/VS, you don't need to have a Report Server installed on that machine (this would be called the "client tools" only installation of SQL Server Reporting Services). You do need a Report Server if you plan to deploy your reports after development.
With regards to VS 2008, I believe that unfortunately the current November CTP5 does not integrate the BIDS/Report Designer into the IDE. So, in other words, you cannot yet use VS 2008 to develop SSRS 2008 Reports.
You will need to either have already installed the VS 2005 IDE, so SQL 2008 can install the report designer bits, or just let the SQL Server 2008 setup install BIDS (which is still the 2005 IDE).
**Note that Microsoft released an update for support of SQL Server 2008 in VS 2005 (you'd receive errors when trying to connect to a SQL 2008 DB from the Server Explorer). This is NOT related to the report designer.
Another thing to keep in mind is that for SSRS 2008, there's a new RDL schema (with the new Tablix report item, and other neat stuff), but as of this CTP5, you can only work with this schema from the Standalone Report Designer preview, that is installed with the CTP5. If you try to open an RDL created from this designer, using BIDS/VS 2005, you should receive an error, because you can only work with 2005-schema RDLs in BIDS/VS 2005.
According to the SSRS team, once SQL 2008 RTMs, they will have integrated the codebase of the new designer, found in the standalone designer preview, with VS 2008/BIDS. It may even be as soon as the next CTP6, but until then, if you want to create brand spanking new SSRS 2008 reports, then you must use the Standalone Designer Preview. If you deploy 2005 RDLs to a SSRS 2008 Report Server, they will be "upgraded" under-the-hood to 2008 in order for the reports to be usable in that version of SSRS.
Not unlike when SQL 2005 was released, and you were forced to convert your SSRS 2000 reports to the new 2005 schema in order to work with them in VS 2005/BIDS, or be forced to have VS.NET 2003 installed to continue to support the SQL 2000 schemas; so will you have to follow the same rules when going from 2005 to 2008. Unfortunately, that's a limitation in how the Report Designer in VS targets a specific schema version for RDLs, so it can't work with multiple schemas.
If you want this feature, go to the Microsoft Connect site, and enter your feature request for RDL version multi-targeting in VS 2008 :-)
I hope this clears up any misunderstanding.
So to sum it up:
Current November CTP5 - has 2 designers: BIDS and Standalone.
- standalone designer preview gives a little taste of what's to come, and is the only way to work directly with the new 2008 schema and features (e.g. Tablix, etc...).
- BIDS has not yet changed, and will work with RDLs in the SQL 2005 schema only, but once you try to deploy to a SSRS 2008 CTP Report Server, the server does an under-the-hood upgrade of the RDL to 2008 so it can store it in the DB.
Future CTPs and RTM Plans - 2 designers: BIDS/VS 2008 for developers, and a Standalone (with Office 2007 Ribbon UI) for Information Workers who don't "live" in Visual Studio.
- standalone designer and VS 2008/BIDS will provide much of the same functionality when developing reports, with the only difference being that BIDS will be hosted in a VS 2008 shell, while the standalone designer will be, well, standalone. And it will have a Ribbon UI (from Office 2007), so non-dev folks don't freak out, but rather feel familiar and comfortable while developing their SSRS reports (this will not be the same as the Report Builder!!!).
If you have SSRS 2005 reports, and you don't wish to convert them to 2008, DON'T OPEN THEM in Visual Studio 2008. For all your SSRS 2008 Reports, you will need the Standalone designer, and eventually either that or VS 2008. You will need to have both versions (2005 and 2008) of BIDS/Visual Studio installed side-by-side (which is supported by Microsoft), if you have to support both RDL versions.
Cheers!
Monday, November 19, 2007
SQL Server 2008 CTP 5 (November) Released
http://www.microsoft.com/downloads/details.aspx?FamilyId=3BF4C5CA-B905-4EBC-8901-1D4C1D1DA884&displaylang=en
This CTP promises to have a lot more features implemented, including a more complete version of the Reporting Services standalone designer tool. The SSRS team has overhauled the UI and included the Office 2007's ribbon interface, making this a very sexy UI for end-users who wish to create reports in a ad-hoc fashion.
I'll be testing this CTP, and will try to post some of the new features on this blog as soon as I can, so stay "tuned".
Thursday, November 01, 2007
Thoughts on Code Analysis and Reviews
They can be customized to include most development standards and rules that a company has adopted, ranging from capitalization rules, all the way to thresholds for cyclomatic complexity (measure of how complex the code path is). Also, if your company uses a Continuous Integration (CI) approach to building and packaging software bits, then these tools can be integrated into the process to prevent code that doesn't meet the defined rules and standards from entering the build process, and possibly notifying the build manager and developer.
These tools can be more unforgiving, especially if you're not totally familiar with the errors it is "taught" to catch, whether in logic flow or in design patterns. That's why a "manual" or personal code-review can be extremely valuable when used in tandem with these tools.
In a lot of companies that perform regular code reviews, these sessions become a finger-pointing, frustrating experience for most people. Usually the managers will bring dev team into a room with a projector and some pizza, and will start pulling up random code to be reviewed by all on the big screen. Some people may find some of the criticism to their work offensive, and it can become very destructive to the team.
A better approach that I have seen is to teach the developers to send a review request of their code to a peer/co-worker directly via email. This usually leads to one or both of two things:
(A) the developers can learn something new or improved in a non-demeaning way, or
(B) they may become personal heroes, since by looking at someone's code during a review, peers may find a solution to another problem they may have been trying to address.
I would recommend implementing manual/personal code reviews as a team-building exercise, as well as to promote better coding practices among the dev team. And then introduce static code analysis with TFS/FxCop, NDepend, etc., as part of the source code check-in process, and/or during the build process.
Catching bad code or errors early on in the dev process costs a lot less than later on after the software has been built and/or possibly released.
Saturday, October 27, 2007
Friday, October 26, 2007
Displaying the query SQL in your Reports
"Is there a programmatic way to pull the dataset SQL and display it on a [Reporting Services 2005] report?"
With a little bit more background information I was able to help her out. Some important facts that needed to be pointed out:
- what flavor or DBMS are you using (hopefully SQL Server 2005)?
- Are you allowed to create and use stored procedures as the backend of your reports?
With those facts straight, we can approach this problem with the following solution (I am sure there are other, perhaps more elegant, ways to solve this, so add your comments).
UPDATED:
If Stored Procedures are not being used, then you can simply include a textbox in your report body with the following expression:
=Datasets!mydatasetname.CommandText
If you'd like, you can set the visibility of this textbox based on another textbox's toggle property, and set the text property for that 2nd textbox as "view report query" with a blue color so it looks like a link or action of some sort.
If you use stored procedures, then read on:
We must adopt a few "standards" regarding reporting and SQL, when approching the problem with this solution.
First, you will want to use Stored Procedures (sproc) for all your report datasets. This allows you to do some extra things with your sql code that you can't do in the report dataset designer.
Second, you will want to use dynamic sql, since you're wanting to output the sql statement as part of your query results (e.g., in a column of your dataset).
SQL Server contains a stored procedure called "sp_executesql" that allows you to execute sql statements much in the same way as using EXEC(@sql). Except, it adds a layer of protection against SQL Injection Attacks by introducing parameterized queries. So in fact what you'd have for your stored procedure is something like the sproc I am including at the bottom of this post.
Notice that we have 2 ways of getting the sql statement: as a rpt developer, you may choose to display the "DebugSql" column in the report, and as SQL developer, you can choose to execute your sproc with the @debug parameter set to 1, so it only prints the sql that would execute. This offers some flexibility for all.
Either way, in the report dataset designer, you can just specify query type of Text (not StoredProcedure, it gets kinda buggy when dealing with dynamic sql). Then for the query text you'll enter something like this:
EXEC dbo.GetMyReportData @param1, @param2
(no need to include the @debug parameter, since it has a default).
There's an excellent whitepaper titled "The Curse and Blessings of Dynamic SQL" by Erland Sommarskog (http://www.sommarskog.se/dynamic_sql.html), where he discusses all the possible ways of doing dynamic sql, including some best practices (like the sp_executesql sproc). I would highly recommend taking a look at this if you need more information on the topic or would like to understand more about the sp_executesql procedure (it's also documented in the SQL Server Books Online at http://msdn2.microsoft.com/en-us/library/ms188001.aspx).
Here is the sample stored procedure SQL, enjoy!
IF EXISTS (SELECT * FROM dbo.sysobjects
WHERE id = OBJECT_ID('dbo.GetMyReportData')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
BEGIN
DROP PROCEDURE dbo.GetMyReportData
END
GO
CREATE PROCEDURE dbo.GetMyReportData
@param1 NVARCHAR(25)
, @param2 NVARCHAR(25)
, @debug BIT = 0
AS
BEGIN
DECLARE @sql NVARCHAR(MAX)
SET @sql = N'
SELECT
col1 AS Column1
, col2 AS Column2
, col3 AS Column3
, @N_debugSql AS DebugSql
FROM
myTable WITH(NOLOCK)
WHERE
col1 = @N_param1
AND col2 = @N_param2'
DECLARE @parameterList NVARCHAR(MAX)
SET @parameterList = N'
@N_param1 NVARCHAR(25)
, @N_param2 NVARCHAR(25)
, @N_debugSql NVARCHAR(MAX)'
IF @debug = 0
BEGIN
EXECUTE sp_executesql @sql, @parameterList
, @N_param1 = @param1
, @N_param2 = @param2
, @N_debugSql = @sql
END
ELSE
BEGIN
PRINT (@sql)
END
END
Saturday, October 06, 2007
How do you organize emails and calendar?
So to start off….here is my so called “system”:
Before
Well….it’s morphing a little since I’ve started using categories and search folders in Outlook 2007. But before, when I used Outlook 2003, I set up multiple subfolders under my Inbox (including one for distribution list emails, travel, and lodging, as well as Admin stuff). Then, using multiple rules, I would automatically have them moved to these folders as they arrived.
Inbox
I confess my Inbox is a dumping ground for old messages. I usually archive items that are about 4-6mos old…..but anything else that isn’t picked up by rules stays in my inbox. I use the search feature to find messages. However it looks like I am starting to go the “google” way to do emails…tagging them by using the categories feature, and combining indexed search with search folders.
Calendar
I try to color code appointments and things on my calendar by using the category selection, but to this day I don’t have a single view of my client calendar (since I have an exchange account at my client and use their Outlook) merged with my work calendar. That would be a nice thing to get working but I am not sure I can do that yet, like the blog post mentioned earlier. I am, however interested in syncing my personal Yahoo calendar, and my wife’s Google calendar up so I can see them using Outlook, and so I can overlay them. If you’ve done that, please share your story.
Mobile
I have a Windows Mobile phone, so I can get my emails and calendar synced, and I have only my Inbox and a couple of the distribution list folders synced up to my phone (no need to see other messages on the mobile).
Instant Messenger
Finally, I have several IM accounts (Yahoo, MSN, GTalk, and I think I even had an ICQ acct at some point…though haven’t used that in years), but honestly, I generally stay on MSN/Windows Live Messenger. When I am the client, since they block IMs, I use Meebo (http://www.meebo.com/), which uses the Internet protocol (HTTP) to transport your messages, so it doesn’t get blocked by firewalls. Also, they allow you to connect to multiple IM services using one ID (VERY NICE)…and it runs from the web browser (which is good and bad). I heard that the Google Talk client allowed you to connect to other IM services besides Google’s, but I’ve yet to try it.
I’d be interested in finding out what other ways are being used to stay organized with your communications, so post your comments, dear readers!
Sunday, August 12, 2007
SQL Server 2008 CTP4 Reporting Services
SSRS 2008 comes with some significant changes in the report design experience, as well as the deployment of the server components. If you're familiar with the current and previous versions of SSRS, you know that it uses IIS as the web server platform for hosting its web service endpoints that allow access to the Report Catalog. In the 2008 version, this is replaced with a clever hosting implementation of the http.sys device driver, which listens for particular HTTP requests and forwards them to the application domains for the ReportServer and Report Manager URL, hosted by the SSRS Windows Service. No longer is there a dependency on IIS for your Report Server, reducing the server footprint, and allowing for more resources to be used by the Report Server itself.
Another enhancement is in the area of Report Rendering. While this particular "side" of SSRS has been, by far, the hardest to extend due to its complexity, if you have written any previous rendering extensions (kudos to you first of all...), they will have to be completely re-written. The Rendering Engine has been completely overhauled (worthy of its own post, soon to come, dear readers), and with this release we also get 2 new additions to the current list of supported renderers: OfficeWriter for Excel and OfficeWriter for Word.
Finally, another "side" worthy of mention is the new stand-alone Report Designer which will target non-developer audiences who do not have (or choose not to have) to the Visual Studio IDE. The stand-alone report designer includes support for the new Tablix report item, which combines the functionality of the Table, List, and Matrix into a single, easy-to-use control (NOTE: the Tablix control is not available in the SSRS 2008 designer for Visual Studio, yet).
Go ahead and download the latest CTP from MSDN (http://msdn2.microsoft.com/en-us/sql/bb498264.aspx), and give it a test run. I'll try to post about each of these (and other) new features in dedicated future posts.
Friday, April 13, 2007
FREE Extended Battery for Samsung BlackJack
Catches:
This offer expires on 4/15/2007 and is not being very well advertised by Cingular (thanks RichDizz and a MSFT employee for tipping off).
Your phone must have an IMEI 352794010030189 are 352794012269959 to be eligible for this offer. You phone's IMEI can be found either on the packaging or under the battery on the phone and contains 15 digits.
Click the following link to redeem your offer:
https://www.web-rebates.com/cingular/blackjack/Step1.asp
Monday, February 27, 2006
Amazing guitar arrangement
Wednesday, January 25, 2006
VB.NET "My" Namespace for C#
However, I've found out that you can use most of the functionalities of that namespace in C# if you import the Microsoft.VisualBasic library into your C# project. (HEART ATTACK! BREATHE!!!!) Ok, for you C# purists, this may be a little nerve-racking, but if you don't like this solution read on for more suggestions.
Once you've added the reference to your C# project, just include the following using statement in your class:
using Microsoft.VisualBasic.Devices;
Then you can use the "MyServices" namespace as follows.
class TestMyServices
{
// Play a sound w/ the audio class
Audio myAudio = new Audio();
Console.WriteLine("Playing sound...");
myAudio.Play(@"c:\WINDOWS\Media\chime.wav");
// or use Computer object to call Audio class
Computer myComputer = new Computer();
myComputer.Audio.Play(@"c:\WINDOWS\Media\ding.wav");
// display time info w/ the clock class
Clock myClock = new Clock();
Console.WriteLine("Current Time: {0}", myClock.LocalTime);
Console.WriteLine("Current day of week: {0}", myClock.LocalTime.DayOfWeek);
// display machine info with computer class
Console.WriteLine("Computer Name: {0}", myComputer.Name);
if (myComputer.Network.IsAvailable)
Console.WriteLine("Computer is connected to Network");
else
Console.WriteLine("No network available");
}
You can gain access to most of the same features of VB's My namespace, except a few (e.g. FileSystemProxy). Here is some of the stuff you can access w/ MyServices:
Audio, Clipboard, Clock, FileSystem, Info, Keyboard, Mouse, Name, Network, Ports, Registry, Screen.
For those classes not available for C# from MyServices, you can most likely use a static method implementation, e.g.:
Microsoft.VisualBasic.FileIO.FileSystem.CopyDirectory(@"c:\origDir", @"c:\copyOfDir");
You can find more on this topic in the Visual Studio 2005 Help by searching for "How to: Use the My Namespace (C# Programming Guide)"Thanks to Kubben at the CodeProject for the great tip.
Happy coding!
Thursday, December 29, 2005
Well...Here I am in the world of bloggin...now what?
I think this will be fun. I will probably be discussing topics involving music, guitars, recording, computers, programming, faith, Jesus, and whatever else may fall in between the cracks.
Please bookmark, and come back soon.