Recent

Author Topic: Linking LazReport to a DataSet in RunTime  (Read 4749 times)

jluix

  • New Member
  • *
  • Posts: 19
Linking LazReport to a DataSet in RunTime
« on: November 24, 2007, 04:37:08 pm »
Hi!. I'm triyng to link a DS Dataset to a tfrDBDataset object to make a report with lazreport. In design time it's very easy but, when I try it in runtime with these sentences:

  DSInforme:=tFRDBDataSet.Create(Self);
  DSInforme.DataSet:=DS;
  Informe:=tFRReport.Create(Self);
  Informe.Dataset:=DSInforme;
  Informe.LoadFromFile('InformeReuniones.lrf');
  Informe.DesignReport;

 The report designer doesn't find any dataset (menu Tools->Tools->Insert DB fields), so I can't add any fields to the report. I'm sure the DS component contains data because I've linket it to a DBGrid to.

So. What am I doing wrong?  :?:

jesusr

  • Sr. Member
  • ****
  • Posts: 470
RE: Linking LazReport to a DataSet in RunTime
« Reply #1 on: November 29, 2007, 08:27:29 am »
I copied & pasted your lines of code in my sample project and here it works fine.

What Lazarus revision?, what type of dataset?. Even better, Please create a bug report and attach a sample project so I can try to reproduce the problem.

 

TinyPortal © 2005-2018