Results 1 to 4 of 4

Thread: crystal report problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2007
    Posts
    3

    crystal report problem

    hi friends,
    i'm new to reporting in win app.. so i need a great help.. my problem is..
    i want to show a report that populate data from two tables. & i used the sql query like this.
    dim _Ssql as string=""
    _Ssql="Select d1.id, d1.name, c1.name from Dress d1, Color c1 where " _
    & " c1.id=d1.c and d1.id=10 "

    Hope u got my query...
    i'm using the sql server , so i created a crystal report and add the fields from the two tables. now i used the below code to show the report

    dim objds as new Dataset
    dim _Cconnect as new GetConnection
    objds=_Cconnect.GetAll(ssql)

    dim crt as new Report1
    crt.setDatasource(objds)
    CrystalReportViewer1.ReportSource=crt

    The main problem is when show the report it displays all the records.. but its not taking the data from dataset. ie it should show only 1 record.. How can i resolve this...
    cheers...

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: crystal report problem

    Moved to reporting

  3. #3
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: crystal report problem

    You are passing the GetAll method the sql statement from a variable called SSQL. Should it not be _SSQL?

  4. #4

    Thread Starter
    New Member
    Join Date
    Sep 2007
    Posts
    3

    Re: crystal report problem

    hi,
    GetAll() --> is a function which will return a dataset for the _ssql Query..
    Do you have any idea about Addcommand in the crystal report????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width