CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    Join Date
    May 2003
    Location
    Islamabad, Pakistan
    Posts
    284

    Re: Print only the subreport but not the main

    This is the structure of your Main report.



    RH [Set to show the Header & Footer]
    PHa [Show/Hide Header]
    PHb
    GHA
    GHB
    DetailsA
    DetailsB
    DetailsC
    GFA [Set Don't Show Header/Footer][Show Next Section on new Page]
    GFB (Contains SubReport) [SubReport Shown with out Header & Footer][In Subreports Footer set the Sub Report has been completed and reset the Header Variable to show the header and footer][Also if the footer is not properly shown then you have to reset it in the footer after hiding/showing the footer]
    PFA
    PFB [Show/Hide Footer]
    PFC

    In this report you have to play with the time and records. First you have to dive in the report and think when to show and hide then accordingly adjust the variables to behave the report accordingly.

    If you are unable to do then please attach the report with saved data.
    If this post is helpful, then, Rate this Post.

  2. #17
    Join Date
    Feb 2011
    Posts
    57

    Re: Print only the subreport but not the main

    Ok, This seems to be elusive. I put the Page header into a group header. Checked Repeat Group on each page for Group header. Now, I still am trying to suppress the group header in the main when the sub report prints. Does this make it easier?

    I have tried the Show-header trick and it is not working.


    mmmmm....Confused.

  3. #18
    Join Date
    Jul 2005
    Posts
    1,083

    Re: Print only the subreport but not the main

    Is this report (and subreport) called from an application?
    Do you have access to the source code, may you modify it?
    Normally I resolve almost all the application design inside code an let to Crystal Reports only that, pure and simple reports...
    Just an alternative...
    May You consider resolve this problem from code side and not in report side...

    JG

  4. #19
    Join Date
    Feb 2011
    Posts
    57

    Re: Print only the subreport but not the main

    The report is called from an application (Mas 500). I don't have access to the code.

    I have the report working with moving Report headers to page headers then I can get it to perform write on a single instance of retrieving a PO. But the situation is messed up when it tries to print for multiple po's.

    The formula : if NextIsNull({tpoPrintPOHdrWrk.POKey}) or ({tpoPrintPOHdrWrk.POKey} <> Next({tpoPrintPOHdrWrk.POKey})) then True else false ;

    seems to cause issues with Multiple PO's. Is there a better formula to enact for suppressing the headers on switching between po's.


    I welcome any comments.
    Last edited by PNorm; April 22nd, 2011 at 08:34 AM.

  5. #20
    Join Date
    Feb 2011
    Posts
    57

    Re: Print only the subreport but not the main

    Got this figured out.

    The keys were to keep track of the lastpage and lastline. I will post a more complete explaination later.

    Thank you for everyone's help.

  6. #21
    Join Date
    May 2011
    Posts
    1

    Re: Print only the subreport but not the main

    PNorm,

    Do you have time to post your solution for this? I have a similar situation and your solution would really help. Thanks in advance!

Page 2 of 2 FirstFirst 12

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