crystal report to print details of employees side by side - crystal-reports

I need to create a crystal report that shows the address label of the employee, By using crystal reports in vs2005 I had created the crystal report and connect to the data source and every thing goes fine and the report generated correctly, it displays like
Ashok(1st emp)
Station Road
Hyderabd
.........
Kiran(2nd emp)
Air port road
Mumbai
..........
Ravi (3rd emp)
address1
address2
............
suresh 4th emp)
add1
add2
etc in the linear way only but i want side by side of two employee details like
...............
Ashok(1st employee).................................Kiran(second employee)
Station Road..............................................Air port Road
Hyderabd........................................... .......Mumbai
etc.
Ravi(3rd employee)...................................Suresh(4th employee)
Address1...................................................Address1
Address2..................................................Address2
Thnks in advance
Right click in the details section, select Section Expert.
Check the tick box "Format with multiple Columns". A new tab should appear after Color.
Using the settings on this tab you can generated columned data.
Yesterday I had spent a lot of time time with the sol you provided, but I am unable to see the report in my desired format again all the results are coming one under one, But I want first emp details side second emp details down thrid emp details side of third emp fourth emp details, I am suffering a lot with this problem, All the project was completed, But I was stuck with this small problem on just printing the report. Please Help Me, Regards

Right click in the details section, select Section Expert.
Check the tick box "Format with multiple Columns". A new tab should appear after Color.
Using the settings on this tab you can generated columned data.
BASED ON OP COMMENT:
What you need to do is:
Add the fields to the report (if you are planning 2 columns, use only yhe left half of the report, 3 columns only left third, and so forth).
Right click details and select section expert.
Check Format with Multiple Columns, this should show the Layout tab next to Color tab.
For your example, under Layout tab, Change Printing Direction from Down then across to across then Down. Change Detail size to half of the Report width.
That should be it.

Related

Crystal report one field from database and format it in crystal report

I have only one field in a table which i am using in crystal report in details section.
now i want that field as word wrap as it is too big and i want it one after another.
i.e
if i am having a field say "address" in details section
and i am placing it at left side i want the field to be printed next record next to it and then next record next to it going from "left to right" and after the page border is end next record should be printed again from left to right and so on
and i am using VS 2008
If that field is in your details section, do a right click on the details section and go to section expert, search for Format with Multiple Columns and check it. Then a layout tab will appears, so go there and select across then down. You can also adjust width and height there.

Crystal Reports: Showing only first record in each group

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.

How to have two reports on the same page with iReport?

I want to do a print with two tables on the same page. It's for a cart : there the list of products (title, price...) and the list of payements (with blue card, with money, and so on).
I've try with subreports, but it's seem that's a subreport is for each line of a main report.
I think I need two details bands on my report, but there is only one...
So how to do that ?
Thanks for your help.
If you want to add another detail band, right click on the first detail band Detail 1 and select Add Another Detail Band.
It sounds like you want a report consisting of two repeating lines: the first line will show the product details while the line beneath it will show the payment details for that product. Seems to me that all that information, for both lines, will be coming from your data source. You might try putting all that information in one detail band, but expand the band so that you can put a line of variables for the product details above the variables for the payment method. To change the size of any of the bands in iReport just hover the mouse over the blue dividing lines until the mouse becomes a vertical line with two arrows, then click and drag.
What I'm thinking may work is something like this in the detail band:
<product title> <product price> <product description> <product quantity>
<payment type> <payment amount> <payment date>
Each of those fields would be connected to a variable from your data source. That would be one detail band which would repeat for each product and its associated payment type.
If your data sets are independent, you could try using two sub reports; one for your products and one for your payments. Your main report doesn't have to have a dataset. Change the "When No Data" option in your main report to "All Sections, No Detail" and include your sub reports in any band other than the detail section.
I needed something similar. On the same page to have two identical prints. This helped me: Detail 1 and select Add Another Detail Band. to create another one detail. Than i copied the same layout from Detail1 to Detail2. It is not so much elegant solution, but it works.

crystalreports in vs2005

I need to create a crystal report that shows the address label of the employee, By using crystal reports in vs2005 I had created the crystal report and connect to the data source and every thing goes fine and the report generated correctly, it displays like
name
father name
address1 address2 city
state pin.
in the above format the report was generated. a single employee address in a single section
But my client want
name(of first employee) name(second employee)
fathername fathername
address1 address1
address2 address2
city city
state state
pin pin
againg below third employee and fouth employees address label should generate. Can any one help me how to generate report in the fashion.
Thanks in advance.
I had a similar requirement and stumbled across this question. I tried all but none of the suggestions worked. Not sure how you managed to solve it.
Im posting a solution that worked for me. Hope it would help anyone arriving here.
When you add a new report, please select "Use the Report wizard option" and select "Mail Label" option in the "Choose an Expert" tab as below.
In the following pages, choose your appropriate data Source and select "User defined Label"
and specify your height and width.
Play with these options to get the optimal number of employees per page and this should create a report as per your requirement.
Hope that helps.
Right click in the details section, select Section Expert.
Check the tick box "Format with multiple Columns". A new tab should appear after Color.
Using the settings on this tab, can generated columned data.
BASED ON OP COMMENT:
What need to do is:
Add the fields to the report (if planning 2 columns, use only the left half of the report, 3 columns only left third, and so forth).
Right click details and select section expert.
Check Format with Multiple Columns, this should show the Layout tab next to Color tab.
For this example, under Layout tab, Change Printing Direction from Down then across to across then Down. Change Detail size to half of the Report width.

crystal report total

suppose if i have many locations like L!,L2,L3 etc
each location hasAmount column with many records
how
can i totl the amount of each location in Crystal report
You need to create a Group for the Location, and then add a total field for SUM of Amount.
If you need me to explan the steps for you, please feel free to ask.
On the menu click Report and then
Group Expert.
A new window will pop up called
Group Expert with 2 boxes (Available Fields and Group By) and
buttons to move fields from left to
right.
Move the Location Field to the Group
By box and click OK.
Now you report should show a Group
Header 1 containing a field *Group1 Name* and Group Footer 1 which should be blank.
Now on the menu click Insert and
Summary. You should see a new window called Insert Summary.
In the Choose the field to
Summarize, change the field to the required Amount field to be summed.
Change the Calculate this summary
from Maximum to to Sum.
Change the Summary Location from
Grand Total(Report Footer) to Group #1 and click OK.
That should be about it. Now you can play around with the formatting as required.