passing dataset to crystal report

Reply Fri 24 Dec, 2010 12:05 am
i have used a dataset ctrl (Mydataset.xsd) for a CrystalReport
and have passed procedure to it rather than a query..
now it works properly with one procedure only, but i need to pass 6 different procedures for displaying details on report.....and that does not works!!!!
folling is the code that is working ...


Dim conn As SqlConnection
Dim da As New SqlDataAdapter()
Dim cmd As New SqlCommand()
Dim myDs As New Mydataset
Dim cmd As New SqlCommand()
Dim rpt As New MyReport() 'The report you created.

conn = New SqlConnection("server = servername2;database =db;uid = abc;pwd=abc")

Dim param0(0 To 0) As SqlParameter
param0(0) = New SqlParameter("@Factuur_ID", SqlDbType.Int)
param0(0).Value =1234
With cmd
.Connection = conn
.CommandType = CommandType.StoredProcedure
.CommandText = "up_parmsel_rapport"
End With
If Not (param0 Is Nothing) Then
For Each sqlParm0 As SqlParameter In param0
End If
da.SelectCommand = cmd

da.Fill(myDs, "up_parmsel_rapport")
rpt.Load("Report full address/Path")
CrystalReportViewer1.ReportSource = rpt

End Sub

now what shall i do to call another procedure
.................plz Help in stuck here...

  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 2,573 • Replies: 1
No top replies

Reply Fri 24 Dec, 2010 08:11 am
I'm not sure (and you really should be checking at a SQL or Crystal Reports forums site), but I think the is nothing part is incorrect -- you might want something more like is null. This is a guess; I haven't worked on this stuff in a while.
0 Replies

Related Topics

Type 2 Nested Queries - Question by nzarar 17
OMR SCAN - Question by Pratik Upadhyay
MS SQL SERVER 2008 R2 SQL Agent - Question by njjimbo
databases - Question by angelrocksvid
PostGresql - Question by angelrocksvid
sql update statement - Discussion by hoachen
  1. Forums
  2. » passing dataset to crystal report
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.05 seconds on 04/14/2024 at 04:25:41