How to add stored procedure to crystal report?

  • Thread starter Thread starter ABC
  • Start date Start date
A

ABC

I use visual studio 2003, with VS2003, I add new item (crystal report) to
project. Under, report designer, I connected local sql server 2000 (MSDE),
in the database fields folder, only have tables and views, where is the
stored procedures? I must use SP to generate reports, how to add SP to
reports?
 
I resolved that binding the datasource at runtime...

for example:

reporte.Load(Server.MapPath("myreport.rpt"))
reporte.SetDataSource(ds)

st =
reporte.ExportToStream(CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat)
Dim buf(st.Length) As Byte

st.Read(buf, 0, st.Length)
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.BinaryWrite(buf)
Response.End()
 
Excuse me! I forgot that *ds* is a dataset object with the data retrieved
from the database!...

Hans Baumann said:
I resolved that binding the datasource at runtime...

for example:

reporte.Load(Server.MapPath("myreport.rpt"))
reporte.SetDataSource(ds)

st =
reporte.ExportToStream(CrystalDecisions.[Shared].ExportFormatType.PortableDocFormat)
Dim buf(st.Length) As Byte

st.Read(buf, 0, st.Length)
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.BinaryWrite(buf)
Response.End()


ABC said:
I use visual studio 2003, with VS2003, I add new item (crystal report) to
project. Under, report designer, I connected local sql server 2000
(MSDE), in the database fields folder, only have tables and views, where
is the stored procedures? I must use SP to generate reports, how to add
SP to reports?
 
Back
Top