This project has moved. For the latest updates, please go here.

Configuration

DoddleReport supports a complete configuration section that you can use if you choose. It is not required that you add the below XML to your app.config/web.config. If you do decide to use it, you will be afford yourself some nice customization options including specifying your own writers all without any recompilation of your application.

If you wish to use the configuration features you will need to add the below XML in your <configSections>

 
<configSections>
    <sectionGroup name="doddle">
        <section name="reporting" type="Doddle.Reporting.Configuration.ReportSection, Doddle.Reporting" />
    </sectionGroup>
</configSections>
<doddle>
    <reporting defaultWriter="Html" dataRowStyle="DataRowStyle" headerRowStyle="HeaderRowStyle" footerRowStyle="FooterRowStyle">
        <styles>
            <style name="DataRowStyle" />
            <style name="HeaderRowStyle" bold="true" underline="true" />
            <style name="FooterRowStyle" bold="true" />
            <style name="Footer" italic="true" />
            <style name="Title" fontSize="16" />
        </styles>
        <writers>
            <clear />
            <add format="Html" type="Doddle.Reporting.Writers.HtmlReportWriter, Doddle.Reporting" contentType="text/html" fileExtension=".html" />
            <add format="Text" type="Doddle.Reporting.Writers.DelimitedTextReportWriter, Doddle.Reporting" contentType="text/plain" fileExtension=".txt" offerDownload="true" />
            <add format="Excel" type="Doddle.Reporting.Writers.ExcelReportWriter, Doddle.Reporting" contentType="application/vnd.ms-excel" offerDownload="true" fileExtension=".xls" />
            <add format="PDF" type="Doddle.Reporting.AbcPdf.PdfReportWriter, Doddle.Reporting.AbcPdf" contentType="application/pdf" offerDownload="false" fileExtension=".pdf" />
        </writers>
    </reporting>
</doddle>

Last edited Feb 3, 2011 at 2:41 AM by mhidinger, version 2

Comments

bbateman Jan 15, 2012 at 6:21 PM 
The web.config version above is old when the root namespace was Doddle.Reporting. The root namespace has been updated and is now DoddleReport. Here is the updated web.config for version 1.2.2:

<configSections>
<section name="doddleReport" type="DoddleReport.Configuration.DoddleReportSection, DoddleReport"/>
</configSections>
<doddleReport defaultWriter="Html" dataRowStyle="DataRowStyle" headerRowStyle="HeaderRowStyle" footerRowStyle="FooterRowStyle">
<styles>
<style name="DataRowStyle" />
<style name="HeaderRowStyle" bold="true" underline="true"/>
<style name="FooterRowStyle" bold="true"/>
<style name="Footer" italic="true"/>
<style name="Title" fontSize="16"/>
</styles>
<writers>
<clear/>
<add format="Html" type="DoddleReport.Writers.HtmlReportWriter, DoddleReport" contentType="text/html;charset=UTF-8" fileExtension=".html"/>
<add format="Text" type="DoddleReport.Writers.DelimitedTextReportWriter, DoddleReport" contentType="text/plain;charset=UTF-8" fileExtension=".txt" offerDownload="true"/>
<add format="ExcelOpenXml" type="DoddleReport.OpenXml.ExcelReportWriter, DoddleReport.OpenXml" contentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" offerDownload="true" fileExtension=".xlsx"/>
<add format="Excel" type="DoddleReport.Writers.ExcelReportWriter, DoddleReport" contentType="application/vnd.ms-excel" offerDownload="true" fileExtension=".xls"/>
<add format="iTextSharpPdf" type="DoddleReport.iTextSharp.PdfReportWriter, DoddleReport.iTextSharp" contentType="application/pdf" offerDownload="false" fileExtension=".pdf" />
<add format="AbcPdf" type="DoddleReport.AbcPdf.PdfReportWriter, DoddleReport.AbcPdf" contentType="application/pdf" offerDownload="false" fileExtension=".pdf"/>
</writers>
</doddleReport>