Solved

Reports do not work without MSJVM

Posted on 2004-09-07
13
322 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

932 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now