US and Worldwide: +1 (866) 660-7555
+ Reply to Thread
Results 1 to 6 of 6

Thread: Sub-Report - Parameter - Help!

  1. #1

    Question Sub-Report - Parameter - Help!

    Hello.

    I'm able to create a MasterReport with a SubReport, and Import a basic Parameter from the MasterReport to a SubReport. All works as described in docs and forum searches.

    I have not been able to figure out, or find any info on how to use Parameters and SubReports correctly for the following example:

    MasterReport -Details
    - List of Customers that have Outstanding Invoices (CustomerID, FirstName, LastName)
    - SubReport (Banded, in details section of MasterReport)

    SubReport - Details
    - List of Invoices for that Customer Row in MasterReport(InvID, Amount, Date)

    What I cannot figure out is how to define the Parameter correctly in the MasterReport so that the SubReport gets Passed the CustomerID for that ROW in the MasterReport. If I have 20 rows/customers in the MasterReport, I'll need 20 subreports generating data for each individual Customer from the MasterReport.

    Any help or direction in this matter would be greatly appreciated.

  2. #2
    Join Date
    Mar 2009
    Posts
    131

    Default

    What version are you using. It is different between 3.0 and 3.5+

  3. #3

    Default

    Quote Originally Posted by haubuchon View Post
    What version are you using. It is different between 3.0 and 3.5+
    Version 3.5

    Still need help on this, so any input is appreciated.

  4. #4
    Join Date
    Mar 2008
    Posts
    181

    Default

    Mh, I don't really see the problem. You pretty much describe it as it is supposed to work.

    You have the CustomerID in the result set of your master query. If you put the subreport in your details band it willl be repeated for each row in your details (20 times).

    In your subreport you just import your key and use it in your subreport's query.

    I attached an example that works with the sample db

    Edit: Just an idea... at least with some jdbc drivers it seems like all rownames are retrieved in uppercases.
    Even if you write

    select *.CUSTOMER_ID as CustomerID in your query, the field is called CUSTOMERID in Report-Designer. Try writing the fieldname
    in uppercase letters in the subreport's import-paramters... just a guess
    Attached Files
    Last edited by mgie; 02-09-2010 at 07:00 PM.

  5. #5

    Default

    Quote Originally Posted by mgie View Post
    Mh, I don't really see the problem. You pretty much describe it as it is supposed to work.
    Hey Mgie

    Yes, I described how it should work, but it wasn't working for me

    Thanks for your input and example. I'll give it a try once I get back to that report. Hopefully I was just typing in something wrong.....

  6. #6

    Default

    hi,

    I am also working on a report with a subreport. Subreport takes main report's output as a parameter. The .prpt file works fine but I also need the .xaction file but I dont know how to do it in Design Studio.
    I have created a result-set output from main report ans pass that output name as {PREPAREutputName} to subreport but does not work, it says :

    The requested parameter "outputName" has a NULL value

    I am really stucked with this over a week..please HELP!

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts