Click here to Skip to main content
15,881,413 members
Articles / Web Development / HTML

Generating Word Reports / Documents

Rate me:
Please Sign up or sign in to vote.
4.94/5 (122 votes)
4 Oct 2009CPOL22 min read 702.1K   8K   544  
Generate Word documents by appling XSLT on XML data.
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{29945924-5A8B-4DC2-9A7E-4ED48C88A992}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>GeneratingMicrosoftWordReports.Reports</RootNamespace>
    <AssemblyName>GeneratingMicrosoftWordReports.Reports</AssemblyName>
    <StartupObject>
    </StartupObject>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Getters.cs" />
    <Compile Include="Report.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <EmbeddedResource Include="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <None Include="Doc\AreaCategoryQuestion.doc" />
    <None Include="Doc\GroupingExample.doc" />
    <None Include="Doc\ImageExample.doc" />
    <None Include="Doc\WordGeneratedInvoice.doc" />
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    </None>
    <None Include="Xsd\AreaCategoryQuestion.xsd">
      <SubType>Designer</SubType>
    </None>
    <None Include="Xsd\AreaCategoryQuestion.xsx">
      <DependentUpon>AreaCategoryQuestion.xsd</DependentUpon>
    </None>
    <EmbeddedResource Include="Xsd\GroupingExample.xsd">
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <None Include="Xsd\GroupingExample.xsx">
      <DependentUpon>GroupingExample.xsd</DependentUpon>
    </None>
    <None Include="Xsd\WordGeneratedInvoice.xsx">
      <DependentUpon>WordGeneratedInvoice.xsd</DependentUpon>
    </None>
    <None Include="Xsd\ImageExample.xsd">
      <SubType>Designer</SubType>
    </None>
    <None Include="Xsd\ImageExample.xsx">
      <DependentUpon>ImageExample.xsd</DependentUpon>
    </None>
    <EmbeddedResource Include="Xsd\WordGeneratedInvoice.xsd">
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <Compile Include="Properties\Settings.Designer.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Settings.settings</DependentUpon>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Xml\WordGeneratedInvoice.xml" />
    <EmbeddedResource Include="Xslt\WordGeneratedInvoice.xslt" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\GeneratingMicrosoftWordReports.Engine\GeneratingMicrosoftWordReports.Engine.csproj">
      <Project>{D1FF299D-8490-4365-9ADD-3F68A6E887BC}</Project>
      <Name>GeneratingMicrosoftWordReports.Engine</Name>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Xml\AreaCategoryQuestion.xml" />
    <EmbeddedResource Include="Xslt\AreaCategoryQuestion.xslt" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Xml\GroupingExample.xml" />
    <EmbeddedResource Include="Xslt\GroupingExample.xslt" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Xml\ImageExample.xml" />
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Xslt\ImageExample.xslt" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer
United States United States
If you liked this article, consider reading other articles by me. For republishing article on other websites, please contact me by leaving a comment.

Comments and Discussions