Brockmann: "Creating Rich Web
Applications Gets a Ton Easier"

e-grou chooses Visual WebGui
over standard ASP.NET

Quick migration of VB 6.0
Applications to the Web

Fully functional software versions
for 30 days evaluation period

Download the free edition of the
Visual WebGui Studio
 

Code Snippets

rdhatch posted on February 26, 2009 :: 1454 views

Hello Everyone,

I've successfully wrapped the Crystal Reports Viewer for VisualWebGUI.

In addition to the wrapper, I demonstrate the use of 2 other approaches using a Server Control and an AspPageBox/AspPageBase.

I hope this helps you!  Thank you -

Ryan D. Hatch

ryan [.] hatch [at] konect [com]

Download Code

Note: Codes are submitted as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Terms of Agreement:
By using this code, you agree to the following terms...

  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame.
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

Post Rating

Comments

# Eyal.Albert
Good work :-)
Posted by Eyal.Albert on Sunday, March 01, 2009 1:17 AM
# rdhatch
Fix for .NET 3.5 Page Numbering Issue:

' The secret to getting this to work was to set the ReportSource on EVERY Postback, because the ReportSource is defined as "nonhttpcachedreportsource" - which means it is not stored in the ViewState
Private myReportSource As Object
Private Sub HostedPage_Load(ByVal sender As Object, ByVal e As Gizmox.WebGUI.Forms.Hosts.AspPageEventArgs) Handles Me.HostedPageLoad

If Me.myReportSource IsNot Nothing Then
'Remember what Page Number we're on
Dim myCurrentPageNumber As Integer = Me.HostedCrystalReportViewer.ViewInfo.PageNumber
'Reload Report
Me.HostedCrystalReportViewer.ReportSource = myReportSource

'Jump to Last Page - This prevents Page Numbers showing as: 1/1+, 2/2+
Me.HostedCrystalReportViewer.ShowLastPage()
'Return to Page Number
Me.HostedCrystalReportViewer.ShowNthPage(myCurrentPageNumber)

End If

End Sub


PS. Thanks to Dirk in Germany for a great sample app, which helped me find the problem.

Ryan
Posted by rdhatch on Thursday, May 21, 2009 2:37 AM
# egirardi
When running the demo, I get the following error in VWGCrystalReportViewer.ReportSource on the Set property. CrystalDecisions.web is added as a reference to the project and no errors occur at Build time. This error occurs during run time.

Also, each time I open the project it is asking me to convert it. After conversion it everything seems to be fine and conversion is successful. I am using Visual Studio 2008 pro edition, .net framework 3.5 and Visual WebGui Projects Version 6.3


Public Property ReportSource() As System.Object
Get
Return CType(Me.GetProperty("ReportSource"), System.Object)
End Get
Set(ByVal value As System.Object)
----> Me.SetProperty("ReportSource", value)

'Save Report - so we can set it at HostedPage_Load
myReportSource = value
End Set
End Property



System.Web.HttpParseException was unhandled by user code
ErrorCode=-2147467259
FileName="F:\Projects\Samples\CrystalReportsDemo\VWG_AspResource\guid_6ac5a8b2475e4abaa31d566654cbb28d.ascx"
Line=2
Message="Could not load file or assembly 'CrystalDecisions.Web, Version=10.2.3600.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified."
Source="System.Web"
VirtualPath="/VWG_AspResource/guid_6ac5a8b2475e4abaa31d566654cbb28d.ascx"
Posted by egirardi on Monday, August 24, 2009 6:35 PM
# rdhatch
I've just submitted a new Code Snippet for a .NET 3.5 Crystal Reports Viewer.

Enjoy!

Ryan
Posted by rdhatch on Monday, August 24, 2009 6:47 PM

Post Comment

Only registered users may post comments.
Most promising startups
Top 3 most promising startups in 2009
   AJAX Framework | Web Development | Cloud applications | RIA Development | Silverlight Applications | Legacy Migration
The most popular open source Ajax applications framework for enterprises | Sitemap | Terms Of Use | Privacy Statement
Copyright © 2005-2009 Visual WebGui®    Design By: Template World
   
Visual Studio Partners