CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 Crystal Reports Parts on CCS

Print topic Send  topic

Author Message
Andres Rormoser
Posted: 11/24/2005, 10:50 PM

If you want to add Crystal Reports Charts, Gauges, etc to your pages follow the step
below:

+Install Crystal Report Server
+Add a Label with property Content Type=HTML
+Add a BeforeShow Event to this label
+Add the following custom code:
form1.label1.Value = DisplayReport("hs/reportes/Dashboard.rpt","Cashflow")
+Add the following custom code to common.asp:
' Funcion que la usa la funcion DisplayReport
Function EnsureImageCleanerIsRunning()
' The ImageCleaner is already running.
If Session("imageCleanerRunning") Then
Exit Function
' Start the ImageCleaner
Else
Dim imageCleaner
Set imageCleaner = Server.CreateObject("CrystalReports.CrystalImageCleaner")
' Sets the ImageCleaner to scan once per minute and delete
' images once per two minutes.
imageCleaner.Start 60000, 120000

' Store a flag in session to check if the ImageCleaner is running.
Session("imageCleanerRunning") = True
Set EnsureImageCleanerIsRunning = imageCleaner
End If
End Function

' Funcion que la usa la funcion DisplayReport
Sub StopImageCleaner(imageCleaner)
' Stop the ImageCleaner and set the session flag to indicate it has stopped
If Session("imageCleanerRunning") = True Then
imageCleaner.Stop
Session("imageCleanerRunning") = False
End If
End Sub

' Funcion para mostrar un ReportPart Crystal Reports
Function DisplayReport(targetReport, objectName)
Dim iStore
Dim rasServer
Dim Username
Dim Password
Dim reportSource
Dim allowDrill
Dim viewerToLaunch
rasServer = "server"
Username = "sa"
Password = "balbbalbala"

' Get the viewer and report to use from the Session.
Session("viewerToLaunch") = "partViewer"
allowDrill = False
viewerToLaunch = Session("viewerToLaunch")

' Crea entorno de reporte
Dim objectFactory
Set objectFactory = CreateObject("CrystalReports11.ObjectFactory.1")
Dim reportAppSession
Set reportAppSession = objectFactory.CreateObject( "CrystalReports.ReportAppSession")
reportAppSession.ReportAppServer = rasServer
reportAppSession.Initialize

' Setea el server RAS y el reporte
Dim reportClientDocument
Set reportClientDocument = objectFactory.CreateObject(
"CrystalReports.ReportClientDocument")
reportClientDocument.ReportAppServer = rasServer
reportClientDocument.Open(targetReport)
Set reportSource = reportClientDocument.ReportSource

' Set up an ImageCleaner
Dim imageCleaner
Set imageCleaner = EnsureImageCleanerIsRunning

' Report part definitions.
Dim ReportParts
Set ReportParts = CreateObject("CrystalReports.CrystalReportPartsDefinition")

Dim Nodes
set Nodes = ReportParts.ReportPartNodes

' Initially, display Graph1 from the World Sales Report.
Dim node0
Set node0 = CreateObject("CrystalReports.CrystalReportPartNode")
node0.Name = objectName
Nodes.Add (node0)

Dim HTMLPartsViewer
Set HTMLPartsViewer = objectFactory.CreateObject(
"CrystalReports.CrystalReportPartsViewer" )

' Setea el logon a la base de datos
Dim ConInfo
Set ConInfo = objectFactory.CreateObject("CrystalReports.ConnectionInfo")
ConInfo.UserName = Username
ConInfo.Password = Password
Dim ConInfos
Set ConInfos = objectFactory.CreateObject("CrystalReports.ConnectionInfos")
ConInfos.Add ConInfo

Dim Fields
Fields = Session("Fields")

' Set the viewer options.
With HTMLPartsViewer
' Don't allow drill down in this example.
.EnableDrillDown = False
.DatabaseLogonInfos = ConInfos
if Fields <> null then
.ParameterFields = Fields
end if
.ReportSource = reportSource
.ReportParts = ReportParts
.PreserveLayout = False
.Name = "HTMLParts_NoDrillName"
.IsOwnForm = False
.IsOwnPage = False
End With

' Show the report.
DisplayReport = HTMLPartsViewer.GetHtmlContent(Request, Response, Session)

'Stop the ImageCleaner now that the viewing is complete.
StopImageCleaner(imageCleaner)
End Function



Benjamin Krajmalnik
Posted: 11/28/2005, 4:39 PM

In one of my applicatios I needed to add graphing capabilities.
After searching many of the available options I settled on FusionCharts 2.3
and FusionCharts Instrumentation Suite.
These components are realy nice - they are Macromedia Flash Components which
take the graph info as a XML stream - and therefore are independent of the
programming language you use.

I have finished writing class wrappers which have greatly facilitated the
creation of charts for our applications. Currently I have them in an
in-house php applicatio. I am now converting the classes to ASP so I can
use ti on a different ASP absed app. These components are awesome! I have
found Crystal, as a whole, to be too slow. It is used by a CRM package
which we use. For speed comparisons, displaying an invoice in my web absed
portal is 10x faster than doing it from the Windows app (which uses Crystal
XI).

Andres Rormoser
Posted: 11/30/2005, 7:03 AM

Benjamin:
Thanks for your comments, Yes I also found Crystal very very slow. But I found Crystal
Designer very friendly and flexible for creating complex reports. I tried another flash
reports tools but I found the designers very unfriendly and very simple.

Regards, AR



"Benjamin Krajmalnik" <kraj@illumen.com> wrote in message
news:dmg7vc$ig0$1@news.codecharge.com...
In one of my applicatios I needed to add graphing capabilities.
After searching many of the available options I settled on FusionCharts 2.3
and FusionCharts Instrumentation Suite.
These components are realy nice - they are Macromedia Flash Components which
take the graph info as a XML stream - and therefore are independent of the
programming language you use.

I have finished writing class wrappers which have greatly facilitated the
creation of charts for our applications. Currently I have them in an
in-house php applicatio. I am now converting the classes to ASP so I can
use ti on a different ASP absed app. These components are awesome! I have
found Crystal, as a whole, to be too slow. It is used by a CRM package
which we use. For speed comparisons, displaying an invoice in my web absed
portal is 10x faster than doing it from the Windows app (which uses Crystal
XI).


Benjamin Krajmalnik
Posted: 11/30/2005, 12:04 PM

I only use the Flas components for graphing/charting, not for reporting.
My native HTML reports run ten timeas faster than Crystal XI reports ( this
is based on actual tests).

Andres Rormoser
Posted: 12/01/2005, 10:09 AM

Benjamin:
I agree they could be 10 times or more faster, but what do you use for HTML Reports?
This tool has a Designer? Can the report be exported to PDF,XLS,DOC,etc?

Thanks, AR


"Benjamin Krajmalnik" <kraj@illumen.com> wrote in message
news:dml0ko$o6$1@news.codecharge.com...
I only use the Flas components for graphing/charting, not for reporting.
My native HTML reports run ten timeas faster than Crystal XI reports ( this
is based on actual tests).


Benjamin Krajmalnik
Posted: 12/06/2005, 8:16 AM

I hand code the HTML reports based on Grids (this particular app is still on
CCS 2.3).
There is no export to other formats.
There are some free PDF classes which could be incorporate. Export to XLS
is easily accomplished. To doc - I assume it wold not be difficult to write
a RTF based processor.

Since for what I am doing my client base has not asked for those features, I
do not yet have them - although they are in planning. I am just not overly
impressed with Crystal. As a matter of fact, I looked at a nice reporting
tool created by a fellow Che of yours. I cannot remember off the top of my
head what it was called, but I really liked it at the time.

"Andres Rormoser" <arormoser@yahoo.com.ar> wrote in message
news:dmne8m$nm3$1@news.codecharge.com...
> Benjamin:
> I agree they could be 10 times or more faster, but what do you use for
HTML Reports?
> This tool has a Designer? Can the report be exported to PDF,XLS,DOC,etc?
>
> Thanks, AR
>
>
> "Benjamin Krajmalnik" <kraj@illumen.com> wrote in message
>news:dml0ko$o6$1@news.codecharge.com...
> I only use the Flas components for graphing/charting, not for reporting.
> My native HTML reports run ten timeas faster than Crystal XI reports (
this
> is based on actual tests).
>
>
>

Vasiliy

Posts: 378
Posted: 12/06/2005, 12:02 PM

Some people like Crystal, some do not.
For some Crystal is just a solution ... nothing more. :-D

For those who need Crystal in ASP apps, take a look at ReCrystallize Pro (recrystallize.com). Another $500, but solves all my problems publishing reports on the web. It's a ASP code generator.
_________________
Vasiliy
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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