Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Pass changing values to parameter to Crystal Report scroll thru re

Reply
Thread Tools

Pass changing values to parameter to Crystal Report scroll thru re

 
 
JB
Guest
Posts: n/a
 
      03-31-2010
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
 
Reply With Quote
 
 
 
 
Andy O'Neill
Guest
Posts: n/a
 
      04-01-2010

"JB" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.

 
Reply With Quote
 
 
 
 
JB
Guest
Posts: n/a
 
      04-01-2010

--
JB


"Andy O'Neill" wrote:

>
> "JB" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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?
 
Reply With Quote
 
Andy O'Neill
Guest
Posts: n/a
 
      04-02-2010

"JB" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
<<>>
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing Parameter values in Crystal Report Anjut Software 0 11-14-2009 05:51 AM
Enable Scroll up and scroll down in CR-report Sathiamoorthy ASP .Net 1 11-28-2006 11:42 PM
First time crystal report user - How do i create a crystal reports from asp.net web form? Learner ASP .Net 1 01-11-2006 08:20 PM
FAIL TO LOAD THE CRYSTAL REPORT USING WEB CRYSTAL REPORT VIEWER Comfort ASP .Net Web Controls 0 10-18-2004 01:35 PM
Setting a Range Parameter in a crystal report and streaming resulting report as a pdf James Wallace ASP .Net 0 10-17-2003 04:42 PM



Advertisments