Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplication when page header and the detail section appear together. 1

Status
Not open for further replies.

crystalreport85

Programmer
Sep 27, 2010
51
CA
I trying to display a memofield in the detail section whenever the item id changes. At the same time my customer want to display it in the page beginning, so I have placed the memo field in the page header. The problem is when the detail section memo field print at the page beginning ,it become repeated like
Page header: "This is the memo field
Detail section: "This is the memo field
there are two same field .(it is like repeating.)How to suppress one when the two section comes next to next

Thank you
 
Is the memofield the same for all detail records per Item ID? If not, then placing the field in the page header will just be picking up whatever memofield appears in the first record of the page--probably not what is intended.

Please show some sample data that clarifies how the memofield displays on the detail section within the itemID. Show this for a couple of itemIDs. Also show the page header result (identify the report sections clearly). If you are using any suppression formulas on the field, please show the content (show the sample without the suppression in place, please).

-LB
 
This is the description sec
Pageheader1:
itemid size descp
---- ---- ---
pageheader2:
This is the description //I supresse this byNotOnFirstrec
detail section:-a
This is the description
detail section:-b
f123 21" 23sqft-blue
f123 31" 34sqft-green
detail section-a
This is the description
detail section-b
g123 32" 2sqft-red
g123 31 44sqft-red
This is the description sec
So every time the itemid changes the memo field get displayed

detail section-b is logic --is suppressed under these condition:
Shared StringVar sPrintDescFlag ;
Shared StringVar sItemId := Trim({Itm_Mstr.Description});
Shared StringVar sOldItemId1 ;
whileprintingrecords;
sPrintDescFlag :="p";
If {@FPrintPoCutSheetFlag} = "Y" and {@FVendType} = "GLSS" Then
(
If {@FSerialNo} = 1234 Then
False
Else If sOldItemId1 = sItemId Then
True
Else
(
sOldItemId1 := sItemId ;
False
)
)
Else
True

Hope this helps to help me
thanks
 
I think you meant to say that that was the suppression formula for detail_a, not detail_b. If that is working for you, why not just format the higher order detail section (above detail_a) to "keep together"? Then detail_a will always appear prior to detail_b at the beginning of a page.

-LB
 
Thank you so much for your reply.I think my question is not clear.
I will make it simple .
I am displaying itemid,price.. and group by itemid.
I am placing the description of the item in the group header (of itemid)
the problem comes when i want to place the description in the page header also. Because in some pages, data is getting repeated when the groupheader comes at the beginning of the page .
how to solve this? will shared variable work? and is there any possibility in CR to know which section comes next.
Thank you again
 
There is a way to do this, but I am further confused as your earlier example showed the description in detail_a--with no group header.

If you want the group header description to appear on each page, you could simply format the group header to repeat on each page--and don't put the text in the page header at all.

Anyway, if there is a reason you can't do this, and assuming that you want the page header to be suppressed whenever the group header is at the top of the page, you can create these formulas and place them as indicated:

//{@true} to be placed in the group header section and suppressed:
whileprintingrecords;
booleanvar flag := true;

//{@false} to be placed in the report header section and the detail section and suppressed:
whileprintingrecords;
booleanvar flag := false;

Then go into the section expert->page header->suppress->x+2 and enter:

whileprintingrecords;
booleanvar flag;
flag = true;//note no colon

Whenever the group header comes first on a page, the page header should be suppressed.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top