Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
| Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 12th, 2014, 09:28 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Better way to improve performance while loading bulk data in reports

Code:
 
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="http://mycompany.com/mynamespace">
  <msxsl:script language="JScript" implements-prefix="user">
    var columnList="";
    function setColumnList(colList)
    {
    columnList=","+colList+",";
    return 0;
    }
    function CheckValidColumns(colName)
    {
    if(columnList.indexOf(","+colName+",")!=-1)
    {
    return 2;
    }
    else
    {
    return 0;
    }
    }
  </msxsl:script>
  <xsl:param name="columnList"></xsl:param>
	<xsl:param name="startNodePosition"></xsl:param>
	<xsl:param name="endNodePosition"></xsl:param>
  <xsl:template match="/" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
    <xsl:variable name="col">
      <xsl:value-of select="user:setColumnList($columnList)"/>
    </xsl:variable>
   <xsl:for-each select="//em[@webReportKey]/em[position() &gt;$startNodePosition and position() &lt;=$endNodePosition]">
      <Row>
        <xsl:for-each select="@*">
          <xsl:if test="user:CheckValidColumns(name())&gt;0">
          <Cell>
            <xsl:attribute name="ss:StyleID">
              <xsl:text>data</xsl:text>
            </xsl:attribute>
            <Data ss:Type="String">
              <xsl:value-of select="."/>
            </Data>
          </Cell>
          </xsl:if>
        </xsl:for-each>
      </Row>
  </xsl:for-each>
  </xsl:template>
</xsl:stylesheet>
We are using the above code for report generation via web application.
But for bulk data(1.5lakh records), it is taking long time to load.
Can we get any better way to improve the performance?




Similar Threads
Thread Thread Starter Forum Replies Last Post
How to improve the performance of a Gridview that contains 10000 data records in c# a kailasam ASP.NET 4.5 General Discussion 3 May 31st, 2013 04:49 AM
How to improve performance with VBA and Powerpoint ravan76 Excel VBA 0 June 10th, 2007 11:29 PM
Crystal Reports+CPU performance MyIssues_2005 Crystal Reports 0 July 19th, 2005 09:30 AM
Performance when loading report contains subreport jessicawkm Forum and Wrox.com Feedback 2 November 16th, 2004 10:34 AM
How do i improve the performance of report syedjavid Crystal Reports 4 October 26th, 2003 05:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.