Tech Off Thread

6 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Urgent: XSLT Reports

Back to Forum: Tech Off
  • User profile image
    ben2004uk

    Hello,

    I have just implemented a new report framework using XSLT to display the results from a stored procedure in asp.net.

    On my local system with around 700 records it works fine (bit on the slow side but works).   However it has now gone live with a real database (2000++ rows, 30 columns),  and it is painfully slow. 

    We have had to increase the IIS6 timeout time to (i think) 700 seconds,  this is works for around 1000 rows but any more and the site just appears to hang.

    The stored procedure itself is turned with 10 seconds (so its not that).

    Are there any other settings to help increase performance within IIS6 settings?  Worker process for example........

    This is really important as the client is waiting but I have wasted a day trying to sort this and I have ran out of ideas.

    Please please please help!!!  I can't think of anything else to do.

    Cheers

    Ben

  • User profile image
    ZippyV

    Do you really need to display a report from 2000+ rows with 30 columns? Why can't you make it smaller or in multiple pages?

  • User profile image
    ben2004uk

    The end user Smiley

    She actually wants 5 years worth of data being played as a webpage(so XSLT and not Crystal) which is around 7500 rows Crying

    Tried with only the 10 most important columns and is still really really slow.

    Multiple pages - how in XSLT?? Its now in live so needs to be quick fixes really, cant redesign the whole reporting framework (bloody red tape)

  • User profile image
    ScanIAm

    ben2004uk wrote:
    The end user Smiley

    She actually wants 5 years worth of data being played as a webpage(so XSLT and not Crystal) which is around 7500 rows Crying

    Tried with only the 10 most important columns and is still really really slow.

    Multiple pages - how in XSLT?? Its now in live so needs to be quick fixes really, cant redesign the whole reporting framework (bloody red tape)


    Brighter minds might have a solution, but I can't think of one.  It isn't IIS that's causing you a problem, it's the reconstitution from xml of a web page that contains 20K rows and 30 columns. 

  • User profile image
    Maurits

    Hmmm...
    You've said the stored procedure takes ten seconds to execute.
    How long does it take to generate the raw XML?
    And then how long does it take to transform the XML into HTML with an XSLT transformation?

    Perhaps you could push that last step to the client (give the client the raw XML and the XSLT, and let its CPU do the crunching)

  • User profile image
    willyschroe​rs

    ben2004uk wrote:
    The end user Smiley

    Multiple pages - how in XSLT??



    Hi, I'm new here. I'm a developer from belgium an I may have a solution for your problem.

    It is possible to create multiple pages with xslt:

    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

    <xsl:template name="list_pages">
     <xsl:variable name="totalrecords" select="count(node/fromyour/xml)"/>
     <xsl:variable name="pages" select="ceiling($totalrecords div 45)"/>
     
     <xsl:call-template name="produce-pages">
      <xsl:with-param name="count" select="1"/>
      <xsl:with-param name="max" select="$pages+1"/>
     </xsl:call-template>

    </xsl:template>

    <xsl:template name="produce-pages">
     <xsl:param name="count"/>
     <xsl:param name="max"/>
     <xsl:param name="maxpages" select="$count * 45"/>
     <xsl:param name="minpages" select="($maxpages - 45) +1"/>
     <xsl:param name="pagecount" select="0"/>
     <xsl:if test="$count != $max">

        YOUR HTML LAYOUT
        <table cellpadding="0" cellspacing="0" width="100%" class="pagetable">

              <table cellpadding="2" cellspacing="0" width="100%">
                <xsl:for-each select="node/fromyour/xml">
              <xsl:if test="position() &lt;=$maxpages and position()&gt;=$minpages">
             
                  REPEATING LAYOUT
                   
             <tr>
             <td width="20%" class="bolditem"><xsl:value-of select="issuenumber"/></td>
             </tr>
                   
             </xsl:if>
            </xsl:for-each>
               
              </table>
            </td>
          </tr>
        </table>

       <xsl:call-template name="produce-pages">
      <xsl:with-param name="count" select="$count+1"/>
      <xsl:with-param name="max" select="$max"/>
       </xsl:call-template>
     </xsl:if>
    </xsl:template>
     
    <xsl:template match="/">
    <HTML>
     <BODY>
      <link rel="stylesheet" type="text/css" href="stylesheet/style-report.css" />
        <xsl:call-template name="list_pages">
      </xsl:call-template>
     </BODY>
     </HTML>
    </xsl:template>

    </xsl:stylesheet>


    Hope this will help. This example will create all pages but you could implement a previous and next button to manipulate the for each.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.