Click here to Skip to main content
15,897,371 members

Showoing columns to row in a datatabl

Sumon562 asked:

Open original thread
I will be very regretful if give me a proper solution of my question. From the following query I get the result as :

"select sp.MaintenceCode, sp.MDate, sp.PDes,sp.SPCode, s.SpareParts, " +
"em.EmpName as MaintainedBy, md.MachinaryName, sp.SPMCode "+
"from tblDailyMaintenceDetails dm "+
"inner join tblEmployeeInformation em on em.EmpCode=dm.EmpCode "+
"inner join tblSparePartsMaintenance sp on sp.MaintenceCode=dm.MaintenceCode "+
"inner join tblSpareParts s on s.SPCode=sp.SPCode "+
"inner join tblMachinaryDetails md on md.MDCode=dm.MDCode "+
"where md.MDCode='MDP-000001' and sp.MDate'15-May-2013' ";

The result is :

DMC-002 5/15/2013    not good    SPC-000002  Cable   HASNA BEGUM Toshiba SPM-000002
DMC-002 5/15/2013    not good    SPC-000001  Motor   HASNA BEGUM Toshiba SPM-000004


But I have to show this in crystal report like as follows :
DMC-002 5/15/2013    not good    SPC-000002  Cable,  Motor   HASNA BEGUM Toshiba SPM-000002


How can I do this? Please help.
Tags: C# (C# 4.0), CrystalReports

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900