i am using VWG version 3 and this wrapper control is using version 2 i believe. when i tried to use it in my project (in VS 2008 VWG) it gave me an error about a conflect of versions i believe...
any ideas how to use this control? i am using VWG in Visual Studio 2008..
Thanks
Posted by vina_m1 on Monday, March 31, 2008 2:14 PM
I'm getting an error trying to incorporate this into my project. This demo runs fine - until you remove the CrystalReportViewer from the Form and try to readd it by dragging it from the Toolbox. Errors ensue. Please help! An email would be greatly appreciated.
Error Screenshots:
-------------------------
http://www.konect.com/temp/ClientTarget.RunTime Error.jpg
http://www.konect.com/temp/DesignTime.ToolbarStyle.NullError.jpg
Software Versions:
-------------------------
Visual Web GUI v5.83.3 (.NET 2.0)
Visual Studio 2005
Crystal Reports v10.2.3600.0
Ryan D. Hatch
ryan.hatch | konect dot com
Posted by rdhatch on Monday, March 31, 2008 10:50 PM
Ok, I found the fix. The code that is generated when Dragging & Dropping the CrystalReportViewer onto a Form/User Control is incorrect. Here is the fix. Replace generated code with the code below. Enjoy!
Ryan D. Hatch
--
[Put in Form/User Control ____.Designer.vb, anywhere a CrystalReportViewer is used]
Private Sub InitializeComponent()
Me.CrystalReportViewer1 = New VWGCrystal.CrystalReportViewer
Me.SuspendLayout()
'
'CrystalReportViewer1
'
Me.CrystalReportViewer1.BackgroundImageLayout = Gizmox.WebGUI.Forms.ImageLayout.Tile
Me.CrystalReportViewer1.ClientSize = New System.Drawing.Size(811, 811)
Me.CrystalReportViewer1.ClientTarget = "Auto"
Me.CrystalReportViewer1.Cursor = Gizmox.WebGUI.Forms.Cursors.Default
Me.CrystalReportViewer1.Dock = Gizmox.WebGUI.Forms.DockStyle.Fill
Me.CrystalReportViewer1.Location = New System.Drawing.Point(0, 0)
Me.CrystalReportViewer1.Margin = New Gizmox.WebGUI.Forms.Padding(0)
Me.CrystalReportViewer1.Name = "CrystalReportViewer1"
Me.CrystalReportViewer1.PrintMode = CrystalDecisions.Web.PrintMode.Pdf
Me.CrystalReportViewer1.Size = New System.Drawing.Size(811, 811)
Me.CrystalReportViewer1.TabIndex = 0
Me.CrystalReportViewer1.Text = "CrystalReportViewer1"
[...........]
[End Sub]
Friend WithEvents CrystalReportViewer1 As VWGCrystal.CrystalReportViewer
Posted by rdhatch on Tuesday, April 01, 2008 1:00 AM
Well, apparently - that code fixed the demo project contained here. I was able to remove the control from the Form and readd it, and overwrite the code generated within Designer.vb just fine. That seemed to fix the demo project.
However - when I attempted this in my own project - Visual Studio keeps overwriting my changes inside Designer.vb. I keep getting the "ToolbarStyle" "null is not allowed" error. Here is the code VS is generating, which seems to be causing the error:
--
'
'CrystalReportViewer1
'
Me.CrystalReportViewer1.Anchor = Gizmox.WebGUI.Forms.AnchorStyles.None
Me.CrystalReportViewer1.ClientTarget = "Auto"
Me.CrystalReportViewer1.Dock = Gizmox.WebGUI.Forms.DockStyle.Fill
Me.CrystalReportViewer1.DrilldownTarget = "True"
Me.CrystalReportViewer1.GroupTreeImagesFolderUrl = ""
Me.CrystalReportViewer1.HasRefreshButton = True
Me.CrystalReportViewer1.Location = New System.Drawing.Point(0, 0)
Me.CrystalReportViewer1.Name = "CrystalReportViewer1"
Me.CrystalReportViewer1.PageToTreeRatio = 0
Me.CrystalReportViewer1.PageZoomFactor = 0
Me.CrystalReportViewer1.PrintMode = CrystalDecisions.Web.PrintMode.Pdf
Me.CrystalReportViewer1.ShowAllPageIds = True
Me.CrystalReportViewer1.Size = New System.Drawing.Size(796, 789)
Me.CrystalReportViewer1.TabIndex = 0
Me.CrystalReportViewer1.Text = "CrystalReportViewer1"
Me.CrystalReportViewer1.ToolbarImagesFolderUrl = ""
How do I fix this? Please help! Email would be greatly appreciated.
Ryan D. Hatch
ryan.hatch | konect dot com
Posted by rdhatch on Tuesday, April 01, 2008 1:19 AM
Please i need a detailed example on how to use that. do i just add the DLL to my references and call the crystalreportviewer of the VWGCrystal?? or do i add a crystalReportViewer from the toolbox myself?? (when i do that, i dont see anything in the form, as if it did not add anything!!). also do i need to add anything to the web.config?? does it matter if i am using version 3 of VWG?
Please help
Thanks
Posted by vina_m1 on Tuesday, April 01, 2008 9:58 AM
To use this, you add the CrystalWrapper file to your project, then rebuild. Now go into Design view of your Form or User Control - you will see the CrystalReportViewer in your Toolbox under the name of your project. Drag this onto the Form or User Control.
Problem is - the auto-generated code in the Designer.vb files causes errors.
All I get is errors, continously. "ToolbarStyle null"
Please help!
Ryan D. Hatch
ryan.hatch | konect dot com
Posted by rdhatch on Tuesday, April 01, 2008 10:17 AM
Hi,
I figured out what seems to be the wrapper's problem. In order to stop these annoying messages from the designer, you'll have to add default values to some of its properties:
1. Return GetObjectParam("ToolbarStyle", New ToolbarStyle())
2. Return GetObjectParam("GroupTreeStyle", New GroupTreeStyle())
3. Return GetObjectParam("PrintMode", PrintMode.Pdf)
Hope it helps,
Shlomi
Posted by shlomi.bin on Wednesday, April 02, 2008 4:21 AM
Hi,
I uploaded a new version of the ZIP file as well - for your convenient.
Shlomi
Posted by shlomi.bin on Wednesday, April 02, 2008 4:37 AM
perfect...i got it to work on my machine finally :) but now i have a small problem!! when i run the application on the deploying machine (which doesn't have crystal installed) i get this error:
"Could not load file or assembly 'CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified."
does anyone have the msi file to add these dlls to the deploying machine? the deploying machine only have these dlls in version 10.2.3600.0
Please help...i need this ASAP
Thanks alot for all the hard work!
Posted by vina_m1 on Thursday, April 03, 2008 9:41 AM
First of all I would like to excuse me for my English.
I have add as reference, the VWGCrystal.dll. I drag and drop the CrystalReportViewer(the control that was generated from the dll) on the form and when the project is being compiled an exception is shown at the mozila
Value does not fall within the expected range.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Value does not fall within the expected range.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: Value does not fall within the expected range.]
CrystalDecisions.Web.CrystalReportViewerBase.set_ClientTarget(String value) +78
CrystalDecisions.Web.CrystalReportViewer.set_ClientTarget(String value) +33
VWGCrystal.VWGCrystal.CrystalReportViewer.get_InternalReportViewer() +395
VWGCrystal.VWGCrystal.CrystalReportViewer.GetHostedControl(Page objASPPage) +225
Gizmox.WebGUI.Forms.Hosts.AspControlBoxBase.CreateHostPage() +349
Gizmox.WebGUI.Forms.Hosts.AspControlBoxBase.Gizmox.WebGUI.Common.Interfaces.IGatewayControl.GetGatewayHandler(IContext objContext, String strAction) +33
Gizmox.WebGUI.Common.Gateways.Gateway.ProcessRequest(HttpContext objHttpContext) +374
[HttpException (0x80004005): Value does not fall within the expected range.]
Gizmox.WebGUI.Common.Gateways.Gateway.ProcessRequest(HttpContext objHttpContext) +864
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
Posted by oti on Tuesday, May 27, 2008 4:21 AM
I'm getting the same error today like oti @ Tuesday, May 27, 2008 4:21 AM above is.
I'm using IE7 and Crystal 11.5.3700.0
Help!!!
Posted by dennisdodson on Thursday, May 29, 2008 5:02 PM
Also, the .Zip file does not contain the two tester projects that are referenced in the Solution File - ASPCrystalTester and VWGCrystalTester.
How can I acquire?
Posted by dennisdodson on Thursday, May 29, 2008 5:07 PM
Ok, I have everything working great on Crystal 10.x
I've created a demo project for you all. Hopefully it works on 11.x as well.
Ryan
Download: http://www.konect.com/temp/2008.05.29.RyansVWGCrystalWrapper.zip
PS. I wish I could upload code to this VWG website instead of my own. Permission denied when I tried adding a Code Snippet.
Posted by rdhatch on Thursday, May 29, 2008 7:26 PM
Also, To install Crystal Reports on the deployment server using MSI Redistributable - you can find the MSI file in your local Visual Studio folder:
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages\CrystalReports\CRRedist2005_x86.msi
Posted by rdhatch on Thursday, May 29, 2008 7:33 PM
Ryan, thanks for the code, it helped.
Now I get this error:
Unable to cast object of type 'Gizmox.WebGUI.Forms.Component[]' to type 'Gizmox.WebGUI.Forms.Control[]'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidCastException: Unable to cast object of type 'Gizmox.WebGUI.Forms.Component[]' to type 'Gizmox.WebGUI.Forms.Control[]'.
Source Error:
Line 25: 'VwgCrystalViewer1
Line 26: '
Line 27: Me.VwgCrystalViewer1.DragTargets = New Gizmox.WebGUI.Forms.Component(-1) {}
Line 28: Me.VwgCrystalViewer1.Location = New System.Drawing.Point(155, 84)
Line 29: Me.VwgCrystalViewer1.Name = "VwgCrystalViewer1"
Source File: C:\Program Files\Gizmox\RyansCrystalWrapper\Form1.Designer.vb Line: 27
Stack Trace:
[InvalidCastException: Unable to cast object of type 'Gizmox.WebGUI.Forms.Component[]' to type 'Gizmox.WebGUI.Forms.Control[]'.]
RyansCrystalWrapper.Form1.InitializeComponent() in C:\Program Files\Gizmox\RyansCrystalWrapper\Form1.Designer.vb:27
RyansCrystalWrapper.Form1..ctor() +193
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +103
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +268
System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1036
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +114
Gizmox.WebGUI.Server.Context.50AA0(String 0AAAA, String 1AAAA, Object[] 2AAAA) +48
Gizmox.WebGUI.Server.Context.CreateMainForm() +187
Gizmox.WebGUI.Server.Content.GetMainForm() +366
Gizmox.WebGUI.Server.Content.ProcessRequest(HttpContext objHttpContext) +704
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
Gizmox.WebGUI.Server.Content.ProcessRequest(HttpContext objHttpContext) +4375
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; WebGui Version:2.0.50727.1433
Posted by dennisdodson on Friday, May 30, 2008 11:17 AM
Hi Dennis,
What build of VWG are you using?
I'm using v6.0.2 and that code works fine for me.
Ryan
Posted by rdhatch on Friday, May 30, 2008 12:06 PM
Ryan,
I'm using .Net 2.0 build 5.84.2
Will do upgrade and advise.
Thanks...
Posted by dennisdodson on Friday, May 30, 2008 12:13 PM
Ryan,
I upgraded to v6.0.2 and form rendered!
I did however, had to add the following to
VWGCrystalViewer.Designer.vb:
Dim myToolbarStyle As CrystalDecisions.Shared.ToolbarStyle = New CrystalDecisions.Shared.ToolbarStyle
Me.CrystalReportViewer.ToolbarStyle = myToolbarStyle
The only other thing to do is find the images to
add to the ToolbarImagesFolderUrl property.
Thanks again for the help.
Posted by dennisdodson on Friday, May 30, 2008 12:50 PM
Glad you got it to work!!
To get the Crystal Toolbar Images - simply copy the aspnet_client folder from my project into the root folder of your VWG project.
Should be good to go.
Ryan
Posted by rdhatch on Friday, May 30, 2008 12:52 PM
When I add images to a crystal report, the embedded images are not shown when the application is running.
Is there a specific folder that this images should
be in.
Currently for the images I'm using the default resources/images folder
Posted by oti on Friday, June 27, 2008 2:51 AM
This cystal wrapper, is avaible on VWG version 3 and VS 2008 VWG??
Posted by RTORT on Monday, July 14, 2008 10:36 AM
when i try to open the 'VWGCrystal.vbproj' file i face this problem:
Microsoft Development Environment
---------------------------
Unable to read the project file 'VWGCrystal.vbproj'. The file 'D:\E_Books\VB.net\CrystalReportCode\Gizmox.WebGUI.CrystalReports.CrystalReportViewer.1.2\VWGCrystal.vbproj' is not a valid project file. The project file is missing the 'VisualStudioProject' section.
Posted by nosh99 on Tuesday, July 15, 2008 6:00 AM
Hi,
I'm having problem in printing the report. The pint button points to a dialog which always exports the report in PDF. When I changed my default printer from Adobe PDF to some other it doesn't work. It shows page cannot be displayed error.
Posted by piyusht on Thursday, November 20, 2008 12:35 AM
Gizmox - can you please post the newer Crystal Reports wrapper here? This is an old version of the Crystal Wrapper. I have a demo here:
http://support.visualwebgui.com/issue/ViewIssue.aspx?ID=3764
However - I do not see how Design-time is NOT supported now - but it was supported previously in older versions of this wrapper.
Ryan
Posted by rdhatch on Friday, February 06, 2009 11:12 AM
i'm using this control
so far is good enough
but when i'm working with chart report and i deploy it on server why my chart doesn't appear on report?
is there some of u guys know why
Thanks
warm regards,
Rochmad
Posted by Rochmad Sigit on Sunday, April 05, 2009 11:25 PM
Hi Rochmad -
This code is now deprecated. Please see new Crystal Reports Viewer here:
http://www.visualwebgui.com/Developers/Resources/Codes/tabid/326/articleType/ArticleView/articleId/481/Crystal-Reports-Viewer.aspx
Ryan
Posted by rdhatch on Monday, April 06, 2009 9:10 AM
Hi Ryan,
Thanks very much,
i'll try it
regards,
Rochmad
Posted by Rochmad Sigit on Tuesday, April 07, 2009 11:20 PM