943,786 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Marked Solved
  • Views: 23848
  • VB.NET RSS
Apr 27th, 2007
-2

Crystal Report & Code based Dataset

Expand 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)
Similar Threads
Reputation Points: 16
Solved Threads: 19
Junior Poster
ptaylor965 is offline Offline
169 posts
since Oct 2006
Apr 30th, 2007
0

Re: Crystal Report & Code based Dataset

Click to Expand / Collapse  Quote originally posted by ptaylor965 ...
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 SNIPPED. I have done the same work.
Last edited by adatapost; Jan 31st, 2010 at 12:35 am. Reason: SNIPPED
Reputation Points: 10
Solved Threads: 1
Newbie Poster
taralsoni is offline Offline
3 posts
since Apr 2007
Apr 30th, 2007
0

Re: Crystal Report & Code based Dataset

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?
Reputation Points: 16
Solved Threads: 19
Junior Poster
ptaylor965 is offline Offline
169 posts
since Oct 2006
Apr 9th, 2008
0

Re: Crystal Report & Code based Dataset

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()
Reputation Points: 10
Solved Threads: 0
Newbie Poster
jaytheguru is offline Offline
18 posts
since Aug 2007
Jun 6th, 2009
0

Re: Crystal Report & Code based Dataset

check the following link , it will show how to create crystal reports from dataset.

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

jerry.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
jerry32uk is offline Offline
14 posts
since Apr 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in VB.NET Forum Timeline: developing web application using vb.net
Next Thread in VB.NET Forum Timeline: Drawing App - Saving





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC