473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

problem with report

hi all,

i'm using the "insertion model" of ADO.NET to see my reports. this model is
the desconnected model of NET. i have to create a dataset object (visual
dataset schema), base my report on it and after: a form with a
crystalreportviewer, configure its property "reportSource"

this method requires code which fills the dataset of our SQL's data and pass
it to our report with the "setdatasource" method.

i haven't any problem with one table but when i try it with several tables,
it's imposible

have you got any idea?
thanks a lot for your interest
here is my code:
Private fbase As New fInformeBase()

Private rpt As CrystalReport1 = New CrystalReport1()

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Dim conexion As New OleDb.OleDbConnection(gCadenaConexion)

Dim sql As String = "SELECT AtributoPublicoObjetivo.* FROM PublicoObjetivo
INNER JOIN AtributoPublicoObjetivo ON PublicoObjetivo.IDPublicoObjetivo =
AtributoPublicoObjetivo.IDPublicoObjetivo WHERE (PublicoObjetivo.IDPlan)=" &
gIdPlan

Dim adapter As New OleDb.OleDbDataAdapter(sql, conexion)

Dim dataset As New DataSet()

adapter.Fill(dataset, "AtributoPublicoObjetivo")

rpt.SetDataSource(dataset)

fbase.CrystalReportViewer1.ReportSource = rpt

fbase.CrystalReportViewer1.Zoom(75)

fbase.StartPosition = FormStartPosition.Manual

fbase.Location = New Point(0, 0)

fbase.MdiParent = fPrincipal

fbase.Show()

end sub

Jul 21 '05 #1
1 1669

To work with more than one table always get the output of
the required conditions into a dataset from the first
priority table. later using these values as input to a
query get the output in datareader and use this as
datasource.

-----Original Message-----
hi all,

i'm using the "insertion model" of ADO.NET to see my reports. this model isthe desconnected model of NET. i have to create a dataset object (visualdataset schema), base my report on it and after: a form with acrystalreportviewer, configure its property "reportSource"

this method requires code which fills the dataset of our SQL's data and passit to our report with the "setdatasource" method.

i haven't any problem with one table but when i try it with several tables,it's imposible

have you got any idea?
thanks a lot for your interest
here is my code:
Private fbase As New fInformeBase()

Private rpt As CrystalReport1 = New CrystalReport1()

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click

Dim conexion As New OleDb.OleDbConnection(gCadenaConexion)

Dim sql As String = "SELECT AtributoPublicoObjetivo.* FROM PublicoObjetivoINNER JOIN AtributoPublicoObjetivo ON PublicoObjetivo.IDPublicoObjetivo =AtributoPublicoObjetivo.IDPublicoObjetivo WHERE (PublicoObjetivo.IDPlan)=" &gIdPlan

Dim adapter As New OleDb.OleDbDataAdapter(sql, conexion)

Dim dataset As New DataSet()

adapter.Fill(dataset, "AtributoPublicoObjetivo")

rpt.SetDataSource(dataset)

fbase.CrystalReportViewer1.ReportSource = rpt

fbase.CrystalReportViewer1.Zoom(75)

fbase.StartPosition = FormStartPosition.Manual

fbase.Location = New Point(0, 0)

fbase.MdiParent = fPrincipal

fbase.Show()

end sub

.

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Spacy | last post by:
Am creating a HTML Report in asp.net. To save this report to excel on client-side, i write this code: Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("content-disposition",...
3
by: ChrisWinterscheid | last post by:
We are running DB2 8.1 on AIX 5.2. DB2level shows: DB21085I Instance "db2inst1" uses "32" bits and DB2 code release "SQL08016" with level identifier "02070106". Informational tokens are "DB2...
0
by: CSDunn | last post by:
Hello, I have a problem with field filtering between an Access 2000 Project form (the application is called CELDT), and the report that shows the results of the filter. Both the form and the...
4
by: Trevor Best | last post by:
I have a report that's fairly simple, page headers and footers, detail has a subreport in (can vary in length). The customer wanted a signature block for them, their client and 3rd party. This was...
0
by: Shamin | last post by:
Hi, Thanks in advance for answering to my Question. I'm stuck with this problem and would really appreciate any help. I have 2 aspx files (Main.aspx and ReportViewer.aspx). Main.aspx has a...
12
by: Brad Baker | last post by:
I am trying to write a simple ASP.net/C# page which allows users to select some values and produce a report based on a SQL query. I have a self posting dropdown form which allows users to select...
0
by: Aryan | last post by:
Hi, I am doing "Export to Excel" functionality, but while doing this I am getting error. Like I have two types of Report, each type has many sub reports inside. So I am opening new window for Each...
0
by: Aryan | last post by:
Hi, I am doing "Export to Excel" functionality, but while doing this I am getting error. Like I have two types of Report, each type has many sub reports inside. So I am opening new window for Each...
0
by: Aryan | last post by:
Hi, I am doing "Export to Excel" functionality, but while doing this I am getting error. Like I have two types of Report, each type has many sub reports inside. So I am opening new window for Each...
8
by: sara | last post by:
I have a report that runs fine with data. If there is no data, I have its NO Data event sending a MsgBox and cancelling the report. Then it seems I still get the 2501 message on the Open Report...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.