Re: Showing dataset data on Crystal Report
From: Greg Burns (greg_burns_at_DONT_SPAM_ME_hotmail.com)
Date: 09/24/04
- Next message: Hermit Dave: "Re: inject JavaScript from code behind"
- Previous message: Hermit Dave: "Re: DataGrid Question"
- In reply to: Greg Burns: "Re: Showing dataset data on Crystal Report"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 24 Sep 2004 16:16:36 -0400
Doh! I thought this was a Winform not a web project. Hopefully the links
will still be helpful.
Greg
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:uNCuFLnoEHA.1776@TK2MSFTNGP14.phx.gbl...
> This shouldn't be necessary:
> CrystalReportViewer1.DataBind()
>
> Was your report file (empsReport) created using the .xsd file as its
> datasource?
>
> http://support.businessobjects.com/library/kbase/articles/c2010929.asp
>
> Check out the ADONET sample in this download:
> http://support.businessobjects.com/communityCS/FilesAndUpdates/vbnet_win_samples.exe.asp
>
> HTH,
> Greg
>
> "Ceri" <cerilocke@ev1.net> wrote in message
> news:9ea09130.0409241147.7b9e047c@posting.google.com...
>>I have been trying to display dataset data in a Crystal Report in a
>> Crystal Reports Viewer using VB.Net. Displaying the data from the
>> default xtreme.mdb Access database was no problem, but when trying to
>> display data from an SQL 2000 database, no data ever shows. Could
>> somebody please tell me what alterations need to be made to the
>> following code?
>>
>> Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
>> System.EventArgs) Handles MyBase.Init
>> InitializeComponent()
>> Dim newRpt As New empsReport 'Name of Crystal Report
>> Dim newConn As New
>> OleDbConnection("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist
>> Security Info=False;Initial Catalog=pubs;Data Source=xxxxx;Use
>> Procedure for Prepare=1;Auto Translate=True;Packet
>> Size=4096;Workstation ID=xxxxx;Use Encryption for Data=False;Tag with
>> column collation when possible=False")
>> Dim newAdapter As New OleDbDataAdapter("SELECT fname, lname
>> FROM employee", newConn)
>> Dim dataSet As New dsEmps 'Name of .xsd dataset that has been
>> created with the Employee table
>> newAdapter.Fill(dataSet, "employees")
>> newRpt.SetDataSource(dataSet)
>> CrystalReportViewer1.ReportSource() = newRpt
>> CrystalReportViewer1.DataBind()
>> End Sub
>>
>> I am trying it with an OleDbConnection as I thought that I may have
>> more joy with this after failing with an SQLConnection. The code runs
>> without a problem, but the report only shows the field headings, and
>> not the data entries. All I have done is convert the code for
>> connecting to the Access Database, and I have been unable to find any
>> VB.Net solution. A solution to my problem would be greatly
>> appreciated.
>
>
- Next message: Hermit Dave: "Re: inject JavaScript from code behind"
- Previous message: Hermit Dave: "Re: DataGrid Question"
- In reply to: Greg Burns: "Re: Showing dataset data on Crystal Report"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|