Print current data from SQL Server Database with Crystal Report

Hi,

I've a SQL Server Database and want toprint the current data record with the help of a crystal report.

SetDataSource:

report.SetDataSource(Form1.Table1BindingSource.DataSource) 'Now he prints the whole Table1

But how do print only the current values, I cant find any property like the position property of the Table1BindingSource.

Please help

[590 byte] By [ZoNeNjUnGe] at [2008-1-7]
# 1
What do you mean by current values? If you meant some filtered rows only then you can use DataSource's select method to return only the rows you want.
Yousuf_Ali at 2007-10-2 > top of Msdn Tech,Visual Studio,Crystal Reports for Visual Studio...
# 2

Hi,

yes I meant the filtered rows:

I have a Database with 7 Tables, which all have a relation to Table1

Then i select one row in Table1 with the Table1NavigationSource and the other Tables are updated (filtered) automatically. My Report should contain information about all 7 Tables (one in the upper-left corner, one in the upper-right...and so on). Therefor I created Subreports for each Table. But my prolem is how to "connect" the Visual-Studio-automatic-created DataSets to the Report:

Report.Subreport(1).SetDataSource(XXX)

Table2 is named "Adresses", so VS created a AdressesBindingSource and AdressesTableAdapter. Is there any possibility to use these (BindingSource, TabelAdapter,...) as DataSource for the Report, because of as i said they are updated automatically when I change the row in Table1 and that's why i don't want to "do it again".

I hope you understand what I mean Big Smile

and thanks for help

ZoNeNjUnGe at 2007-10-2 > top of Msdn Tech,Visual Studio,Crystal Reports for Visual Studio...

Visual Studio

Site Classified