Results 1 to 8 of 8

Thread: Crystal Reports - Programatic Sorting

  1. #1

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Crystal Reports - Programatic Sorting

    Hi,

    I have VS 2005 and am running a crystal report bound to a typed dataset (that gets it's data from a SQL 2000 database).

    Can anyone tell me how I sort the data programatically?

    I cannot sort the data in the stored procedure nor can I define the sort fields in the crystal report at design time because they must be specified by the user at run time.

    I have tried creating a DataView object and sorting that but the SetDataSource property doesn't take a DataView (only a DataSet or DataTable).

    I noticed a ReportDocument.DataDefinition.SortFields object but it doesn't appear to have anyway of adding sort fields.

    Please help!
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  2. #2
    Member
    Join Date
    Dec 2003
    Posts
    38

    Re: Crystal Reports - Programatic Sorting

    Have anyone find a solution to this problem? I've the same probleme. Sometimes, i must sort with 2 fields, sometimes with 3, on the same report.

    In VB6, we could way easly do this. In VS 2005, with VB i cant really find a way to, neither info on the internet.

    Thanks in advance!

  3. #3
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: Crystal Reports - Programatic Sorting

    Hi,

    This link could help you to sort data;

    http://msdn2.microsoft.com/en-us/library/wxks80sb.aspx

    Hope it helps,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  4. #4
    Member
    Join Date
    Dec 2003
    Posts
    38

    Re: Crystal Reports - Programatic Sorting

    It would help sparrow1, but in fact i'm talking about Crystal Reports for Visual Studio 2005, and not Excel. Maybe you got the wrong link? Hope so, i can find any good info on sorting expert in the programaticly way.

  5. #5
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: Crystal Reports - Programatic Sorting

    Quote Originally Posted by Ph0b0s
    It would help sparrow1, but in fact i'm talking about Crystal Reports for Visual Studio 2005, and not Excel. Maybe you got the wrong link? Hope so, i can find any good info on sorting expert in the programaticly way.
    Hi,

    Here's the link for Crystal reports for VB.Net 2005;

    http://msdn2.microsoft.com/en-us/library/ms345074.aspx

    Hope it helps now,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  6. #6
    Member
    Join Date
    Dec 2003
    Posts
    38

    Re: Crystal Reports - Programatic Sorting

    Had already checked it. No info in microsoft website. The inly info they gave is how to change a pre-created sort entry, but no info how to create a new entry.

  7. #7
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: Crystal Reports - Programatic Sorting

    Quote Originally Posted by Ph0b0s
    Had already checked it. No info in microsoft website. The inly info they gave is how to change a pre-created sort entry, but no info how to create a new entry.
    Hi,

    Try this link how to create a new binding;

    http://msdn2.microsoft.com/en-us/library/ms227360.aspx

    Wkr,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  8. #8
    Member
    Join Date
    Dec 2003
    Posts
    38

    Re: Crystal Reports - Programatic Sorting

    I'll check it, it's another way to do it.

    It was so simple to add new sorts on previous Crystal Reports Engines... dunno why they take what was working well and was helpfull.

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