0

hi..

im using VS 2008 to build my app. i need to generate a report for a specific user. i have a SQl database which contains all my tables & Stored Proc's.. i have created a proc to retrieve data for tht specific user & used the same to bind to the reports. now when i click my generate report button, a prompt appears askin the value for the parameter (the usr id param used in stored proc)...i just wanted to know how i can pass this user id through code so that the prompt will not appear whenever i click the button?

Please let me know if any1 knows the solution..its bit urgent..

Thanks in advance..

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by jbisono
0

i bet you dont need to include all this reference but i need it because i made like a report builder anyway. maybe this can help you. oh this is c# but you should be able to translate that to vb.net

using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using CrystalDecisions.ReportSource;
using CrystalDecisions.Web;

// now under your method

ReportDocument rpt = new ReportDocument();
rpt.Load(Server.MapPath("~/reports/reportname.rpt"));
rpt.SetDatabaseLogon("user", "pass");
rpt.SetParameterValue("ParamName", "ParamValue");
CrystalReportViewer1.ReportSource = rpt;

here is a converter tool

Good luck

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.