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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Start page of section 1

Status
Not open for further replies.

CrystalProgDev

Programmer
Oct 1, 2010
69
US
I have a report with 4 detail sections (Da,Db,Dc and Dd).
I wanted to know the stating page number of the detail sections (Stating page Number of Db,Dc,Dd). Is it possible in Crystal? Please let me know.

 
You will need to create 4 formula holding numbervar type variables, which can capture page number when eaxch section starts printing.

Ian
 
I tried that.. It will give you just the page number. I need to now the starting page of next detail section.

I tried having 4 different subreports for each details section. Is there any way I can get the total page count of sub report. I tried with global and shared variables. but it is not working for the page count.

If any one of the options works for my problem. Please let me know if anybody know the solution.
 
This is very unclear. Why don't you spend some time being a little more specific about what you are trying to do and about your report layout.

-LB
 
I have a report with 4 detail sections. each section has Title and description fileds. I need to have 'Continued' text to be displayed on the pages if the data is in morethan 1 page.

Example: Da has 3 pages of decription data and Fist page the title will be Title1 . on 2nd and 3rd pages title1 has to be 'Title1 Continued' and Db will start on 4th page with Title2 and so on ..... and same with all the 4 sections.
 
I don't see any reference to the subreports here. How are the detail sections formatted? Do you have new page before or after set? Why exactly are you using three detail sections? Could you be using group sections instead? If you could, you could make use of the 'inrepeatedgroupheader' function.

-LB
 
Ok let me explain clearly. I came up with 4 details sections beacuse the data is coming from different filelds (Title1, Title2, Title3, Title4). here is the lay out
------------------------
Da Title1 Description1
------------------------
Db Title2 Description2
-----------------------
Dc Title3 Description3
------------------------
Dd Title4 Description4
------------------------

Description1 to 4 fileds are too long and has minimum of 3 pages data. I need to have Title1 Continued.. if the description1 is in morethan 1 page. same with the remaining Titles.
each detail section will have 1 row of data.

I tried using the grouping option. working for only one group.

And also
I tired using 4 sub reports, and trying to get the page number from sub report, so that I can have 4 different page headers for these 4 titles and supress respective page headers based on subreport's page number. but I am not able to get the page number from from the subreport.

Any advice will be appreciated.

Thanks
 
I think you could place a formula that references the Title field in the page header, and format the page header to "underlay following sections". Then also format each detail section "reset page number after". For the Title field, use this formula:

{table.title}+
(
if pagenumber > 1 then
" (Continued)"
)

-LB
 
It will work if the all the 4 titles are coming from 1 filed.

I have PHa, PHb, PHc and PHd with the above mentioned formulae. and reset the page number after each detail section. choose underlay option for the page header. it is not working. PHa with title 1 continued is diplaying even after the Detail section a. same thing with all other detail sections.


 
Isn't the title an actual field found in the detail section? Is so, you shouldn't have to use separate pageheader sections, since the pageheader section will automatically pick up the value in the first record on the page.

-LB
 
Nope. we have 4 separate fields in 4 detail sections. all the titles that I have in details sections is not coming from one field. they are 4 different fields.

Thank you
 
Okay, I think I see. I think you should leave everything set up as I suggested in my last post, although you will have a different formula for each ph section, depending up on the title1...title4. Then create formulas like these:

//{@true1} to be placed in the Report Header and in detail_b:
whileprintingrecords;
booleanvar flag1 := true;

//{@false1} to be placed in detail_a:
whileprintingrecords;
booleanvar flag1 := false;

//{@true2} to be placed in the Report Header and in detail_c:
whileprintingrecords;
booleanvar flag2 := true;

//{@false2} to be placed in detail_b:
whileprintingrecords;
booleanvar flag2 := false;

//{@true3} to be placed in the Report Header and in detail_d:
whileprintingrecords;
booleanvar flag3 := true;

//{@false3} to be placed in detail_c:
whileprintingrecords;
booleanvar flag3 := false;

//{@true4} to be placed in the Report Header:
whileprintingrecords;
booleanvar flag4 := true;

//{@false4} to be placed in detail_d:
whileprintingrecords;
booleanvar flag4 := false;

In the section expert, format the page header sections like this:

PH_a->suppress->x+2:
whileprintingrecords;
booleanvar flag1;
flag1 = true;//note no colon

PH_b->suppress->x+2:
whileprintingrecords;
booleanvar flag2;
flag2 = true;//note no colon

PH_c->suppress->x+2:
whileprintingrecords;
booleanvar flag3;
flag3 = true;//note no colon

PH_d->suppress->x+2:
whileprintingrecords;
booleanvar flag4;
flag4 = true;//note no colon

-LB
 
It is working as I expected. Thank you.
I really appreciate your help.

Thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top