Sub Report Queries

Sub Report Queries

Forum member · Mar 7, 2007
I have a report (Report1) with a SubReport (SubReport1) that contains another SubReport (SubReport1a). I need the second subreport (SubReport1a) to be populated from a query that takes a value fom the record in the main report (Report1). I'm grouping the second sub report (SubReport1a) by the field in the main report. When I run the report now, nothing is returned, just a blank page. Am I missing something?

Re: Sub Report Queries

Support · Mar 8, 2007
Hello, You can definitely use a record from query of the main report (Report1) and use it as part of the query for the SubReport1a without any problem. Columns from previous queries can be referenced by surrounding the column name with the pound sign (#) in the SubReport1a query. The SubReport1a would have a query as follows: SELECT * FROM Orders WHERE CustomerID = '#CustomerID#' If you are using the correct syntax and still getting the blank page, try adding Visible = false; after the DrawPdfToWeb() method if you are running the report from a web application. Also please let us know what version of .NET Framework do you have installed and also the version of Acrobat Reader you are using? Also are you able to run the examples included with the product download? Thanks, ceTe Software Support Team

Re: Sub Report Queries

Forum member · Mar 8, 2007
My problem was how I was referenceing the field. I was using #[Field1]# instead of #Field1#. Thanks!