Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Adding x number of rows based on input parameter? Post Reply Post New Topic
Author Message
djderp
Newbie
Newbie


Joined: 20 Apr 2012
Online Status: Offline
Posts: 2
Quote djderp Replybullet Topic: Adding x number of rows based on input parameter?
    Posted: 20 Apr 2012 at 7:36am
Hi everybody,

I've just started using Crystal Reports about 3 weeks ago, and one of my first few challenges was to created a sign-in sheet for a class. Obviously, the sign-in sheet should display the names & other details of the students who are present, including a placeholder for the signature where the person can sign.

One requirement is that, the report should be able to take in a user-inputted parameter to provide an additional number of rows, just in case there are students who show up that aren't in the database. The report should then be able to generate those extra rows, where they can write manually their details and sign.

I have tried to do this via a SQL Expression field where I could try to play around with SET ROWCOUNT but apparently, didn't have any luck.

Any tips? Thank you in advance, and I'm glad to be in this forum
IP IP Logged
yggdrasil
Senior Member
Senior Member
Avatar

Joined: 19 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 150
Quote yggdrasil Replybullet Posted: 25 Apr 2012 at 3:14am
How about this.
Add a number of Report Footers, with a  text box in each to match the printed lines, ready to be written in.  Then conditionally suppress these, depending on the number of extra students you have, which is your parameter.  With a bit of ingenuity with the conditions, you could add up to 7 students with only 3 footers.Smile   (1,2, & 4 rows)
You will need borders on the boxes, and a character in there (like a .)
because Crystal won't print borders on an empty box. But you can turn the text colour to white so it doesn't show.
 
I've had to make reports like that before, but not with a parameter.
 
 
 
IP IP Logged
djderp
Newbie
Newbie


Joined: 20 Apr 2012
Online Status: Offline
Posts: 2
Quote djderp Replybullet Posted: 25 Apr 2012 at 7:46am
Okay thanks! I think I have an idea with what you mean. However, I do not know how to write the formula in the Section Expert(formula).
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Apr 2012 at 8:32am

open the section expert

select the section you want to hide/show
click on the x-2 button next to the "suppress no drill down" option
here you enter a boolean formula to conditionally suppress the section. True = suppress, False = show.
you will use something like
{?param}<1
 


Edited by DBlank - 25 Apr 2012 at 8:32am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.