iebidan Posted February 18, 2004 Posted February 18, 2004 OK, now I've come with this 1. I've a Crystal report file (rpt) this file includes the DB connection and the query used to get the information from the DB 2. I've a webpage where I show the rpt file, this works fine. My problem is, now I need to pass some parameters to make the query bring me only the data I need, how can I do this???? what I need to modify in the rpt to make it accept this parameters???? Thanks for your help Quote Fat kids are harder to kidnap
iebidan Posted February 19, 2004 Author Posted February 19, 2004 well I found how to send the parameters, this is how you do it Report.SetParameterValue("PARAMETERNAME","PARAMETERVALUE"); but now I get this error CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed. Does anyone knows how to send the logoninfo to the report???? Regards Quote Fat kids are harder to kidnap
pendragon Posted February 19, 2004 Posted February 19, 2004 This is what I have to do to connect to an Access database with database level password ReportDocument crReportDocument = new ReportDocument(); ConnectionInfo crConnectionInfo = new ConnectionInfo(); TableLogOnInfo crtableLogoninfo = new TableLogOnInfo(); Tables CrTables; crReportDocument = new ReportFile(); crConnectionInfo.DatabaseName = "DataBase Path and Name"; crConnectionInfo.Password = "DataBase Password"; CrTables = crReportDocument.Database.Tables; foreach (Table CrTable in CrTables) { crtableLogoninfo.ConnectionInfo = crConnectionInfo; CrTable.ApplyLogOnInfo(crtableLogoninfo); } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.