on 07-21-2014 6:01 AM
Hi, I am somehow new to SAP CR for VS2010 and I am trying to create a report that is divided in 3 pages with data in each page related to the previous page. How can i create a multiple paged report? What i want to do is something like this.
======will be printed in page 1========== =======will be printed in page 2==== ===========will be printed in page 3=====
Rec no. Employee name EmpID Gross income | Basic Salary Bonus Compensation | Exemption code Tax withheld Tax due
1 Peter parker 0001 $5,0000 | $450 $200 $2.50 | M1 $50 $60
2 Emma stone 0002 $15,000 | $500 $350 $10 | S3 $80 $55
this is just a sample data/field needed in each page. I tried using section expert and inserted another section under details but it does not give me what i want. TIA.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hideki,
I would not suggest using CR for VS 2010 bundled designer for designing report. The designer should be used for sampling or testing reports. You could use any stand alone CR designer, CR 2008, 2011, 2013 to design your reports. See the trial versions here: http://www.sap.com/solution/sme/software/free-trials.html
With report design queries Abhilash Kumar might help.
Thanks,
Bhushan
You're on the right track with the additional sections. What you need to do now is open up the Section Expert (right-click in the gray area to the left of one of the details section and select "Section Expert"). Then turn on "New Page After" for each of the details sections to force each of them to a new page.
-Dell
Hi, thanks for the reply. I applied what u did and what happened is that it only shows the very first record on the page 1 and the second section related to the first record on page 2. It does not populate all the record on 'Details section a'. I attached the preview of what happened.
as you can see from the image there is only 1 record on page 1(Details section a) and 1 record in page 2(Details section b), where page 1 should have 10 records as well as page 2
Hi, Sorry for a late reply because i took a day off. Yeah there is a chance that those 3 pages will repeat depending on the number of records to be displayed. So what will happen is that the data on page 1 will continue on page 4 and so on. Is this a case of using a sub-report instead of detail section?
Regards,
Hideki
Yes, but this is going to be a bit tricky.
1. Create a formula called "InitPage":
NumberVar page = 1;
Place this formula in the report header - it won't display because of the final ";"
2. Create another formula called "SetPage":
NumberVar page;
if page = 3 then page := 1
else page := page + 1;
Place this formula in the page footer.
3. Create a formula called "InitRows": (NOTE: This assumes that your data for each row is using a numeric ID as the key)
Global NumberVar Array rowInfo := [-1];
1; //formulas cannot return an array, so we give it a meaningless value to return
Place this formula in the report header.
4. Create a formula called "ClearRows":
EvaluateAfter({@SetPage});
Global NumberVar Array rowInfo;
NumberVar page;
if page = 1 then
(
Redim rowInfo[1];
rowInfo[1] := -1;
);
1;
Place this in the page footer below the {@SetPage} formula.
5. Create a formula called "SetRow":
Global NumberVar Array rowInfo;
NumberVar page;
if page = 1 then
(
if not ({MyTable.ID} in rowInfo) then
(
if rowInfo[1] = -1 then
rowInfo[1] := {MyTable.ID}
else
(
//Add one element to the array.
Redim Preserve rowInfo[UBound(rowInfo) + 1];
//Set the element to the value you need for linking the data.
rowInfo[UBound(rowInfo)] := {MyTable.ID}
)
)
);
1;
Place this formula in your details section - it won't show anything, but it will set up the array for use in the subreports.
6. Keep your subreports in the details sections as they are.
7. In the Section Expert, do the following:
a. Turn off "New Page After" on the first details section.
b. For the second details section, set the Suppress formula to:
NumberVar page;
page <> 2
c. For the third details section, set the Suppress formula to:
NumberVar page;
page < 3
7. In your subreport, create a Formula called "FilterArray":
Global NumberVar Array rowInfo
Note that there is NO semi-colon on the end of this!
8. In the Select Expert, edit the selection formula to add something like this:
{MyTable.ID} in {@FilterArray}
I haven't tested any of this other than to make sure that Crystal will verify the formulas. But, it should get you close to what you're looking for.
-Dell
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.