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

Force New Page on change of detail field 1

Status
Not open for further replies.

vb6novice

Programmer
Sep 23, 2002
288
US
Looking for a way to force a new page when the value of [client_name] changes in the details.

My CR11 report is run from within another application. The report needs to have the results grouped by [client_name] but have other sorting options as well. I don't want to create a group for [client_name] because that removes the sort selection box on the parameters page that appears before running the report.

The [client_name] field is not wanted in the details section. Most of the time the report will be limited to a single client by a user's paramenter selection, but not always. There isn't enough horizontal space in a detail row to show the client name even if it was wanted and I don't want it under the other data because I'm trying to keep the height of the detail row as small as possible.

I put [client_name] in the Page Header to show at the top of every page, however, if the value of [client_name] changes in the middle of the page there is no way to tell.

I need to force a new page when the [client_name] changes.

Any ideas on that?
 
Right-click on a section and choose Section Expert. Then choose the formula icon (x+2 and a pencil) for New Page. {client_name} <> Previous({client_name})

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Madawc,

That worked great. Thanks.

The only drawback, and I knew it would be so, is that if the report is sorted on something other than the [client_name], I'm gonna get a new page every time [client_name] changes (I could end up with hundreds of page for what should be a dozen page report).

Do you know of any way to set the sort order so that [client_name] stays as the first sort criteria while the other sort fields can be moved around as desired?.
 
You can group by client-name, suppressing the group headers and footers. You could have other groups within that.

Or you could sort using Reports>Record Sort Expert - at least those are the names in Crystal 10.

It is possible also to create a formula field that chooses one of several different fields, provided they are all from a single 'row', a set of linked fields. E.g. @Latest_Date, as if isnull({date.finshed}) then {latest.date} else {date.finshed}. Such a field can be used for grouping and sorting. It is even possible to use parameters to choose which field will be chosen.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top