Pass changing values to parameter to Crystal Report scroll thru re

  • Thread starter Thread starter JB
  • Start date Start date
J

JB

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 said:
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.
 
--
JB


Andy O'Neill said:
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?
 
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.
 
Back
Top