How to add stored procedure to crystal report?

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?
 
H

Hans Baumann

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()
 
H

Hans Baumann

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top