Creating Reports in VB .NET 2010
Creating Reports in VB .NET 2010
Creating Reports in VB .NET 2010
Creating Reports in VB .NET 2010
Creating Reports in VB .NET 2010
Creating Reports in VB .NET 2010 Creating Reports in VB .NET 2010 Creating Reports in VB .NET 2010 Creating Reports in VB .NET 2010 Creating Reports in VB .NET 2010 Creating Reports in VB .NET 2010 Creating Reports in VB .NET 2010 Creating Reports in VB .NET 2010
Creating Reports in VB .NET 2010 Creating Reports in VB .NET 2010
Creating Reports in VB .NET 2010
Go Back  Xtreme Visual Basic Talk > > > Creating Reports in VB .NET 2010


Reply
 
Thread Tools Display Modes
  #1  
Old 12-11-2013, 03:32 AM
HenDee HenDee is offline
Newcomer
 
Join Date: May 2004
Posts: 1
Default Creating Reports in VB .NET 2010


Hello all,

I am new to VB .NET and I am seeking your help. I would like to generate a student' school report that uses the data in the fields in my temp data table. I have records picked from an Access table into a temp data table in VB.NET 2010. I set the criteria in a form as below. The code below gets only the record(s) that fit the user's set criteria.

What I am looking for is to have this same criteria used by a report so that the records printed are those selected. I tried to create a .xsd file and got the fields of interest in the .xsd file but how to pull only the records of interest into the report and not all the records in the Access table is the problem. How can I get that?

The segment in the form that picks the records of interest is as below

Dim m_SQLstringID, m_SQLstring As String
Dim m_daDataAdapterPrint As New OleDb.OleDbDataAdapter
Dim m_cbCommandBuilder As OleDb.OleDbCommandBuilder
Public m_dtPrint As New DataTable

m_cnDONetConnectionTerm1.ConnectionString = _
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Documents and Settings\All Users\Documents\HD\SchoolRegisterApplication\Resources\DB\SRA.accdb;Je t OleDbatabase Password='xy!2389ZZ'"
m_SQLstring = "Select * from AcademicResultsTerm1Table WHERE "
m_SQLstringID = "UserID = '" & (frmEditStartScreen.txtEditID.Text) & "'"
m_SQLstring = m_SQLstring & m_SQLstringID
m_cnDONetConnectionTerm1.Open()

m_daDataAdapterPrint = _
New OleDb.OleDbDataAdapterm_SQLstring, m_cnDONetConnection)

m_cbCommandBuilder = New OleDb.OleDbCommandBuilder(m_daDataAdapterPrint)

m_daDataAdapterPrint.Fill(m_dtPrint)

The info that is printed should come from m_dtPrint and can be several pages depending on the data in a given record and the report is not in grid form, information will be printed all over the page.

Kindly help.

HenDee.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Creating Reports in VB .NET 2010
Creating Reports in VB .NET 2010
Creating Reports in VB .NET 2010 Creating Reports in VB .NET 2010
Creating Reports in VB .NET 2010
Creating Reports in VB .NET 2010
Creating Reports in VB .NET 2010 Creating Reports in VB .NET 2010 Creating Reports in VB .NET 2010 Creating Reports in VB .NET 2010 Creating Reports in VB .NET 2010 Creating Reports in VB .NET 2010 Creating Reports in VB .NET 2010
Creating Reports in VB .NET 2010
Creating Reports in VB .NET 2010
 
Creating Reports in VB .NET 2010
Creating Reports in VB .NET 2010
 
-->