Crystal Reports: Showing only first record in each group - crystal-reports

I searched to get the required answer but not found exactly what iam looking for - please help me.
Please follow the steps i made in crystal report:
Using crystal report command (i created a query to get the required business number)
--> which gets 5 Business numbers
Note: Every business is having many receipt numbers (1st installment receipt, 2nd installment receipts... like that....) - these receipt details are stored in table_receipts.
In table_business - i have all details about business number, customer, product details...
Please understand the links:
table_business - table_customer - table_product - table_receipts
Relationship between tables are:
table_business.Bno=table_receipts.Bno
table_customer.Cno=table_customer.Cno
table_product.Pno=table_product.Pno
After creating the crystal report command; i just drag the required table in crystal report (table_business, table_customer,table_product,table_receipts)
Now i created a group for Business Number "BNo"
I need to display all the required details about that selected Business Number using parameter - its coming fine except receipts.
I mean its showing all receipts (all installment receipts). I need to display only the first receipt only (i.e: receipt number starst with letter "F" )
Hope you understand my requirement - Please help me in this regard.
Expecting your valuable reply.
Regards,
Sensa.

Here is what I tried for the same issue and it worked. It's a 2 step process involving using Running Total Fields and Suppressing in Section Expert.
First step is to create a Running Total Field (Right under Parameter Fields)
Right click on it and click New and name your field i.e. CountFirstOnly
On the left you will see the fields you can perform functions on.
Select the receipts field. Bring that over to field to summarize and select count.
Under Evaluate select For Each Record
Reset on Change of Group and select your grouping, in this case business number and click OK
Drag that field into your report.
Part 2: Section Expert
Bring up the section expert on details and click on the suppress X-2 button
Your formula should be: CountFirstOnly >1
Click OK
Refresh your report
Hopefully this did the trick.

You should be able to do this by creating a forumla for suppressing the field (table_receipts.Rno).
Right-click the {table_receipts.Rno} field and select Format Field...Common tab...Check the 'Suppress' box and then click the X-2 box to the right. When the new window appears paste this:
not ({table_receipts.Rno} startswith "F")

I might have a solution for you.
1)Open the ‘Report’ menu then select ‘Section Expert’
2)Select the ‘Details’ section from the left hand menu
3)Tick the ‘Suppress No Drill-Down’ option and click on the icon to the right of it and in the formula option put
4)RecordNumber > 1
This should suppress the whole ROW/Record and not just the field. I saw your problem from this thread, I needed the exact same solution and this worked.
show only in the first row in crystal reports details section

It sounds as though the simplest way to meet this requirement would be to add a selection condition to the report - something like:
Left({table_receipts.Rno},1) = "F"
This should ensure that only the associated products and customers for the first receipt for each business are reported.

Related

How to suppress Details section based on value in database field

I am trying to make a report suppression of Detail B segment based on a value from a database field.
I tried to set the variable and suppress based on value of variable but it only shows for one Detail B. Maybe increment of value is not working?
Current state:
https://imgur.com/a/5bkAFle
Expected output will be that if database field will be 6 that section Detail b will appear six times in report.
Expected state:
https://imgur.com/a/fozburX
I am totally new in Crystal Reports so I prefer a simple solution.
Thank you very much.
Right click on Section and go to Section Expert and write the suppress formula by clicking the button on right side of Suppress option.

How to filter records in a single section of Crystal Reports

I have my base record set filtered with a parameter. However, this leaves me with 6 records and I need to filter down to one particular record in each of my sections. If none of the records meet my criteria i cannot suppress the section, it will need to just stay there and blank.
Essentially, I need a method to filter down records that hit one of my sections but not affect the report as a whole.
A few notes:
I cannot use a subreport for this. I need to duplicate this effort over a couple of sections and if I add any more sub reports it just crashes crystal reports (I have a lot of data & a ticket with SAP)
Using a suppression formula hasn't worked yet because I need the section to exist, if it has a null value
Applying no filter doesn't help me because it will duplicate my section 6 times
2 options.
a)
Right Click on white space and choose Insert Group
Choose your field and select specified order or use another record that can filter your data
On the Specified Order Tab click New
Select equal to on the combo box and specified what record you need to be shown
or
b)
Right click on the record
Next to the suppress check box, click on x-2
Here you can create a formula to suppress the records that you don't need.

Proforma Invoice for Sales Order

I have to design the Proforma Invoice by using the Crystal Report SAP B1 and If there are multiple line items in the sales order and we wanted to get the Proforma Invoice copy for a particular line item means how to generate that?
Please assist me..
I'm assuming you're not sure where to even start with this since your question is very vague (this is why you're being downvoted).
A good starting point is obviously using the standard SO Crystal Report Layout in the system and checking off the "New Page After" option in the Details section of the Crystal Report (this will create a new page after every line item). Then modify the format of your Page Header and Footer to accommodate your "Proforma Invoice Copy" requirement.
Give us more detail of where you're stuck and maybe we can be more helpful.

Jasper Subtotal

I have a report- from another question: Jasper report data summary which shows totals for a number of columns by location. I need to sub-total some of the location_cds and am not sure where to start. I have one group - by location_cd. Some location_cds have sub-locations, i.e. 3A has 3A1, 3A2, 3A3. Right now I have the totals for each individual row displayed in the group footer. I would like to see a subtotal for any location_cd that has sub-locations. I am trying to puzzle out how I am going to approach that. Should I see if I can do that in the query or will Jasper help me out here?
I am querying Sybase ASE 15.7.0 and am using Jasper Studio 5.5.1
Sub totals are the same as totals, just check the following:
add the order by corresponding to your list - usually add the item to the order by list
ORDER BY some_name_wharever, my_subtotal_thing_to_be_ordered
create a new group using the wizard, right click the root of the report on the report inspector and select "add report group"
create a new variable just like the total one but mind the reset and increment group
That should do it. Hope it helps. Good luck.
I feel like you are trying to create a crosstab, with different subtotals and a general total... Do try looking into crosstabs.. they may be tricky to use, but the end result is great if used properly!

Crystal Report suppress a whole row in details section

I am using crystal report in my vb.net program. Because of my database design I get some rows duplicated as in the following picture:
As you can see from the picture, the first record has two printer models that have the same ink group. and the next model is the only model that has that particular ink group. As I have mentioned before This is because the way I designed the database and its not the problem. I know how to suppress a single column.
When I select a column and check "suppress if duplicate", the following results show:
The row is suppressed but also has taken a place in the report details.
My question now is how to suppress a whole duplicated row?
thank you
As you are aware that your database design is producing these type of results, one option would be check the option Select Distinct Records so that only distinct records are displayed.
One more option.. This is not a tested one change as you required, This is just an idea
write a condition in supress of the section where you placed your data.
if ID=next(ID)
then true
else false
This condition will make sure that if next row is duplicated then it will be supressed
there is many Options , Easy one Is,
you can use Grouping in Crystal report , in your Example u can Group on ID then Suppress Group Detail and Group Footer Problem Solve Have Fun with Coding