Results 1 to 7 of 7

Thread: Sub-reports with a crystal report

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2004
    Location
    Australia
    Posts
    30

    Sub-reports with a crystal report

    I have successfully produced two crystal reports from separate datasets linked to Access databases using the approach spelt out by Nucleus (in thread 'Setting the path for a crystal report').

    I now want to merge the two reports but have not been able to get one of them to appear as a sub-report in the header of the other. The sub-report chapter of www.crystalreportsbook.com does not give me enough detail.

    Can anyone help?

  2. #2
    New Member
    Join Date
    Feb 2004
    Posts
    3
    Hi,
    as you mentioned you have 2 reports,
    1st Report having Name (Company Name),
    2nd Report having data,
    and you want to set 1 st report having name to all report,
    right ?,
    in this case you have to add it as sub report in every report,
    Rakesh

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2004
    Location
    Australia
    Posts
    30
    Rakesh, both of my two reports created from databases contain data and I want to merge the two together so that they print out on the same page.

    I expected to be able to achieve this by making one a sub-report of the other but have not been able to do it.

  4. #4
    New Member
    Join Date
    Feb 2004
    Posts
    3
    ok,
    In this case, 1st add your subreport in main report,
    when you will put subreport in mainreport, you will see name of the subreport on mainreport,
    now right click on sub report & there is option called create link,
    and then one form will display , there you can set the link of sub report with main report,

    Ok tell me your sub report content company name or other data,
    if your subreport content company name then you don't have to set link between then,

    if your subreport content data, which is related to mainreport, then you have to create link between them,

    & make sure that both reports showing data properly before merging it,

    and
    Tell me it's showing any error or not showing data ?

  5. #5
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530
    Hi RakeshMCM

    I have had a chat with NetNovice and it looks like the subreport isn't linked, and it doesn't show data. NN wants to bind the subreport to a dataset at runtime but doesn't know how.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Jan 2004
    Location
    Australia
    Posts
    30
    Thanks for replying, Rakesh and Nucleus.

    Yes, the sub-report seems to be linked OK to the main crystal report. When I right click the sub-report in the header of the main report, for example, if I then click on edit, the structure of the sub-report comes up for editing.

    But when I run the associated program, the sub-report is not shown on the main report.

    In the code, after I have specified each of two datasets as a crystal report I designate the report source for the crystal viewer as the main crystal report. Perhaps this is where the problem lies?

  7. #7
    New Member
    Join Date
    Feb 2004
    Posts
    3
    Ok,
    it seems your Sub Report is not geeting data properly,
    check it's datasource, server name properties properly set.

    before merging report find out data is displaying properly or not,

    OR

    create new report,
    put 1 label say company name & put that report as sub report on
    top of main report,
    and tell me what happens,
    mail me on [email protected],
    give me your mail id,
    Rakesh

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