Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Property Bag


Message #1 by krunch97@m... on Wed, 11 Apr 2001 08:56:15 -0400
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C0C448.695D3760
Content-Type: text/plain;
	charset="iso-8859-1"

Then you must undertake the program of a lifetime (heh).  To become a real
Jedi....

You will need to do several things.  First, the Grid idea is ok for allowing
the user to see what choices are available to them.  You could allow them to
drag & drop a Grid Cell onto another Form (in which this other Form would be
the Report Layout - similar to the way Crystal and VB DataReports work).

Secondly, you will need to store all the information about the Cell that was
dropped onto the Form like which Section it's in, what is it's position,
alignment, Text Size, etc.   This information will need to be stored within
Custom Objects that you can create (very simple).

Third, you will need to persist those Objects to a Template file which will
be used later to recall all the information.


  _____  

I am not sure how you plan to Display your Report.  Are you using Crystal or
the DataReport?  If so, the Properties of your Objects will need to pertain
to the Properties available with that particular Report Designer.

I am working on a similar idea.  However, more and more I find that End
users hate Reports (unless it is something they need to store a hard copy
of).  I am designing a Dynamic Tree View where the User can specify how they
want the Data sorted in the Tree at Runtime, and then save their various
Views within Templates.

The idea behind it uses SHAPE Recordsets, ADOX, ADO and my own Objects for
Grouping the Data.  I do not have a lot of time to play with it so it sits
in "Development" mode.

Like I said, read Deborah Kurata's Book ("Doing Objects in Visual Basic 6")
if you need help on Objects.  It is the best book I have found on Object
Oriented Programming.

-----Original Message-----
From: sharad [ mailto:sharad_nair@u... <mailto:sharad_nair@u...> ]
Sent: Friday, April 13, 2001 6:39 PM
To: professional vb
Subject: [pro_vb] Re: [Re: [Re: [RE: Property Bag]]]


sorry tim,
i guess i messed up the whole point...actually its not an ADHOC report..to
be
specifiec it a financial report generater..the module has already been
completed..i used apex true grid to design it..it has 3 tabs header
..detail..and footer...the no of rows in all the sections are stored in a
table and while printing those tables are used to printing the exact
layout..but my idea was to present the user with a form with say 3 section
clearly separated..have activex ctrl for each process and they would just
drag
and drop those controls to the required sections..rather than entering rows
in
the grid as it is now..but the whole problems occurs storing the actual
layout
to be displayed to the user the next time..
any idea is there any specific format to store..like vb stores the forms in
a
project..
i hope this explains my point clearly...
cheers ,
sharad


Tim Mccurdy <tmccurdy@c...> wrote:
So you are saying this is ADHOC reporting.  In that case (since ADHOCs only
have Column Headers with the data below them in the Report) all you would
need to do is Save the SQL Statement to retrieve the Records into a Text
file.

What you will need to do is maybe add Controls to a DataReport or something
Dynamically at runtime to accomodate for all the Fields to be displayed.  I
am sure there is source code all over for this.

-----Original Message-----
From: sharad [ mailto:sharad_nair@u... <mailto:sharad_nair@u...> ]
Sent: Thursday, April 12, 2001 7:25 PM
To: professional vb
Subject: [pro_vb] Re: [Re: [RE: Property Bag]]


ya tim,
something of that sort..
a form allowing the end user to customize the layout according to their
preference..i may be able to get the records based on that from the
databse..but my problem occurs to display the exact layout back to the user
the next time they open the form..something like vb does for us..in the
IDE..
any ideas to share??/
cheers
sharad


Tim Mccurdy <tmccurdy@c...> wrote:
Hmm, actually, this may be very complicated.  Are u designing a "Designer"
for a developer to use or something an End User to use to customize like an
Ad-Hoc reporter?

-----Original Message-----
From: sharad [ mailto:sharad_nair@u... <mailto:sharad_nair@u...> ]
Sent: Wednesday, April 11, 2001 8:31 PM
To: professional vb
Subject: [pro_vb] Re: [RE: Property Bag]


hi tim,
ur explanation of property bag was worth appreciation...i wonder if u could
help in process of designing a report designer..what i actually intend to do
is to build a report writer using VB..wherein i'll be having all my controls
as activeX controls..just like the toolbar..the user will need to drag and
drop and design the report layout they desire..it seemed to be easy even for
me at first thought..but my problem occurs in getting back the layout the
next
time user loads that form...where do i store that design layout...which
format...
I am sure u might have a thought to pass...
thankz
sharad nair
PBS
Ireland


Tim Mccurdy <tmccurdy@c...> wrote:
A Property Bag is a very powerful Object.  It is used within ActiveX
Controls to store what the Developer has set each Public property to and
persist that information to the Property Bag in order to retrieve it at
runtime (how else do you think a CommandButton knows to be Disabled when
that property is set at design time?).

Also, a Property Bag can be used to Persist Data from an ActiveX DLL
(meaning persist all the Objects within the Collection of Objects to a
Binary File) and retrieve them for use later on.  This is very helpful if
you are creating a program that can use Templates and save those Templates
to Files for retrieval later on.

If you need a very good example, put a CommandButton on a Form, set some
properties, then Close the Form.  Go into the Directory where you saved the
Form and open it with WordPad.  You can look through all the Code in the
Form and see every PropertyBag and every Properties settings within it.

Read Deborah Kurata's book "Doing Objects in Visual Basic 6"  which will
explain everything.  This is a great book!

-----Original Message-----
From: krunch97@m... [ mailto:krunch97@m...
<mailto:krunch97@m...> ]
Sent: Wednesday, April 11, 2001 8:56 AM
To: professional vb
Subject: [pro_vb] Property Bag


When you talk about property bag, what do you mean.  I heard of property
bag but no one I know knows really what it is meant by.  Please give a
general description and a simple example.

Thanks for your help in advance,

Fredrick J. Krantz






  Return to Index