Pass changing values to parameter to Crystal Report scroll thru re

Discussion in 'ASP .Net' started by JB, Mar 31, 2010.

  1. JB

    JB Guest

    Hello Community

    In a C# and ASP.NET app I embed a Crystal Report. In the Crystal Report I
    create a parameter field named id. Then I read one id from a table and I
    pass the id from the table to Crystal Report where Crystal Report creates
    the report successfully.

    The problem is that now I am reading atleast 5 id’s each containing a
    different value from the table and I want Crystal Report to create a report
    for each one of the id’s such that the user can use the carat and scroll
    thru all of the reports from the first one to the last.

    Crystal Reports creates reports like that by default if it reads the whole
    table without passing a parameter but the question is how can I get Crystal
    Report to create the reports like that when I pass 5 id’s each containing a
    different value (if its possible)?


    Thanks
    Jeff

    --
    JB
     
    JB, Mar 31, 2010
    #1
    1. Advertising

  2. JB

    Andy O'Neill Guest

    "JB" <> wrote in message
    news:...
    > Hello Community
    >
    > In a C# and ASP.NET app I embed a Crystal Report. In the Crystal Report I
    > create a parameter field named id. Then I read one id from a table and I
    > pass the id from the table to Crystal Report where Crystal Report
    > creates
    > the report successfully.
    >
    > The problem is that now I am reading atleast 5 id’s each containing a
    > different value from the table and I want Crystal Report to create a
    > report
    > for each one of the id’s such that the user can use the carat and scroll
    > thru all of the reports from the first one to the last.
    >
    > Crystal Reports creates reports like that by default if it reads the whole
    > table without passing a parameter but the question is how can I get
    > Crystal
    > Report to create the reports like that when I pass 5 id’s each
    > containing a
    > different value (if its possible)?


    With Crystal, my preferred method is to read data into a datatable and
    substitute this for the crystal report's datasource at run time.
    That way I can do whatever I like with the data without having to worry
    about the various foibles of crystal.
    So I'd have some way of selecting my data into that datatable that allowed 1
    or more id and hand that to crystal.
     
    Andy O'Neill, Apr 1, 2010
    #2
    1. Advertising

  3. JB

    JB Guest

    Re: Pass changing values to parameter to Crystal Report scroll thr

    --
    JB


    "Andy O'Neill" wrote:

    >
    > "JB" <> wrote in message
    > news:...
    > > Hello Community
    > >
    > > In a C# and ASP.NET app I embed a Crystal Report. In the Crystal Report I
    > > create a parameter field named id. Then I read one id from a table and I
    > > pass the id from the table to Crystal Report where Crystal Report
    > > creates
    > > the report successfully.
    > >
    > > The problem is that now I am reading atleast 5 id’s each containing a
    > > different value from the table and I want Crystal Report to create a
    > > report
    > > for each one of the id’s such that the user can use the carat and scroll
    > > thru all of the reports from the first one to the last.
    > >
    > > Crystal Reports creates reports like that by default if it reads the whole
    > > table without passing a parameter but the question is how can I get
    > > Crystal
    > > Report to create the reports like that when I pass 5 id’s each
    > > containing a
    > > different value (if its possible)?

    >
    > With Crystal, my preferred method is to read data into a datatable and
    > substitute this for the crystal report's datasource at run time.
    > That way I can do whatever I like with the data without having to worry
    > about the various foibles of crystal.
    > So I'd have some way of selecting my data into that datatable that allowed 1
    > or more id and hand that to crystal.
    >
    > .
    >


    Hello Andy

    I am thinking about creating a Dataset but your idea of a Datatable is
    just as good.

    How does Crystal Report access your Datatable and it's fields?
     
    JB, Apr 1, 2010
    #3
  4. JB

    Andy O'Neill Guest

    Re: Pass changing values to parameter to Crystal Report scroll thr

    "JB" <> wrote in message
    news:...
    <<>>
    > I am thinking about creating a Dataset but your idea of a Datatable is
    > just as good.
    >
    > How does Crystal Report access your Datatable and it's fields?


    A datatable is somewhat lighter weight.

    You can build your initial report against one thing and then switch the
    source at run time.
    If the datasource is complex I temporarilly change my select to create a
    table, design against that and then drop the table.
     
    Andy O'Neill, Apr 2, 2010
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James Wallace
    Replies:
    0
    Views:
    1,109
    James Wallace
    Oct 17, 2003
  2. Sathiamoorthy

    Enable Scroll up and scroll down in CR-report

    Sathiamoorthy, Nov 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    957
    zobalee
    Nov 28, 2006
  3. Comfort
    Replies:
    0
    Views:
    628
    Comfort
    Oct 18, 2004
  4. THTB
    Replies:
    0
    Views:
    228
  5. Max Williams
    Replies:
    3
    Views:
    202
    Robert Klemme
    Jan 6, 2009
Loading...

Share This Page