Home All Groups Group Topic Archive Search About

How to add stored procedure to crystal report?

Author
1 Feb 2006 7:57 AM
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?

Author
1 Feb 2006 3:13 PM
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()


Show quote
"ABC" <a**@abc.com> escribió en el mensaje
news:ehyvuUwJGHA.3164@TK2MSFTNGP11.phx.gbl...
>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?
>
Author
1 Feb 2006 4:37 PM
Hans Baumann
Excuse me! I forgot that *ds* is a dataset object with the data retrieved
from the database!...

Show quote
"Hans Baumann" <hbauma***@hotmail.com> escribió en el mensaje
news:ug8z%23I0JGHA.2036@TK2MSFTNGP14.phx.gbl...
>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" <a**@abc.com> escribió en el mensaje
> news:ehyvuUwJGHA.3164@TK2MSFTNGP11.phx.gbl...
>>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?
>>
>
>

AddThis Social Bookmark Button