Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using Crystal Reports 11 and I need to display 20 rows where the database may supply any number of rows upto 20.

Posted on 2008-10-02
6
Medium Priority
?
308 Views
Last Modified: 2009-12-16
Hi.

I'm converting a Sage Retrieve 4GL based report to Crystal in conjunction with PHP and COM to produce a PDF.

This report prints a "collection ticket". Each ticket has upto 20 items (with additional data). This is a hand written document which is scanned and stored and then hand entered into the system for processing.

Once entered and verified a tidy copy is printed and used internally or snail mail posted.

The report prints a line saying [Nothing received] where the line is blank.

So, on a collection ticket with 3 items on it, there will be 17 [Nothing received]s.

How do I get Crystal to report non existent data?

I'm new-ish to Crystal, but point me in the right direction and I'll have a go.

Richard.
0
Comment
Question by:Richard Quadling
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 22624816
One idea that comes to mind is to add a group to the report.
Group on the Ticket ID

Suppress the group header

Add a formula to the group footer
WhilePrintingRecords;
Local NumberVar i;
Local numberVar RecordCount;
Local StringVar NoItemList := '';

RecordCount := 20 - Count({TicketId},{TocketId});
For i := 1 to RecordCount do
     NoItemList  := NoItemList & "[Nothing received]" & chr(13);

NoItemList := Left(NoItemList,Length(NoItemList)-1);
NoItemList

Suppress the group footer with
Count({TicketId},{TocketId}) = 20

mlmcc

0
 
LVL 101

Expert Comment

by:mlmcc
ID: 22624823
This may be a slightly incorrect formula
Count({TicketId},{TocketId});

To get the correct one insert a summary on you ItemListId field in the group footer.
When you want to use it simply select it from the Report Fields

mlmcc
0
 
LVL 40

Author Comment

by:Richard Quadling
ID: 22625103
I get it. This will take me a little while to set up (I've got the web side to do first). Probably not get around to this until tomorrow.
0
Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

 
LVL 40

Author Comment

by:Richard Quadling
ID: 22625237
So, rather than have ...

Page Header
 Details
Page Footer

Have

Page Header
 Group Header (supressed)
  Detail (from DB)
 Group Footer (with formula to create a block of text)
Page Footer

And by having the block of text printed, I get my [Nothing received]s.

Yes?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 22625277
It should work.

mlmcc
0
 
LVL 40

Author Comment

by:Richard Quadling
ID: 22627070
Ah! I just checked with the users if they wanted the blank lines. And they said no. ARGH!!! I asked why they had them on the other system (which I wrote for them over 10 years ago), they said they didn't know it could be changed.

I'm really having one of those weeks.

And I get home tonight, after telling them that this will be finished tomorrow, and what do I find? My wife just starting labour. So I think from now on I'm going to have to start quoting truly Scotty estimates for everything. No matter how simple or even if it has already been done. Nothing less than 2 days. But with the possibility of longer if they keep changing their mind.

Thanks Michael for the pointers.

I only recently got around to using CR, so the odd stuff is not so obvious yet. So be prepared for a LOAD of maybe daft questions.

Thanks again.

Richard.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question