By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,759 Members | 1,778 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,759 IT Pros & Developers. It's quick & easy.

Crystal Report

P: 11
Hi all

I have Branch name, employee name and some of the fields in my database. I have to create attendance report using crystal.

The problem is in my report I want to display employee names order by their branch name. for e.g.

in my crystal report i want to display data in this way

Brooklyn Branch name

Mr. kevin
Miss zuilaana
Mr. craig

Canberra Branch name

Mr. don
Mrs. kim

I tried to use two separate commands but it didn't work.

Please Let me know as soon as possible that how could I solve this?????????

Thanks you all for trying to solve this in advance
Apr 30 '07 #1
Share this Question
Share on Google+
3 Replies

P: 11
Hi all

again it is the same question regarding the crystal report query

Actually I need to display each Branch on new page in crystal report.

I want the employee name order by branch name and the department name is well for e.g.

Branch1: page1





Branch2: Page2





Thank You all in advance to solve it.
Apr 30 '07 #2

P: 5
Hi viral123,

I tried to display every branch and employer name in new page order by branch name

Use this coding in page_load

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

Dim rpt As New CrystalReport2
Dim mydatareader As SqlDataReader
Dim myConnection As SqlConnection = New SqlConnection("Server=Gopi;initial catalog=Northwind;User Id=sa;Password=;")
Dim MyCommand As SqlCommand = New SqlCommand("select brname, empname from BRANCH order by brname", myConnection)
Dim myDA As New SqlDataAdapter
Dim myDS As New Dataset4

myDA.SelectCommand = MyCommand
myDA.Fill(myDS, "BRANCH")
CrystalReportViewer1.ReportSource = rpt

Dim s As System.IO.MemoryStream = CType(rpt.ExportToStream(CrystalDecisions.Shared.E xportFormatType.PortableDocFormat), System.IO.MemoryStream)
Response.Buffer = True
Response.ContentType = "application/pdf"
s = Nothing
End Sub


In crystal report
click --> Detailed Section --> Format Section --> Check New page After

then u will get branch name and details with each page

Wish you success
Apr 30 '07 #3

P: 5
Hi viral123,

Do the following stepts, u will get your result

1. first place the fields in crystal report
2. clikc the field (in right click) in crystal report and choose format options
3. In format option, choose column tab.
4. In column table chek the option suppress if duplicates
5. click <ok>

u will get like this

branch name1




wish u success
Apr 30 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.