Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Crystal Reports XI - Anyone having problems with it?Crystal Reports XI - Anyone having problems with it?
Previous
 
Next
New Post
7/17/2007 6:45 PM
 
I've recently upgraded from CR 10 which came with VS2005, to CR 11 Developers Edition. I have a project that has CR 10 reports in it and everything ran great on my development PC until I upgraded. Now when I try to run DNN from VS2005 I get a generic IE error page saying that there's either a problem with my connection, a problem with the address or a problem with the web site.

After paying Crystal for a single instance tech support call and wasting 5+ hours with a tech from India who's command of the English language is less than admirable, I find myself having to create a new DNN project and copying and pasting my modules into it since I can add CR 11 to a DNN project that didn't have any CR reports prior to upgrading.

Anyone else having similar problems or better yet, a solution?

Thanks,

Steve
 
New Post
7/17/2007 7:40 PM
 

Steve,

I have learned the hard way that installing the CR-11 update for VS 2005 results in a problem for me.  With CR-10, I had been acustomed to 1) creating a new web from; 2) dragging the CrystalReportViewer onto the form; and then 3) editing the auto generated codebehind to point to my report_name.rpt file. 

With the CR-11 CrystalReportViewer auto generates source for the object that is not correct.  Each time I have to manually edit the code so that it looks like  (vb code behind example also follows):

@ Register TagPrefix="cr" Namespace="CrystalDecisions.Web" Assembly="CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" %>@ Page Language="vb" AutoEventWireup="false" Inherits="Webproject1vs5.frmItemActivityDateRange" CodeFile="frmItemActivityDateRange.aspx.vb" %>

<!

<

DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">HTML>

 

<HEAD>

 

<title>frmDisplayPO</title>

 

<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">

 

<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">

 

<meta name="vs_defaultClientScript" content="VBScript">

 

<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">

 

</HEAD>

 

<body>

 

<form id="Form1" method="post" runat="server">

 

&nbsp;

 

<cr:CrystalReportViewer id="myCrystalReportViewer" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 8px"

 

runat="server" PrintMode="ActiveX" AutoDataBind="true" Height="50px" Width="350px" HasCrystalLogo="False"></cr:CrystalReportViewer>

 

</form>

 

</

</body>html>

----------------------------------------------

Codebehind:

Namespace

 

 

#

Webproject1vs5Partial Class frmItemActivityDateRangeInherits System.Web.UI.PageRegion " Web Form Designer Generated Code "

 

'This call is required by the Web Form Designer.

<System.Diagnostics.DebuggerStepThrough()>

 

 

 

Private Sub InitializeComponent()Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmItemActivityDateRange))Me.myReport = New CrystalDecisions.CrystalReports.Engine.ReportDocument'

 

'myReport

 

'

 

Me.myReport.FileName = ""

 

End Sub

 

 

 

Protected WithEvents myReport As CrystalDecisions.CrystalReports.Engine.ReportDocumentPrivate Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init'CODEGEN: This method call is required by the Web Form Designer

 

'Do not modify it using the code editor.

InitializeComponent()

myReport.Load(

myCrystalReportViewer.ReportSource = myReport

myCrystalReportViewer.PrintMode = 1

"c:\inetpub\wwwroot\Webproject1vs5\rptInvItemActivityDateRange.rpt")' or 0 for pdf printing

 

End Sub

#

End Region

 

 

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load'Put user code to initialize the page here

 

End Sub

 

End

End Class Namespace

<%

<%

 

 
New Post
7/30/2007 4:15 PM
 
I never figured out what FUBARed my DNN project. I took the sure way out and reinstalled everything on a new PC as I didn't have time to screw around trying to figure out what was wrong and Crystal Reports/Business Objects tech support was of no help.

Everything is working now and I'm importing my custom modules to my new DNN project.

I just thought I'd share a bit of code with you on generating CR reports without using the viewer. I don't know if there is an easier/better way with version 11, but this works on both version 10 and 11. I use a bit of javascript assigned to a button to open a regular .aspx page from within my desktop module. The Page Load event fires off the following code that renders out the .aspx page as a .pdf.

Dim crReportDocument As ReportDocument
crReportDocument = New ReportDocument
Dim sPath As String = Server.MapPath("myReport.rpt")
crReportDocument.Load(sPath)
crReportDocument.SetDataSource(myDataSet)

Dim crExportOptions As New CrystalDecisions.Shared.ExportOptions
crExportOptions.ExportFormatType = CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat
Dim crExportRequestContext As New CrystalDecisions.Shared.ExportRequestContext
crExportRequestContext.ExportInfo = crExportOptions
Dim myStream As System.IO.Stream

Try
myStream = crReportDocument.FormatEngine.ExportToStream(crExportRequestContext)

Response.ClearHeaders()
Response.ClearContent()
Response.ContentType = "application/pdf"
Dim myBuffer(myStream.Length) As Byte
myStream.Read(myBuffer, 0, CType(myStream.Length, Integer))
Response.BinaryWrite(myBuffer)
Response.End()
Catch ex As Exception
sbLogPDFExportErrors(ex)
End Try
myStream = Nothing
crExportRequestContext = Nothing
crExportOptions = Nothing
crReportDocument = Nothing
myDataSet = Nothing
GC.Collect()
 
New Post
10/24/2007 5:09 PM
 

How do you pass parameters to your crystal report from this?  Also... I need it to open to another window.  How can I do it this way?

 
New Post
10/25/2007 2:33 PM
 

ok... I got the parameters working on this one.  Can anyone help me out with the PDF opening up in a new window?

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Crystal Reports XI - Anyone having problems with it?Crystal Reports XI - Anyone having problems with it?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out