Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Fat kids are harder to kidnap
Posted

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

Fat kids are harder to kidnap
Posted

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);
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...