Posts

Showing posts from 2011

Handy XSLT Tag to output XML data

Many a time we want to display the incoming XML in the XSLT transformation that we are doing. this is specially true when we are working with SharePoint and we do not know the XML format of the incoming XML Data. the XMP tag is a easy way to out the incoming XML to the screen. Just place this in your root tag and refresh the browser and the incoming XML data is displayed Make sure that any other tags in the root tag are commented out before you run the xslt. <xsl:template match="/"> <xmp> <xsl:copy-of select="/"/> </xmp>< !--<xsl:call-template name="dvt_1"/>--></xsl:template>

Print from WPF using ReportViewer Control

Came across a requirements in a project that i was working on were we had to show SQL reports from inside of a WPF application(that WPF does not have a way to show SQL Reports requires another post). Could not find a complete solution that will give the user the code to add and show SQL Reports from WPF. The environment that i have used for this solution is Visual Studio 2010, SQL 2008  R2 deployed on a remote server Below is the complete code using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace ReportViewer { /// /// Interaction logic for MainWindow.xaml /// public partial class MainWindow ...