Solved

Reports do not work without MSJVM

Posted on 2004-09-07
13
335 Views
Last Modified: 2008-03-17
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.
0
Comment
Question by:LanWorks
  • 6
  • 4
  • 3
13 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 12005382
Have you considered using the DHTML viewer - I believe this is the recommended viewer for use with .net framework.  You are correct that the ActiveX viewer won't work with .Net:

http://support.businessobjects.com/library/kbase/articles/c2015847.asp

frodoman
0
 

Author Comment

by:LanWorks
ID: 12006378
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?
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 12006590
What version of Crystal?  

Could you export the reports from the VB6 app to PDF files and display them?

mlmcc
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 42

Expert Comment

by:frodoman
ID: 12006867
You don't have to use .Net with the dhtml viewer:

Asp:
Dim viewer
Set viewer = CreateObject("CrystalReports.CrystalReportInteractiveViewer")


mlmcc's idea of exporting to PDF is a good idea also that may work for you.

frodoman
0
 

Author Comment

by:LanWorks
ID: 12011549
I'm using version 8.5 developer edition. Do they have a CrystalReportInteractiveViewer (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)
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 12012778
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
0
 

Author Comment

by:LanWorks
ID: 12012833
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?
0
 
LVL 42

Expert Comment

by:frodoman
ID: 12017355
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
0
 

Author Comment

by:LanWorks
ID: 12025455
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?
0
 
LVL 42

Expert Comment

by:frodoman
ID: 12026075
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
0
 

Author Comment

by:LanWorks
ID: 12032425
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(modObjSession("oRpt"), "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.ServerVariables("PATH_TRANSLATED")
    While (Right(path, 1) <> "\" And Len(path) <> 0)
        iLen = Len(path) - 1
        path = Left(path, iLen)
    Wend
    GetPath = path
End Function
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 12032484
Looks like youfigured it out.

Glad I could help

mlmcc
0
 

Author Comment

by:LanWorks
ID: 12034353
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 '~'
http://www.experts-exchange.com/Databases/Crystal_Reports/Q_21127334.html
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question