Entries for month: October 2008

Merge .pdf's into one .pdf using cfpf merge

T-SQL , ColdFusion - Author:John Gag at 7:17 PM 6 Comments »

I needed to print a large group of customer Orders by date in .pdf format. Instead of having an employee individually click and sort 2000 .pdf's each day, (Yes they were doing that) I set up a little web application to do all the sorting for them. I first needed to get an OCR software that could read characters off of large .pdf file, split the .pdf into individual .pdfs by customer order number and store specific data into a database.

Read more...

Server Migration Coldfusion 8

ColdFusion - Author:Steve Weyrick at 2:11 PM 9 Comments »

I have been tasked with migrating from one ColdFusion Server to another.  I am not a Coldfusion Administrator, nor do I have any experience doing this sort of thing.  For example, exporting and importing datasources, server settings, scheduled tasks...  What is the proper way to go about doing this?  I guess the question I am trying to ask is, How can I replicate Coldfusion Server Installations?  Any help or suggestions on how to do this would be greatly appreciated.

Thanks,

Stephen Weyrick/Brian Sheridan

Sorry I let my domain expire

- Author:Brian Sheridan at 1:33 PM No Comments »

CFtips.net is back up and going..  Check out my new blog post about flex date picker

http://www.cftips.net/post.cfm/setting-up-date-range-picker-in-flex-3

Read more...

Setting up date range picker in flex 3

T-SQL , ColdFusion , Flex , CFC - Author:John Gag at 4:31 PM 7 Comments »

I was posed with the task of making little dashboards for various managers lately.  One of the things that every dashboard needed was a date range that was dynamically driven through date pickers. 

I first setup my coldfusion component .cfc to return a query.  I then set up 2 date arguments to be used in my between statement to narrow my query results.  An example function can be found below:

<cffunction name="dateRange" access="remote" returntype="query">
        <cfargument name="DateField1" required="true" type="date">
        <cfargument name="DateField2" required="true" type="date">
    <cfquery name="revReport" datasource="dsnScoreCard">
        SELECT column1, column2
        FROM test

        WHERE date1 BETWEEN CONVERT(VARCHAR(10), <cfqueryparam cfsqltype="cf_sql_date" value="#DateField1#">, 101) AND CONVERT(VARCHAR(10), <cfqueryparam cfsqltype="cf_sql_date" value="#DateField2#">, 101)

    </cfquery>

    <cfreturn revReport>
</cffunction>

Read more...

Turning off interpolated data for Cfcharts

- Author:Steve Weyrick at 6:40 PM 3 Comments »

If you have multiple chartseries in your cfchart, you may have run into a problem with data interpolating over a missing chart point.  It took me a few minutes to figure out how to fix this problem, so I figured I would share it with the rest of the Coldfusion Community.

All you have to do is edit the XML file located in the coldfusion root folder, charting, and styles(Coldfusion8/Charting/Styles).  Once you locate the XML file, change <frameChart autoAdjust="false" is3D="false" isInterpolated="false">.  

Here is what your chart should look like:

interpolated=false

Simple Coldfusion/SQL Server Upload Script

SQL Server , ColdFusion - Author:Steve Weyrick at 2:47 PM 5 Comments »

I found this script while browsing the other day.  I thought it might be useful for anyone needs to upload data into SQL Server from a csv file.  The only catch is that you can't have NULL values in your CSV file.

<cffile action="read" file="\\stg-wb-20\ims-STG-WB-20\testSteve\ss.csv" variable="csvfile">

<!--- loop through the CSV-TXT file on line breaks and insert into database --->
<cfloop index="index" list="#csvfile#" delimiters="#chr(10)##chr(13)#">
    <cfquery name="importcsv" datasource="dsnDB1">
         INSERT INTO tblCycleCountData (ctCampus,ctDate,ctAISLE,ctLOCATION,ctITEM,ctLPID,ctQTY,_

ctZONE,ctLOCTYPE,ctLPIDPRESENT,ctCOUNTTOTAL)

         VALUES
                  ('#listgetAt('#index#',1, ',')#',
                   '#listgetAt('#index#',2, ',')#',
                   '#listgetAt('#index#',3, ',')#',
                   '#listgetAt('#index#',4, ',')#',
                   '#listgetAt('#index#',5, ',')#',
                   '#listgetAt('#index#',6, ',')#',
                   '#listgetAt('#index#',7, ',')#',
                   '#listgetAt('#index#',8, ',')#',
                   '#listgetAt('#index#',9, ',')#',
                   '#listgetAt('#index#',10, ',')#',
                   '#listgetAt('#index#',11)#')
   </cfquery>
</cfloop>

<!--- use a simple database query to check the results of the import - dumping query to screen --->
<cfoutput>Done</cfoutput>

CFQUERY a view that queries 2 databases

T-SQL , ColdFusion , Flex , CFC - Author:John Gag at 1:25 PM 5 Comments »

I made a view on SQL SERVER 2005 that queries 2 databases.  I then set up a datasource to the database that contains the view.  The set up a coldfusion login specific to that database containing the view.  When I try to RemoteObject the view in flex 3 I get an error stating that the cfc could not be invoked.  Is this because the coldfusion login only has permission to one of the databases? Does anyone have any experience with this problem?  Thanks in advance

PS I set up a view that queries only one database with the same datasource and it works no problem..

Read more...

Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds