Niklas,
I've been dealing with the scourge of crystal for a long time. This
is the solution I've had the most luck with. I know that this
solution works with CR 8.5, but I'm not sure about newer versions.
This solution also requires Crystal and .Net framework to be installed
on the server.
Essentially, I've got 1 asp.net page that I call using CFHTTP. I have
the asp.net page write out a pdf file onto the harddrive and then I
serve up the pdf via CF. HTH
Marlon
reportServer.aspx
*****************************************************************
<%@ Page Language="VB" AspCompat="true" %>
<% Server.ScriptTimeout = 360 %>
<%
dim App,Rpt,Export as object
dim
DllName,ServerName,DatabaseName,Login,Password,Report,SelectionFormula,DiskFileName
as string
dim FormatType as integer
DllName = cstr(request.form("DllName"))
ServerName = cstr(request.form("ServerName"))
DatabaseName = cstr(request.form("DatabaseName"))
Login = cstr(request.form("login"))
Password = cstr(request.form("password"))
Report = cstr(request.Form("report"))
SelectionFormula = cstr(request.Form("SelectionFormula"))
FormatType = cInt(request.Form("FormatType"))
DiskFileName = cstr(request.Form("DiskFileName"))
try
App = Server.CreateObject("CrystalRuntime.Application")
App.LogOnServer(DllName,ServerName,DatabaseName,login,Password)
Rpt = App.OpenReport(Report,1)
Rpt.MorePrintEngineErrorMessages = false
Rpt.EnableParameterPrompting = false
Rpt.DiscardSavedData
Rpt.RecordSelectionFormula = SelectionFormula
Export = Rpt.ExportOptions
Export.DiskFileName = DiskFileName
Export.FormatType = FormatType
'Always write to disk
Export.DestinationType = CInt(1)
Rpt.Export(False)
response.Write("STATUS: OK")
Catch ex As Exception
response.Write("STATUS: ERROR<br/>")
response.Write("MESSAGE: " + ex.toString() + "<br/>")
response.Write("SOURCE: " + ex.source + "<br/>")
response.Write("STACK: " + ex.StackTrace + "<br/>" )
Finally
Export = nothing
Rpt = nothing
App = nothing
'Force a garbage collection to release the object
GC.Collect()
End try
%>
**********************************************************
On 7/19/05, Niklas Richardson <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> A current project we're working on requires integration with A LOT of
> Crystal Reports with ColdFusion MX 7.
>
> I haven't used Crystal Reports since version 3 of ColdFusion, and thus
> have forgotten how to do the integration, and how the Crystal Reports
> should be structured.
>
> This has just been dumped on my and we need an urgent solution (i.e.
> in next couple of days).
>
> If anyone can help with Crystal Reports and CF, please can you let me
> know. Drop me an email off list. Thanks.
>
> Regards
>
> Niklas
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212189
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54