473,513 Members | 2,391 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Nov 20 '05 #1
1 823
This one sounds like a bug. Essentailly, you've created an object and once
that object has been created, its running under a specific user account.
Since that account is now different than the I_WAM or I_USER account, when
you go to create the next table and attempt to cross boundries, you get an
error.

"Henri" <er*********@eresmas.net> wrote in message
news:e$**************@TK2MSFTNGP11.phx.gbl...
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

Nov 20 '05 #2

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

Similar topics

3
3831
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
6284
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
6454
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
2793
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
267
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
1673
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
1159
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
1182
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
1220
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
2441
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
7265
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
7171
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7388
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7539
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
5692
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,...
1
5095
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...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3228
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.