|
-
Aug 12th, 2025, 10:12 AM
#1
Thread Starter
PowerPoster
CR - Want string on my report that says "Displaying 4 of n records"
There's an area on my report where I am limited to displaying up to 4 contacts (that is, a person's name and phone #) and I want a text object saying, for example, "Displaying 4 of 10 contacts" if there's more than 4.
In C# this would be easy and the spacing between each token would be one space using String.Format().
I understand CR has no similar function so you have to construct this given what CR supplies. I can't figure out how to have only one space between "10" and "contacts" since 10 is variable and could be 2 or 2000. (Honestly, this total # most likely won't ever be past one digit but it would be nice to code with the flexibility of 4, or more, digits. Because when you write code you want it to work for all situations, past what you're currently working with). So I figured I want to trim, but because it's a number I have to first convert it to a string then trim the string but somehow that gave me decimal places so then I tried to get rid of those by saying ToNumber(count, #)...and it goes on and on with nothing working all that well.
The problem is really how to position the word "contacts" because that is a text object in a fixed place on the report so all my attempts above aren't the solution.
What I came up with is "Displaying the first 4 contacts of total " n. Where n can be 2 or 2000 and it won't matter because there's no fixed text afterward. While this is a solution, it just seems stupid and very limiting. *Is* there a way to do what I want?
There are 10 kinds of people in this world. Those who understand binary, and those who don't.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|