i'm using a stored procedure to display the data on crystal report but since the SP is in a string
@sql='SELECT * FROM '+@tableName+'
i dont get the columns in the database fields under field explorer.
does anyone know a way around this?
In a web application...
i am really new to crystal reports so i might be missing out on something..so please let me know where i'm going wrong.
what i need is to build a dynamic query and display the details using crystal reports.
So what i did is created my sp 'SP_EXAMPLE1' in my database
@sql='SELECT * FROM '+@tableName+'
exec(@sql)
then in crystal under database expect i added my stored procedure.
option 2
i also tried to do it programmically
so i create a dataset DS with the data
then
mReportDocument.Load(Server.MapPath("Reports/testing.rpt"));
myReportDocument.SetDataSource(DS);
CrystalReportViewer.ReportSource = myReportDocument;
CrystalReportViewer.DataBind();
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.