|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to add stored procedure to crystal report?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() 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? > 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? >> > > |
|||||||||||||||||||||||