Results 1 to 3 of 3

Thread: Crystal report in c#

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    266

    Crystal report in c#

    while calling a crystal report from c# code if i need to change the query according to criteria selected how could i do that...plz if any one could help

  2. #2
    Frenzied Member mar_zim's Avatar
    Join Date
    Feb 2004
    Location
    Toledo Cebu City.
    Posts
    1,416

    Re: Crystal report in c#

    Create a parameter in your crystal reports and in your code pass a value to it.

    Sorry I can't give you the code I don't have VS in this pc. Try to search here or in vb.net section surely you can find a lot of it and it can easily be converted to c# code.

  3. #3
    Addicted Member mabbas110's Avatar
    Join Date
    Oct 2005
    Location
    Karachi , Pakistan
    Posts
    172

    Re: Crystal report in c#

    You just put the options on ur form

    1 sort by name
    2 sort by amt
    3 sort by other

    now just do that put a paramaeter in stored procedure
    and by passing the parameter in stored proc just put the conditions on the store procedure like

    create proc getresults sorting varchar(1) as

    if sorting='1' then
    begin
    whole query +
    order by name
    end
    if sorting='2' then
    begin
    whole query
    order by amt
    ..
    and by this way u can get ur requried result , i hope so
    Thanks and Regards,

    Muhammad Abbas

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