How to Supress Blank Space In Crystal report - c#

I have Crystal Repot Like this :
In this I dynamically Supress Field as I I found Null value for that field,
But In Report It shows Blank Space Like here I am Hiding, tag0 ,tag1, tag11, value0 ,value1 ,value11 etc
So Report Shows Like this
I want to Remove this blank Space between Field, above and Below I try
Section Expert => And Tick On Suppress Blank Section , but its not Working
As per Siva Suggest me i Can not Put All the tag in Different Section Because there are in Group Section not in Details
Here Field TAG 0 to 11 and Value 0 to 11 are Variables , which may be hidden or Visible Depend on User Selection , where other Field are static

Try the following step
= > Open your section expert (right click on some white space, you should see it come up).
= > Go to the options for the group footer and turn on reset page numbers after. You should see the page numbers reset at the beginning of each report.
= > Also in the section expert, go to the options for the page header and click on the blue button next to the Suppress (No Drill-Down) option.
= > In the Formula Editor, enter PageNumber=1

I would suggest you to place one tag in one details section like
tag1 in detaila
tag2 in detailb and so on
Then supress the section insetad of supressing the individual fields then you won't get this blank space.

Right Click on the section >> Section Expert >> Check Suppress Blank Section

Related

How to hide a section in Crystal report

I have 5 sections that don't always have data, i want to hide the sections that are empty. I read some posts i found online saying something about formula but i don-t know how to do it nor where to start.
if {#yourformula}="1" then
true
else
false
Any help will be appreciated.
Follow these steps :
Go to Expert Section
Select your Section
Check the suppress checkbox on the right
Click the formula button right next to the checkbox label
Now on the formula editor to write your logic
Write something like this :
if {#yourformula}="1" then
true //hide
else
false //don't hide
Go to section expert and select which section you want to suppress, then select the suppress (no drill down) check box.
if you want to hide the section when the section is blank, select the suppress blank section check box
Or simply turn on the checkbox for 'Suppress Blank Section'.
It is located 3 positions below the Suppress checkbox.

Repeat header based on user choice

I have a report subreport with a group and the option "Repeat group header in each page" checked. But I need the user to be able to choose whether or not to show the group header on every page, or just the first time the group appears.
I set up a checkbox to let them choose, but how can I use this to tell the report not to repeat the header during run time?
Update
Beeing a Subreport I can not know which page will appear for the first time and I can not restart the numbering because it is necessary for the report.
I'm using CrystalReports in VS2005 and coding C# in VS2010, I'm working for a company and can't upgrade.
I'm trying to use a FormulaFieldDefinition in C# but I don't know how.
This could be done with a variable inside the sub-report.
Create a formula-field with following content and place it somewhere in the detail-section:
WhilePrintingRecords;
booleanVar headerPrinted := True;
In the suppresion-formula of the group-header place the following code:
WhilePrintingRecords;
booleanVar headerPrinted;
The formula will set the variable to True as soon as the first detail is being printed.
So the suppression formula evaluates to False only the first time the group header is being printed and to True on every subsequent time.
So with a boolean parameter {?GroupHeader} to choose if the header should be printed or not the suppression-formula would look as follows:
WhilePrintingRecords;
booleanVar headerPrinted;
If {?GroupHeader} And headerPrinted Then
True
Else
False
{?GroupHeader} = True would mean: Only show group-headers once.
I'm not sure which version of Crystal Reports you are using, but it does not look like there is an ability to specify a formula for "Repeat Group Header on each Page" under the Group Expert in Crystal 2011.
Instead, you might have to do a work around:
Create a boolean parameter {?GroupHeader} where true means "show the group header on every page."
Create a page header.
Copy your group header elements into the new page header.
Create a suppression formula on the new page header section under the Section Expert.
if PageNumber > 1 and {?GroupHeader} = true then false else true.

numbering page in crystal report

am using crystal report in C# asp.net ..
i need help on this :
and am trying to make my report start from number 5 NOT 1
i tried to write PageNumber=5; like this :
in footer group -> section expert -> reset page number after -> formal Editor -> PageNumber=5;
its reset after page 5 .. i want it from beginning start from a number i give ..
also i try it on new page before and i add it there it not work
what should i do ?
thanks
Don't go to reset page number instead create a formula and write below code and place place in page footer.
Create formula #Page Number
pagenumber+4
Now place above formula in page footer

How to change textbox text dynamically in Crystal Reports using a formula

I just trying to change textbox text dynamically in Crystal Reports using a formula but I did not find where should I put the formula?
Shalini Khare
On crystal report , you can find FormulaFeild section. Right click that and add new formula and apply your logic
EDIT
Instead of textbox write a formula and place the formula in the textbox place.
Step 1-Insert textbox
Step 2- On crystal report ,Open Formula field section. Right click that and add new formula.
Step 3- Give name of Your formula and click OK
Step 4- Write down formula to change textbox text dynamically Like
If{Table.TotalMarks}>400 then "Pass"
Else "Fail"
Step 5- Save and Close
Step 6- Drag this formula from Formula Field and drop it into textbox
Step 7- Now execute your program
Step 1- Insert two Text box (At same place)
Step 2- Write Pass in first textbox and fail to another
Step 3- Right Click On First textbox
Step 4- Select format object
Step 5 Check On Suppress checkbox
Step 6 Open Suppress formula editor and put your formula like
if {Table.TotalMarks}> 400 then
true
else
false
Step 7 Save and close
Step 8-Apply same for second textbox (change formula)
Step 9 Now execute your program

How to display 20 records on every page of crystal report?

I am new to crystal reports and I need to print 20 rows of data per page.
I found this on the web but it is not working on my system.
if Remainder(Recordnumber,20)=0 then true else false
My system only prints a row per page.
To show 20 records per page do the following
Open the report in Design View
Right click on the Details section and select Section Expert
Make sure the Details section is selected in the Section Expert dialog box. Check the box that says “New Page After”
Click the formula editor button to the right of the checkbox.
Enter the following formula
if Remainder (RecordNumber, 20) = 0 then true else false
Click Save and Close and then click OK.
To make it show 10 records per page do the following
Open the report in Design View
Right click on the Details section and select Section Expert
Make sure the Details section is selected in the Section Expert dialog box. Check the box that says “New Page After”
Click the formula editor button to the right of the checkbox.
Enter the following formula
if Remainder (RecordNumber, 10) = 0 then true else false
Click Save and Close and then click OK.
If you run the report it should break after each 10 rows.
Could it be something pedantic as RecordNumber is Recordnumber in your code?
if Remainder (RecordNumber, 20) = 0 then true else false
If you are using Crystal reports 2008/2011 there is a new options in the details section properties in the section expert - 'New page after: X Visible Records':

Categories