DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Lyndon Guest

    Passing parameters from a prompt form to a Crystal Report Form


    Hi,

    I have an application where i prompt a user for an identifier on one form,
    then have them click a button to bring up a Crystal report where the crystal
    report viewer is embedded in a second form. The identifier is intended to
    be a parameter to be used either for the generation of a dataset used by
    the crystal report, or for a stored procedure used by a crystal report. On
    Crystal's site and other places/publications I have seen lots of examples
    of creating data sets or stored procedures as the datasources for crystal
    reports including the use of the parameters. But these examples will hardcode
    a parameter value into the code which either generates the data set or runs
    the stored procedure in advance of crystalreports displaying the results.

    Does anyone know how i can pass a parameter provided on an initial form to
    a second form containing both a crystalreport viewer and inherent launching
    code for the crystal report? I have gotten report to work with parameters
    hard coded into the code on the form containing the crystal report viewer,
    just not passing the paramater to it from a previous form.

    Can selective reports be generated this way, or does one have to use to parameter
    objects that crystal reports itself provides as the means to generate a filtered
    report?

    Thanks- BTW let me know if this a silly question

  2. #2
    VBDotNet Team [MS] Guest

    Re: Passing parameters from a prompt form to a Crystal Report Form

    Hi,

    You can pass parameters to the second form by either 1) creating a
    parameterized constructor, or 2) setting a public property on the second
    form before the call to Form.Show().

    Good luck,
    Paul Kuklinski
    Developer VB.Net

    --
    This posting is provided "AS IS" with no warranties, and confers no rights.
    "Lyndon" <lvsundmark@telus.net> wrote in message
    news:3d09f849$1@10.1.10.29...
    >
    > Hi,
    >
    > I have an application where i prompt a user for an identifier on one form,
    > then have them click a button to bring up a Crystal report where the

    crystal
    > report viewer is embedded in a second form. The identifier is intended to
    > be a parameter to be used either for the generation of a dataset used by
    > the crystal report, or for a stored procedure used by a crystal report. On
    > Crystal's site and other places/publications I have seen lots of examples
    > of creating data sets or stored procedures as the datasources for crystal
    > reports including the use of the parameters. But these examples will

    hardcode
    > a parameter value into the code which either generates the data set or

    runs
    > the stored procedure in advance of crystalreports displaying the results.
    >
    > Does anyone know how i can pass a parameter provided on an initial form to
    > a second form containing both a crystalreport viewer and inherent

    launching
    > code for the crystal report? I have gotten report to work with parameters
    > hard coded into the code on the form containing the crystal report viewer,
    > just not passing the paramater to it from a previous form.
    >
    > Can selective reports be generated this way, or does one have to use to

    parameter
    > objects that crystal reports itself provides as the means to generate a

    filtered
    > report?
    >
    > Thanks- BTW let me know if this a silly question




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links