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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

asp.net and CE9 Report Viewing

Status
Not open for further replies.

FredTechie

Programmer
Jun 9, 2002
4
CA
There seems to be null examples on a simple procedure such as viewing reports using asp.net. I can view a report using all there other libraries com,jsp/servlets,csp ..... but I just want a simple example of doing this procedure in asp.net. Does anybody have a sample of this ? I checked devzone they have everything but viewing a report with asp.net. It is not very intuitive. I can do all other procedures such as listing reports and folders. I just need the final piece viewing reports.
I think this example would benefit more then just me.

Thanks in Advance.
 
That is good for reports that do not run on CE9. There is a lot of examples for just viewing .rpt file in an asp.net application, but that is not what I am looking for. I am loooking for an example that views a report object from CE 9. I have it half working at the moment, I can now render a report!!! but the drill down and all other buttons throw an exception.

Examples still needed! If I get it working I will post the files source code.

Thanx anyway.
 
As mentioned in my first post I have already gone through devzone. Crystal seems to want it a secret. Very poor on their part. There java packages when released had documention on all this stuff. why can't they make it for .net!!!????

 
All your need to do is set two properties on the viewer.

1. Pass your enterprisesession object to the EnterpriseLogon property of the viewer.

2. Pass your infoobject to the Reportsource property of the viewer.

Hope this helps!

Cheers.
 
Does anyone have a simple example of this? I am running into some problems.

I have set my ReportViewer.ReportSource to my InfoObject and I have set my ReportViewer.enterpriseLogin to my EnterpriseSession object.

I then get an error that my sqlserver login failed. I have tried setting the viewer.logoninfo but that does not appear to work.

Anyone have a basic sample of how to get a CE report and view it using .net?
 
did you ever find a solution to your question ?
the code that i'm trying to use is:
<%@ Register TagPrefix=&quot;CR&quot; Namespace=&quot;CrystalDecisions.Web&quot; Assembly=&quot;CrystalDecisions.Web&quot; %>
<%@ Page Language=&quot;VB&quot; %>
<%@ Import Namespace=&quot;CrystalDecisions.Web&quot; %>
<html>
<head>
<script runat=&quot;server&quot;>
Protected Sub CRViewer1_OnDrill(Source As Object, e As DrillEventArgs)
Label1.Text = &quot;You drilled down on &quot; & _
e.NewGroupName
End Sub
</script>
</head>
<body>
<form runat=&quot;server&quot;>
<CR:CrystalReportViewer id=&quot;CRViewer1&quot; runat=&quot;server&quot; width=&quot;500px&quot; height=&quot;500px&quot; ReportSource=&quot;C:\ OnDrill=&quot;CRViewer1_OnDrill&quot;/>
<asp:Label id=Label1 runat=server/>
</form>
</body>
</html>


It always generates this error message:

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Cannot create an object of type 'System.Object' from its string representation 'C:\ for the 'ReportSource' property.

Source Error:


Line 16: <form runat=&quot;server&quot;>
Line 17:
Line 18: <CR:CrystalReportViewer id=&quot;CRViewer1&quot; runat=&quot;server&quot; width=&quot;500px&quot; height=&quot;500px&quot; ReportSource=&quot;C:\ OnDrill=&quot;CRViewer1_OnDrill&quot;/>
Line 19:
Line 20: <asp:Label id=Label1 runat=server/>

thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top