How can I move the Detail section of Crystal Report to Second Page? - crystal-reports-2010

I have a Crystal Report which has a very long initial text. If I increase the text the crystal report gives message "the page header is too long". I just want that the tabular section start from next page. Is it possible?

You need to simply allow the details section to grow,just tick on the CanGrow properties of the details section, it will automatically let the contains flow to the next page.
Complete procedure:
Page footers don't resize, so you can't easily do what you want.
Here's a hack that, while far, far from ideal, may help:
Add a section that will repeat with every detail row (something like your primary key), and suppress the group header.
Create a formula with the following contents: shared numbervar recordcount := recordcount + 1; and put it in your new group footer.
Create another formula that resets the variable: shared numbervar recordcount := 0; and put it in the page footer.
Open the section expert and choose your new group footer. Choose "Print at Bottom of Page". In the suppress formula use: shared numbervar recordcount; recordcount < 50 // Magic Number Alert
Add your page footer text to the group footer
This will print the group footer at the bottom of the page after every 50 records have printed. The group footer will expand to fit the text in your field.
I'm thinking that you could make the magic number vary according to the length of your footer text, so your suppression formula would be recordcount < (if length({my.field}) > 100 then 25 else 50; or something like that, which would vary the number of records before a page break according to your text length.

Related

Add notes & footnotes to table

I have a report where I need to add a note/number where a record has data in a particular column. I then need to add a reference to that to the bottom of the table, much like a footnotes section you would see in a book.
I've tried adding the rownumber but it pulls in the actual rownumber and not the record count. I'm using oracle for my db.
In my report, if the record has a value for the column RETURN_NOTE (not shown), then concatenate an int tot he end of the TASK_NAME column. Then underneath the table, add the int from above with the RETURN_NOTE value.
You can see the red numbers and their description in the image below.
Thanks
The best way to go here is when you add a calculated field to your dataset where you put your footnotes into the expression. Lets assume your footnotes depend on the Fields!Task.Value and lets call this calculated field Footnotes:
'Name: Footnotes
=Switch(Fields!Task.Value = "Prepare for Coordinator", 1, Fields!Task.Value = "Ready for Closeout", 2)
Now add another column to your tablix and put the field Fields!Footnotes.Value in this column.
Then add a rectangle or another tablix somewhere in your report (put in the values which explains the footnotes). Then go to the properties of this tablix/rectangle (pane on the right) and under Other > Bookmark write in a bookmark code (for example: FootnotesExplained).
Go back to your textbox with the Fields!Footnotes.Value in it and right click on this textbox and go to Text Box Properties > Action and check the Go to bookmark option and write below your bookmark code from before FootnotesExplained.
When you click now on one of the value in the column where the footnotes are the report will jump to the tablix/rectangle where your footnotes descriptions are.

Get APEX Report column value to a page item

I have an APEX page with a static region and a report region (not interactive report).
Report will always display 30 questions (rows), with 10 rows per pagination.
So, Row Set "1" looks as follows.
Q.No__________Q.Description________Rating
01_____________AAAAAAAA________5
02_____________BBBBBBBB________3
XX ____________XXXXXXXX________N
10_____________CCCCCCC_________2
When next button is clicked in the report, row Set "2" looks as follows.
Q.No__________Q.Description________Rating
11_____________AAAAAAAA________5
12_____________BBBBBBBB________3
XX ____________XXXXXXXX________N
20_____________CCCCCCC_________2
And last row Set (3) looks as follows.
Q.No__________Q.Description________Rating
21_____________AAAAAAAA________5
22_____________BBBBBBBB________3
XX ____________XXXXXXXX________N
30_____________CCCCCCC_________2
My requirement is as follows.
In the static region above the report, I need to show different content based on the row set.
For first row set (questions 1 to 10), I have to show in the static region "This questions are related to AAA".
Similarly, for second row set (questions 11 to 20), I have to show in the static region "This questions are related to BBB"... and so on
For this, I was trying to get the value of the first row, first column (Q.No) of the report to a hidden page item. Based on this, I am planning to change the display text.
If it is 1, then static content will be "This questions are related to AAA"
If it is 11, then static content will be "This questions are related to BBB"
If it is 21, then static content will be "This questions are related to CCC"
I am not able to find a way to pass the value of the first row, first column of the report to a hidden page item.
Another approach would be to get the "row_set" number of the report to a hidden page item ... don't know if there is any APEX variable that gives APEX report "row_set" / "cursor" number...
Any help / suggestions / ideas please...
There isn't an easy way to do this, as far as I know. It would be possible to write Javascript to interrogate the pagination section of the report and see what it says is being displayed. However, given your apparently very specific 30 rows of data with associated headings, it might be easier to not use pagination at all, but instead to add your own Next and Previous buttons that set a hidden item to control pagination and then use the hidden item in the report's SQL:
... and question_no between :p123_que_no_hidden and :p123_que_no_hidden+9

Adding a blank page to SSRS

I'm creating a report by account that will either print 2 pages duplex (front and back). But sometimes the amount of data will make it overflow to 3 pages. When that happens I need to make sure a 4th page gets generated (blank) so the next account can print on the front of page 1. How can I accomplish this in VS2010? Thanks.
The answer, like most formatting questions, is to use a Rectangle.
Insert a rectangle, place it after your first table and give it a height of 0.125in. In the Rectangle properties, check Add Page Break After.
Now the problem is with your needing to only use the rectangle's page break when it's on page 2.
Since the Page Number built-in field only works in the header or footer, you need some code for the page number. Add code to get the Page Number to the report code (Report Properties -> Code):
Public Function PageNumber() as integer
Return Me.Report.Globals!PageNumber
End Function
Then set the Rectangle's visibility to Show or Hide based on expression and the expression to:
=IIF(Code.PageNumber() = 3, TRUE, FALSE)

Push items to bottom of report

I'm trying to create a report with some controls "anchored" to the very end. The difficulty is that I can't add this to the page footer because the report could span multiple pages leaving a giant white space at the end of each report if I decide to toggle visibility. The items I have should only appear on the very last page and be positioned just above the footer.
For example, in this scenario, I need the letter's closing signature, titles, etc. positioned at the very end of the last page the report spans.
As an alternative to adding a sub report you could try the suggestion below.
It all depends on how you data is laid out in your report whether it could work for you.
If all the data required to populate the controls exists in the report dataset why not add an outer lever of grouping that encompasses the entire dataset. You could do this using a dummy column containing 1 for example.
Just add a footer to this group and put your data in the group footer.
You can additional rows as necessary to the group footer.
This footer will always appear as the last row(s) in the tablix

Crystal Reports Put Text in Page Header or Footer based on page content

I have a Crystal Report with several detail sections that all span multiple pages. The number of pages each section spans changes based on data from a database. However, the number of details sections and their titles are constant.
I would like to print in the page header or page footer a text that depends on which detail section is printed on that specific page.
Let's for example say, I have four detail sections. In the page header, I want to print "A", "B", "C" or "D" depending on which detail sections is printed on the page.
The detail sections each contain a subreport, so the actual report doesn't have any data connection.
when I had to do this, I created a formula named pageHeader in each subreport, set to something like:
whilereadingrecords
formula = {vw_rpt_prog_proc_rate_date_pivot.programID} & " Program "
and grouped on that formula value, then in that group's options, checked 'repeat group header on each page'
hth
-Beth

Resources