Crystal Report & Code based Dataset

Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Oct 2006
Posts: 169
Reputation: ptaylor965 is an unknown quantity at this point 
Solved Threads: 19
Sponsor
ptaylor965's Avatar
ptaylor965 ptaylor965 is offline Offline
Junior Poster

Crystal Report & Code based Dataset

 
-1
  #1
Apr 27th, 2007
I have a dataset (Private DS As New DataSet)
and i need to make a Crystal Report from the data held within it

The data comes from multiple tables then merge into a new table held in the dataset only

How do i create the Crystal Report as the new table layout does not exist out side of the dataset (not on the server)
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 3
Reputation: taralsoni is an unknown quantity at this point 
Solved Threads: 1
taralsoni taralsoni is offline Offline
Newbie Poster

Re: Crystal Report & Code based Dataset

 
0
  #2
Apr 30th, 2007
Originally Posted by ptaylor965 View Post
I have a dataset (Private DS As New DataSet)
and i need to make a Crystal Report from the data held within it

The data comes from multiple tables then merge into a new table held in the dataset only

How do i create the Crystal Report as the new table layout does not exist out side of the dataset (not on the server)
Hey you have to folloe the following steps;

1. Create XML schema of the data which you want tobe in crystal report and save it some where. e.g. "c:/XML/". Give the name to xml schema.

2. Then open command prompt of Visual Studio and write following command.

xsd.exe /d /l:VB "C:/XML/xsdname.xsd"

this will create dataset for the xsd. It will be saved in bin directory of visual studio folder.

Then include the that dataset file it to your project.

And then create an instance of that dataset for datasaving. and the that xsd file for crystal report creation.

Select xsd file as the datasource of crystal report in "other datasource" tag in crystal report creation wizard.

If you have any problem mail me on taralsoni@gmail.com. I have done the same work.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 169
Reputation: ptaylor965 is an unknown quantity at this point 
Solved Threads: 19
Sponsor
ptaylor965's Avatar
ptaylor965 ptaylor965 is offline Offline
Junior Poster

Re: Crystal Report & Code based Dataset

 
0
  #3
Apr 30th, 2007
I actually did 'right click' on my Solution and Add a Dataset that way and it worked

but I was hoping to be able to get reports without needing to add a 'Solution Wide Dataset' but using a 'form based Dataset' instead

Is that possible?
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 16
Reputation: jaytheguru is an unknown quantity at this point 
Solved Threads: 0
jaytheguru jaytheguru is offline Offline
Newbie Poster

Re: Crystal Report & Code based Dataset

 
0
  #4
Apr 9th, 2008
Many thanks for the link, it is very useful however, i am stuck at a stage where it is throwing an exception when button is clicked.

Have no clue how to fix this issue. Any one has any ideas?

System.Security.SecurityException was unhandled
Message="Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
Source="mscorlib"
StackTrace:
at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security.CodeAccessPermission.Demand()
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport()
at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(IEnumerable enumerable)
at WindowsApplication1.Form1.shwrpt_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationContext context)
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at WindowsApplication1.My.MyApplication.Main(String[] Args)
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 9
Reputation: jerry32uk is an unknown quantity at this point 
Solved Threads: 0
jerry32uk jerry32uk is offline Offline
Newbie Poster

Re: Crystal Report & Code based Dataset

 
0
  #5
Jun 6th, 2009
check the following link , it will show how to create crystal reports from dataset.

http://vb.net-informations.com/cryst...t_database.htm

jerry.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC