473,378 Members | 1,403 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,378 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 1664

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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.