|
-
March 29th, 2011, 12:15 PM
#1
Print only the subreport but not the main
Hello,
I have a PO form that prints items and PO information. At the end of the report I have a subreport attached that prints bar-code information. But within the main report. So, I get the main header and the po barcode information. How do I turn off the main report so that only the barcode information prints at the end of the main report. Not the main PO header and stuff.
The subreport is located in the Report footer which is fine. This gives me the barcodes after the main po form is done printing.
I can't suppress a section based on page number because the will affect the main as the PO information can expand several pages.
Any information would be greatly appreciated.
Thank you,
Patrick.
PS. I found this code below but it messes up the page number which then messes up the display: (This gets me close.)
Right-click on the Footer Section, choose Format Section. click the button beside the Suppress (No Drill-Down) under Common Tab and place this code...
if pagenumber=TotalPageCount then true
else false
From:
http://www.dbforums.com/crystal-repo...last-page.html
It is almost like when the report footer runs I need to turn off printing the Header, details.
Last edited by PNorm; March 29th, 2011 at 01:34 PM.
-
March 29th, 2011, 02:55 PM
#2
Re: Print only the subreport but not the main
I almost have it. I put in
OnLastRecord in the suppression formula and when the page is Subreport it works Except for the page footer does not print on the last page that the last record is. Or when the last record appears on only the page, then none of the heading print. I need the last record to generate all headers and page footer but then the subreport on the report footer should clear out the page headers and pagefooters.
-
March 29th, 2011, 04:30 PM
#3
Re: Print only the subreport but not the main
Is there a way to reference in a formula the total page count of the report. I think I have a solution worked out but need to know the the total page count.
I am thinking of adding +1 to every page. Then when the main report passes to the subreport the number of the total page count will change to the next increment value. This will alway be lower than the running total on the variable I have accumulating. So then I can suppress based on var1 > total page count.
Let me know what you think.
-
March 29th, 2011, 07:05 PM
#4
Re: Print only the subreport but not the main
Use 'Shared variables' to pass values between main report and subreports
JG
-
March 30th, 2011, 08:20 AM
#5
Re: Print only the subreport but not the main
Thank you for the information. I am not sure if I understand. I am only wanting to reference the total page count from when the document is rendered.
Or if there is a better way to suppress printing the header and details when the subreport prints. Right now I get the subreport contained with in the main header and details after all the main is printed.
Thank you,
PN.
-
April 6th, 2011, 11:32 AM
#6
Re: Print only the subreport but not the main
Can you make a container to pass a whole line of information to the main that consists of several fields?
-
April 6th, 2011, 10:59 PM
#7
Re: Print only the subreport but not the main
As I understand your requirements, you want to print the bar code at the last page below the records or on the next page after all the records are shown.
If you want to print on the next page after showing all the records then you can use the shared variable to set that all the records have been shown in the footer of the sub report which shows all the record and then set to show your bar code sub report on the next page and in the page header check all the records have been shown or not ?
You can get the total number of pages using the build in formulas page count or page one to ..... This will slow your report but there is a formula which you can use.
Good luck.
If this post is helpful, then, Rate this Post. 
-
April 7th, 2011, 08:49 AM
#8
Re: Print only the subreport but not the main
Interesting....
What we want to do is:
I have a current existing report that shows all purchase order information that was ordered. Then I have created a separate report that pulls the po information and creates barcode information for scanning in receiving. It is the same po information and a simple header.
The way it is now:
The PO information prints then the PO barcodes print with the main header information.
What we want is:
Main report prints. Then the PO barcodes after with no headers.
I guess I am not understanding clearly what formula goes where. What formula should I put in the header and footer to suppress the headers from the main when the sub report prints?
Thank you.
Last edited by PNorm; April 7th, 2011 at 10:22 AM.
-
April 7th, 2011, 10:11 PM
#9
Re: Print only the subreport but not the main
In the main reports reports header section initialize a variable.
booleanvar show_header := true;
now on each page header put in the suppress section formula
not booleanvar show_header;
first time you set to show the header and on each page the header will be shown.
Now go to your subreport which shows all the records. In its footer change the variable value
booleanvar show_header := false;
Now your header on next page will not be shown.
Just check the sequence between the reports and the variable.
if still having issue then send me the report with the saved data.
If this post is helpful, then, Rate this Post. 
-
April 8th, 2011, 11:25 AM
#10
Re: Print only the subreport but not the main
Thanks. I will try it and get back to you.
-
April 8th, 2011, 01:12 PM
#11
Re: Print only the subreport but not the main
That works pretty well. Thank you.
I do have a couple of situations:
Page footer is printing on subreport.
Also the appearance of a blank page between Main and sub.
Any advice would be greatly appreciated.
-
April 8th, 2011, 03:08 PM
#12
Re: Print only the subreport but not the main
Got the blank page fixed.
-
April 12th, 2011, 09:32 AM
#13
Re: Print only the subreport but not the main
Ok, I fixed the page issues. But the last page footer is disappearing on the main report. I had to put Show_header:=False in the Report_footer A before my subreport is printed.
This is the last issue.
-
April 13th, 2011, 12:26 AM
#14
Re: Print only the subreport but not the main
I am not clear about this issue. If you don't want to print the footer with the subreport which you only want to print then do as you did with the header.
If the scenario is other than this then pleas explain it in details.
If this post is helpful, then, Rate this Post. 
-
April 18th, 2011, 04:01 PM
#15
Re: Print only the subreport but not the main
Ok, Change in situation:
RH
PHa
PHb
GHA
GHB
DetailsA
DetailsB
DetailsC
GFA
GFB (Contains SubReport)
PFA
PFB
PFC
The subreport was changed to the Group Footer B to allow for easier page printing and the sub will now print after the Main prints for 1 po and after each po main report. However this broke the suppression of the headers that I had set up.
Is there an easier way to suppress Headers from the main based on when the Group Footer prints. Or is there a better way to set up a Main and sub report relationship?
Any advice is appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|