LanWorks
asked on
Reports do not work without MSJVM
For you Crystal report experts with ASP experience: I have a few clients that use my VB6 application that calls Crystal reports from an asp page. I have been mostly happy and successful using Crystals' supplied ReportsJava.asp ... until XPsp1 where the clients did not have the MS Java Virtual Machine. If i install Sun's Java, the reports DO NOT WORK (just get the little square in the top left hand corner). I've tried to use ActiveXviewer but I guess there is a conflict with .Net and server 2003 and the older com objects. The HTMstart.asp page looks adequate except it does not offer a print option (kinda of useless) .
I need a solution but not sure which way to look. In my newer applications, I use .Net and stream crystal reports to a pdf file on the fly. But I don't know if this is viable in the older VB6.0 world.
Any input/suggestions would be most appreciated.
I need a solution but not sure which way to look. In my newer applications, I use .Net and stream crystal reports to a pdf file on the fly. But I don't know if this is viable in the older VB6.0 world.
Any input/suggestions would be most appreciated.
ASKER
Sorry, I didn't explain myself very well. The problem is with the older ASP and VB6 app, not the newer .Net. Do they have a DHTML viewer for ASP?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You don't have to use .Net with the dhtml viewer:
Asp:
Dim viewer
Set viewer = CreateObject("CrystalRepor ts.Crystal ReportInte ractiveVie wer")
mlmcc's idea of exporting to PDF is a good idea also that may work for you.
frodoman
Asp:
Dim viewer
Set viewer = CreateObject("CrystalRepor
mlmcc's idea of exporting to PDF is a good idea also that may work for you.
frodoman
ASKER
I'm using version 8.5 developer edition. Do they have a CrystalReportInteractiveVi ewer (I do not see any thing about it in the documentation indexes).
I too like the idea of exporting it to PDF. I am using PUSH technology (meaning I create the report using a TTX file and send it an ADO recordset on the fly). So how would I go about pushing it the recordset and then exporting it to pdf? (Note that I'm not stuck on this solution, I'm still looking for an easy fix to displaying reports without the MSVJM if there is one)
I too like the idea of exporting it to PDF. I am using PUSH technology (meaning I create the report using a TTX file and send it an ADO recordset on the fly). So how would I go about pushing it the recordset and then exporting it to pdf? (Note that I'm not stuck on this solution, I'm still looking for an easy fix to displaying reports without the MSVJM if there is one)
Assuming you have the developer edition of CR8.5 here are some sample applications in ASP
http://support.businessobjects.com/communityCS/FilesAndUpdates/aspxmps85.exe.asp
mlmcc
http://support.businessobjects.com/communityCS/FilesAndUpdates/aspxmps85.exe.asp
mlmcc
ASKER
The options offered in the samples are:
HTMLpage
ActiveXviewer
JavaPlugin
The HTMLpage does not offer a print button
ActiveXviewer seems to conflict with my .Net installation and gives a memory write error
JavaPlugin is what I'm trying to solve. It works with MSVJM but not the Sun Java.
Any other suggestions?
HTMLpage
ActiveXviewer
JavaPlugin
The HTMLpage does not offer a print button
ActiveXviewer seems to conflict with my .Net installation and gives a memory write error
JavaPlugin is what I'm trying to solve. It works with MSVJM but not the Sun Java.
Any other suggestions?
According to what I've seen, the DHTML viewer should be with CR8.5 although it's probably an optional install that may have been bypassed. I don't have 8.5 any more, but according to this document ( http://www.businessobjects.com/global/pdf/products/crystalreports/cr10_feat_ver_ed.pdf ) it's part of the 8.5 Developer edition.
frodoman
frodoman
ASKER
I've searched the CD without luck. There is a comment however in help (search for DHTML) about referring to the enterprise CD. But I could find no ASP files on the Enterprise CD. Do you know the name of the file I'm supposed to be looking for?
I think the file you want is Exlate32.dll but I'm not certain. Also I don't know if it's compacted or not.
You can probably just try to run install and select 'Custom' and see if it's on there.
frodoman
You can probably just try to run install and select 'Custom' and see if it's on there.
frodoman
ASKER
Stuff happens. I tried a dozen different ways, but no matter, I could not get my enterprise CD to accept the keycode as printed on the back so I could not even start the install. I then spent a while looking at the files on the CD hoping I could find what I needed ... again no luck.
I then went back to the idea of exporting to PDF. I borrowed a function to export to pdf (fnblnExportReport) from Manish Sharma and then used javascript to open a new window with the file and it works ... in fact, it works better then the old ReportsJava.asp because it seems faster and I don't have the double take as it closes the second window.
The only messy part is I leave a copy of the pdf on the intranet server which I'll have to clean up later (but this is adequate for this helpdesk app that has less then 100 users)
My problem is how to be fair awarding the points. frodoman, I really appreciate your input, but since I went back to the PDF solution, I'll have to accept mlmcc answer. But I'm not sure of the proper netiquette so please advise.
Thanks and kindest regards,
Gary
--------------
The details to the solution used (as used in the ActiveX.dll):
Public Function PrintToPDF()
Dim strErrMsg As String
Dim sSql As String
Dim sFile As String
sFile = modObjSession.SessionID & ".PDF"
If fnblnExportReport(modObjSe ssion("oRp t"), "PDF", GetPath, sFile, strErrMsg) = False Then
modObjResponse.Write "Failed to write PDF"
Else
sSql = "<SCRIPT LANGUAGE=""JavaScript"">"
sSql = sSql & " window.open(""" & sFile & ""","""",""menubar=no toolbar=no resizable=yes scrollbars=yes"")"
sSql = sSql & "</script>"
modObjResponse.Write sSql
modObjResponse.Flush
End If
End Function
Function fnblnExportReport(oRpt, strFormat, strpath, strfilename, strErrMsg) As Boolean
On Error Resume Next
Dim CrExportOptions
Set CrExportOptions = oRpt.ExportOptions
With CrExportOptions
Select Case strFormat
Case "PDF"
.FormatType = 31
.PDFExportAllPages = True
.DestinationType = 1 'crEDTDiskFile
.DiskFileName = strpath & "\" & strfilename
.UseReportNumberFormat = False
.UseReportDateFormat = False
End Select
End With
oRpt.Export False
If Err.Number <> 0 Then
strErrMsg = Err.Number & " : " & Err.Description
fnblnExportReport = False
Else
strErrMsg = ""
fnblnExportReport = True
End If
Set CrExportOptions = Nothing
End Function
Private Function GetPath() As String
Dim path As String
Dim iLen As Integer
path = modObjRequest.ServerVariab les("PATH_ TRANSLATED ")
While (Right(path, 1) <> "\" And Len(path) <> 0)
iLen = Len(path) - 1
path = Left(path, iLen)
Wend
GetPath = path
End Function
I then went back to the idea of exporting to PDF. I borrowed a function to export to pdf (fnblnExportReport) from Manish Sharma and then used javascript to open a new window with the file and it works ... in fact, it works better then the old ReportsJava.asp because it seems faster and I don't have the double take as it closes the second window.
The only messy part is I leave a copy of the pdf on the intranet server which I'll have to clean up later (but this is adequate for this helpdesk app that has less then 100 users)
My problem is how to be fair awarding the points. frodoman, I really appreciate your input, but since I went back to the PDF solution, I'll have to accept mlmcc answer. But I'm not sure of the proper netiquette so please advise.
Thanks and kindest regards,
Gary
--------------
The details to the solution used (as used in the ActiveX.dll):
Public Function PrintToPDF()
Dim strErrMsg As String
Dim sSql As String
Dim sFile As String
sFile = modObjSession.SessionID & ".PDF"
If fnblnExportReport(modObjSe
modObjResponse.Write "Failed to write PDF"
Else
sSql = "<SCRIPT LANGUAGE=""JavaScript"">"
sSql = sSql & " window.open(""" & sFile & ""","""",""menubar=no toolbar=no resizable=yes scrollbars=yes"")"
sSql = sSql & "</script>"
modObjResponse.Write sSql
modObjResponse.Flush
End If
End Function
Function fnblnExportReport(oRpt, strFormat, strpath, strfilename, strErrMsg) As Boolean
On Error Resume Next
Dim CrExportOptions
Set CrExportOptions = oRpt.ExportOptions
With CrExportOptions
Select Case strFormat
Case "PDF"
.FormatType = 31
.PDFExportAllPages = True
.DestinationType = 1 'crEDTDiskFile
.DiskFileName = strpath & "\" & strfilename
.UseReportNumberFormat = False
.UseReportDateFormat = False
End Select
End With
oRpt.Export False
If Err.Number <> 0 Then
strErrMsg = Err.Number & " : " & Err.Description
fnblnExportReport = False
Else
strErrMsg = ""
fnblnExportReport = True
End If
Set CrExportOptions = Nothing
End Function
Private Function GetPath() As String
Dim path As String
Dim iLen As Integer
path = modObjRequest.ServerVariab
While (Right(path, 1) <> "\" And Len(path) <> 0)
iLen = Len(path) - 1
path = Left(path, iLen)
Wend
GetPath = path
End Function
Looks like youfigured it out.
Glad I could help
mlmcc
Glad I could help
mlmcc
ASKER
My euphoria quickly subsided when it did not work on my Win 2003 production server. But that problem is not related to this solution so I opend a new Question : PDF export gives error -2147417848 Method '~' of object '~'
https://www.experts-exchange.com/questions/21127334/PDF-export-gives-error-2147417848-Method-'-'-of-object-'-'.html
https://www.experts-exchange.com/questions/21127334/PDF-export-gives-error-2147417848-Method-'-'-of-object-'-'.html
http://support.businessobjects.com/library/kbase/articles/c2015847.asp
frodoman