Hi people! this is my first post! I am starting with crystal reports and I find it perfect! I have a report that show purchases lines but under every purchase line there are one or many articles (I've make a subreport). The problem is that I don't see the subreport, is blank! and I think that I am passing correctly the parameter and setting the datasets correctly, here is my code:
DataSet ds = BBDDadapter.executeWithResult("SELECT a.id, c.nombre,c.apellidos,t.nombre,a.data,a.importe,a.forma_pago FROM albaran a LEFT JOIN trabajadores t ON t.id=a.trabajador_id LEFT JOIN clientes c ON c.id=a.cliente_id");
ReportAlbaranes rp = new ReportAlbaranes();
rp.SetDataSource(ds.Tables[0]);
DataSet ds1 = BBDDadapter.executeWithResult("SELECT * FROM albaran_item");
rp.Subreports[0].SetDataSource(ds1.Tables[0]);
crystalReportViewer1.ReportSource = rp;
Is there something strange? the sql's are all ok (I've checked them). My subreport link I think is ok, here is an screenshot:
http://img844.imageshack.us/img844/6448/pant.pngA last thing, I've inserted the parameter ?Pm-albaran.id in the subreport and seems ok when showing the report so the parameter I think is passing ok.
http://img826.imageshack.us/img826/4899/pant2.pngWell, tell me something please, thanks a lot! :)
George
p.d: I don't know why the parameter , the PK, is showing with 2 decimals in the main report and in the subreport (well, in the main report I've changed the format as you can see), the PK is of "Type:Number"
Edited by jviure - 27 Aug 2010 at 11:58pm