Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

viewer doesn´t display any report in ASP 3

Status
Not open for further replies.

Fursten

Programmer
Dec 27, 2000
403
PT
Hi.

I´m trying to view a report in the browser. I´m using ASP with this code (one exemple, the first one, that Crystal have in their site):



<SCRIPT LANGUAGE=&quot;VBScript&quot;>
<!--

Sub window_onLoad()
Page_Initialize()
End Sub

Sub Page_Initialize
On Error Resume Next
Dim webBroker
Set webBroker = CreateObject(&quot;WebReportBroker.WebReportBroker&quot;)
if err.number <> 0 then
window.alert &quot;The Seagate Software ActiveX Viewer is unable to create it's resource objects. To rectify this problem, please install Internet Explorer 4.0 or install DCOM for Windows 95 and the latest Microsoft Scripting Engine. These files are available at Microsoft's web site.&quot;
CRViewer.ReportName = &quot;test.rpt&quot;
else
Dim webSource0
Set webSource0 = CreateObject(&quot;WebReportSource.WebReportSource&quot;)
webSource0.ReportSource = webBroker
webSource0.URL = &quot;test.rpt&quot;
webSource0.PromptOnRefresh = True

CRViewer.ReportSource = webSource0
end if
CRViewer.ViewReport
End Sub


At the top of the page i have the object code stuff,too.

When I browse to the report, I can view the viewer inside it, however it doesn´t display any report...

I don´t get any error too.

What can I be doing wrong? :(

I´m using Crstal Reports 8.0 and ASP in windows 2000.
I´m not running Web component server. in fact, it isn´t even installed. Does I need it to view a report in a browser?


Thank you.
 
TedLiu,

In that link you saied about some examples Crystal has. I tryed the first one: &quot;Beginhere&quot;.

the code you give in that link is too much similar, except that you do a connection to the database and I dont, because the report has saved data.

I thought the problem my be something that would neeed to translate the report or something like that....

first of all, i would like to have sure about one thing: for be able to view reports in the browser, do I need Component Web Server? If not what is the point with this component?

And if i don´need it...why I can see any report. Please note that I already sow one in this url:
So, I can view reports in a browser but not those in my machine... I think that behind that url is component web server...

I really dont now
 
Hi Oxi,

The code I gave is almost same as what I use to display all my reports (more than 100). If report have saved data, you don't need to logon to sever at all. I don't think you need component web sever even I'm not sure because I moved to Crystal Enterprise for several months already.

Furthermore, First of all, i just check my code, seems what you post is the function used in ActiveX viewer page, and you did some changes. I don't think you need to do any changes in that page, just include it in your own asp page is ok; Secondly, I can't find &quot;rptserver.asp&quot; inside your code which indeed is the main function page provide by crystal report.

I use java viewer not activex viewer because we use NT workstation which may have some problem download activex viewer.

Still doesn't work, maybe let me know.

Cheers !

Ted

ted_liu@canadalife.com


 
TedLiu,

I really just copy and paste the first example from crystal. there database have saved data so logn is not necessary. But I think that even without saved that I shouldn´t need the logon info because the report as that info inside it, right?

The code I shown here is only diferent in name of the report, everything is equal. I just didn´t show the codebase tag for the viewer and the rptserver.asp, however I´m using them.

It seems that you never try to view reports over the web without Crystal Enterprise, right? I´m using just CR8.0 without CWS and stuff like that.

The code works fine, but the report isn´t shown. I see the viewer but the viewer doesn´t have the report inside. I don´t get any kind of errors in the code...

About the activex viewer... it seems it´s working well. However I dont´see the viewer as an object in the view objects option in the browser as Crystal says it should be there...And note that I already saw web reports using that url I gave earlier.

Really don´t know what is happenning :(
 
Hi Oxi,

1. If you don't have saved data, you need logon to server even you already verified database in report design mode.

2. CRViewer.ReportName = &quot;test.rpt&quot;
webSource0.URL = &quot;test.rpt&quot;
''in your code which are not correct.

3. I developed lots of report with cr80 too. I'm pretty much sure the code i provide will work for all the asp developers.

4. I got same problem too when I just start develop in cr80.
could you please paste my code with logon server to try, if you use native connectoin, just change dsnname to servername.

Could you please try a report only images inside without logon server?

Hope it helps!

Ted
 
Hi again,

I was trying the code again, but in debug now. In rptserver.asp there is a object creation like this:


' The oEMF object is a helper object to create EMFs (Ecapsulated Messages) for the viewers.
' The viewers use EMFs to display errors and navigate to specific pages of the report.

If Not IsObject(session(&quot;oEMF&quot;)) then
Set session(&quot;oEMF&quot;) = Server.CreateObject(&quot;CREmfgen.CREmfgen.1&quot;)
Call CheckForError
End if

However, I can´t create the object: CREmfgen.CREmfgen.1 this is because the object isn´t in my registry! I look over the web about it and I didn´t find nothing. Do you have it in your registry?

I tried to take off this code but then I get another error in the same file.


Thank you again!
 
HI!!

this was the problem argh!

I had solved, and now i can view reports over web.

Thank you
 
hey i am also facing the same problem and with the same line of code. i will be greatful, if you can tell me the solution.
Thanking You in advance
 
Hi :)

this is an old entry but, as far as I know I solved it. I discovered that when installing Crystal Reprot, one dll is not registered. I don´t remember the name.. maybe it is CREmfgen.dll or somthing like that. If you search for this name CREmfgen in Crystal decision web site you will see something about it.

So you will need to search that dll in Crystal CD and then copy and install it using regsrv32.exe

If you dont descover the name of that dll let me know.

 
hi!
i have the same problem, but i can not discover the correct name of the dll .Can you tell me,please?

Thank you
 
emfgen.dll. Find it in Crystal Reprots CD and register it in your PC.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top