CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2003
    Location
    I'm Here!
    Posts
    31

    Crystal Reports - SubReport

    Can you pass a variable from a SubReport back to a main report?

    I have a report with tables with one to many relationship. Header table with many detail records. The subreport is currently calculating an amount on the many to one detail table and I would like to pass that figure back to the main report for further use.

    Any help will be appreciated.

    Thanks

  2. #2
    Join Date
    Aug 2003
    Location
    Buenos Aires, Argentina
    Posts
    513
    It might be more comfortable using a formula

  3. #3
    Join Date
    Jul 2003
    Location
    I'm Here!
    Posts
    31
    Oops, I meant formula field instead of variable.

    The problem is that my main report does not have access to the subreport's formulas that I can see nor vice versa.

  4. #4
    Join Date
    Aug 2003
    Location
    Buenos Aires, Argentina
    Posts
    513
    Do you have to use a subreport?

  5. #5
    Join Date
    Jul 2003
    Location
    I'm Here!
    Posts
    31
    Unfortunately, yes.

    The main report gathers info. from different tables, the subreport gathers the many to one counts and dollar values that I need to then use in my calculation for subtracting from the main reports findings.

    Any ideas of other ways to handle this scenerio are welcomed.

  6. #6
    Join Date
    Aug 2003
    Location
    Buenos Aires, Argentina
    Posts
    513
    You can have a Query or temporal table in your database that calculates the values and then get that values from the query or table to your report. That makes it easier, I think.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured