CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Perl

 Custom Actions

Print topic Send  topic

Author Message
Ozum

Posts: 57
Posted: 11/18/2004, 3:43 AM

Hello Perl Guys,

I think Code Charge Studio is more valuable for Perl programmers than any other language programmers, since ASP, JSP, CF and PHP coders can find lots of similar products on the market, but for Perl CCS is the only robust solution which has very nice GUI.

I wonder, if there are people developing custom Perl actions for Code Charge Studio. Exchanging and adding value to CCS for Perl makes our life easier.

Any idea, participation ?

Best regards,
Ozum
View profile  Send private message
roeya


Posts: 181
Posted: 11/28/2004, 11:23 AM

It is true - till now I did not found othere good products for perl, however
seems that there are less perl programmers here then PHP/ASP.

I found CCS very valuable for my projects, and it enables me to cut production times by 20% on large projects and almost by 50% for smaller ones.

The one thing I found missing is an easy way to re-use code. I would be happy to try to help you with developing custom actions, however I did not found enough documentation.

_________________
http://www.infoneto.com/
View profile  Send private message
Ozum

Posts: 57
Posted: 12/29/2004, 3:08 AM

Yes, there is sure some documentation problem, but I examined actions provided by Yes Software and tried to learn basic steps. Now I have info to some degree.

I can develop my simple custom actions for frequently repeated tasks. Below is an example ID to Name action derived by Dlookup. When you copy this into server/actions/custom directory with name "ID to Name.xml"

If I have time (since my projects are heavy these days and I have to do my obligated military service) I want to build some web site about Perl/CCS

This action transforms an ID label to Name label in a grid. ( Some explanation of perl code made in Turkish, but it is very simple Perl code)

  
<Action>  
	<Properties>  
    <Property  
      name="expression"  
      caption="Expression"  
      description="SELECT of the result statement."  
      dataType="Text"  
      controlType="TextBox"  
      required="True"  
    />  
    <Property  
      name="domain"  
      caption="Domain"  
      description="FROM of the result statement."  
      dataType="Text"  
      controlType="TextBox"  
    />  
    <Property  
      name="pk_column"  
      caption="PK Column"  
      description="Primary Key Column"  
      dataType="Text"  
      controlType="TextBox"  
      required="True"  
    />  
    <Property  
      name="connection"  
      caption="Connection"  
      description=""  
      dataType="Text"  
      controlType="ComboBox"  
      listSource="CCConnections"  
      required="True"  
    />  
     
    </Properties>  
	<Languages>  
		<Language name="PerlTemplates">  
			<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:CCCommon="http://www.codecharge.com/common/" version="1.0">  
				<xsl:template match="Event[not(@type='Client')]/Actions/Action[@actionName='ID to Name']">  
					<xsl:param name="ident" select="0"/>  
					<xsl:param name="Control"/>  
					<xsl:param name="Parent"/>  
					<xsl:variable name="controlParent" select="CCCommon:getParentControl($Control, $Parent, string(@name))"/>  
					<xsl:variable name="controlPath" select="CCCommon:getControlPath($Control,$Parent,string(@name))"/>  
					<xsl:variable name="controlName" select="CCCommon:getControlName(string($Control/@name), string(@name))"/>  
  
                    <xsl:variable name="folderControlParent" select="CCCommon:getParentControl($Control, $Parent, string(@folder_control))"/>  
					<xsl:variable name="folderControlPath" select="CCCommon:getControlPath($Control,$Parent,string(@folder_control))"/>  
					<xsl:variable name="folderControlName" select="CCCommon:getControlName(string($Control/@folder_control), string(@folder_control))"/>  
  
    			    <xsl:variable name="getValue">  
                        <xsl:text>$</xsl:text><xsl:value-of select="$controlPath"/><xsl:value-of select="$controlName"/><xsl:if test="$controlPath != ''">}</xsl:if><xsl:text>->GetValue()</xsl:text>  
                    </xsl:variable>  
    			    <xsl:variable name="setValue">  
                        <xsl:text>$</xsl:text><xsl:value-of select="$controlPath"/><xsl:value-of select="$controlName"/><xsl:if test="$controlPath != ''">}</xsl:if><xsl:text>->SetValue</xsl:text>  
                    </xsl:variable>  
                  
                    <xsl:variable name="libPrefix" select="CCCommon:getLibPrefix(current())"/>  
                    <l>  
# Code by Ozum Eldogan, D-Worx.com / Proksima Inc. e-mail:ozum@ozum.net  
# ID'si olan kontrolun icerigini name'e cevir  
my $id = <xsl:value-of select="$getValue"/>;  
my $result = '';  
</l>  
  
<l>  
      <xsl:text>$DB</xsl:text>  
      <xsl:value-of select="@connection"/>  
      <xsl:text> = </xsl:text>  
      <xsl:value-of select="$libPrefix"/>  
      <xsl:text>clsDB</xsl:text>  
      <xsl:value-of select="@connection"/>  
      <xsl:text>->new();</xsl:text>  
</l>  
        
<l>  
    if ( $id ) {  
      <xsl:text>$result = CCDlookUp(</xsl:text>  
      <xsl:value-of select="@expression"/>  
      <xsl:text>, </xsl:text>  
      <xsl:value-of select="@domain"/>  
      <xsl:text>, </xsl:text>  
      "<xsl:value-of select="@pk_column"/> = '$id'"  
      <xsl:text>, $DB</xsl:text>  
      <xsl:value-of select="@connection"/>  
      <xsl:text>);</xsl:text>  
    }  
    else  
    {  
        $result = '';  
    }  
      
# Kontrolun degerini isim yap.  
<xsl:value-of select="$setValue"/>( $result );  
</l>  
  
    <l>  
      <xsl:text>$DB</xsl:text>  
      <xsl:value-of select="@connection"/>  
      <xsl:text>->finalize();</xsl:text>  
    </l>  
    <l>  
      <xsl:text>undef $DB</xsl:text>  
      <xsl:value-of select="@connection"/>  
      <xsl:text>;</xsl:text>  
    </l>  
  
				</xsl:template>  
			</xsl:stylesheet>  
		</Language>  
	</Languages>  
</Action>  
  
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.