Re: DataRepor

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Veign (NOSPAMinveign_at_veign.com)
Date: 07/14/04


Date: Wed, 14 Jul 2004 12:24:58 -0400

Sure it is...You could use a disconnected recordset and change the DataField
property at runtime on the report...

So Basically:
- Pull the records from the database
- Disconnect the recordset
- Change the DataField source at runtime like:
        drMyReport.Sections("Section1").Controls("txtSomeField").DataField =
"New Field"
- Connect the recordset to the DataReport like:
        Set drMyReport.DataSource = RS

So what you are doing is creating the displayed fields from the database at
runtime. Of course you may have to play around with the positioning of the
Controls on the form but this gives you a basic idea...

Example of Disconnected recordset with Datareport:
www.veign.com/vrc_codeview.asp?type=app&id=84

-- 
Chris Hanscom
MVP (Visual Basic)
http://www.veign.com
--
"Dib" <dNOSPAMshahene@conNOSPAMsoftware.com> wrote in message
news:%23qtJyobaEHA.2340@TK2MSFTNGP09.phx.gbl...
> Hi,
> How can I create a Report in VB 6 as per User Selection.
>
>
> I need to give the User the option to select the fields from the table to
> show on the Report and then run the report.
> it can be one field or 10 fields.
> Is this possible?
>
> Thanks
> Dib
>
>


Relevant Pages

  • Re: DataRepor
    ... type of Selector form to let the user select a table and fields to display. ... You will also have to handle the positioning of the controls on the report ... >> Sure it is...You could use a disconnected recordset and change the ... >> Example of Disconnected recordset with Datareport: ...
    (microsoft.public.vb.general.discussion)
  • Re: Populate unbound controls on report using VBA
    ... is that when I run the report, I get the student information fine, then ... a student receiving 15 points on the first submission, ... I have no problem opening the recordset, ...
    (microsoft.public.access.reports)
  • UPDATE: Populate unbound controls on report using VBA
    ... is that when I run the report, I get the student information fine, then ... a student receiving 15 points on the first submission, ... I have no problem opening the recordset, ...
    (microsoft.public.access.reports)
  • Re: ADP report based on stored procedure.
    ... sylvain aei ca (fill the blanks, no spam please) ... report to a recordset; however, there have been reports of people having ... that is based on a ado recordset. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Populate unbound controls on report using VBA
    ... is that when I run the report, I get the student information fine, then ... a student receiving 15 points on the first submission, ... I have no problem opening the recordset, ...
    (microsoft.public.access.reports)