Re: How about this? by KL
KL
Thu Feb 10 12:01:33 CST 2005
One other suggestion:
When parsing your values into a multirow array (or cursor) you can also
populate the row above a set of values with the "Title" of the value.
Then, when displaying the grid, you can change the backcolor of every
other row, so the the Titles above each value will be highlighted. This
can make the grid much easier to read and makes the values easier to
read as well.
KL wrote:
> I had to do something similar in an early report many years ago. Here's
> one easy way of doing it:
>
> Sum all your records into an array, which will have one row and x number
> of columns
>
> Create a loop and parse through the array, writing the results of the
> single row array into a multirow array or cursor, then display the
> results in a listbox with lines, or in a grid. If the data is for
> viewing only, turn off the scroll bars and make it readonly.
>
> This may sound cludgy, but it works great and is very fast. It keeps
> you from having to worry about drawing lines, etc.
>
> kd wrote:
>
>> Hi Tom,
>>
>> Thanks for your response.
>>
>> In my case, though I have a join on several tables, the result would
>> always be one record. Since it is a join of several tables the data
>> fetched from the database is large enough to be displayed in several
>> rows. The rows of the table does not represent the rows the cursor.
>> The cursor has just one row. I hope I am successful in making the
>> scenario clear this time.
>>
>> I have used lines to create rows and columns on the form. Would like
>> to know if there is something like a table like the one MS word
>> provides, in vfp8 which can be used as is by specifying the number of
>> rows and columns, instead of having to literally create rows and
>> columns using lines.
>>
>> Regards.
>> kd
>>
>> "tom knauf" wrote:
>>
>>
>>> Hi,
>>>
>>> mhh,
>>>
>>> I thought of generating a cursor where each row/column reflects the
>>> values
>>> you want (sums, join,..), then you may use a grid on that cursor (not
>>> on the
>>> origin tables). We do so for presenting something like a "report in a
>>> form"
>>> with some of our apps. The grid has an underlying cursor reflecting
>>> sums,
>>> variance, user remarks, ... of multiple tables.
>>>
>>> 2. Maybe you can put the resulting ms-excelsheet (see below) as
>>> object (ole)
>>> on the form.
>>>
>>> 3. Otherwise you could setup the form with manual calls of
>>> addobj(textbox)
>>> with the size and values you need. I think that maybe a very boring
>>> job to
>>> do.
>>>
>>> HTH
>>> Tom
>>>
>>>
>>>
>>> "kd" <kd@discussions.microsoft.com> schrieb im Newsbeitrag
>>> news:A0273314-8D47-4061-8D7B-9C654D30332E@microsoft.com...
>>>
>>>> Hello Tom,
>>>>
>>>> I think you got me wrong!
>>>>
>>>> The table that I mentioned would be on a foxprop form. I require the
>>>> table
>>>> only to display details in rows on columns in a foxpro application
>>>> without
>>>> using a grid.
>>>>
>>>> Thanks.
>>>>
>>>> "tom knauf" wrote:
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> If i understand you correctly, I would gather the result into a cursor
>>>
>>>
>>> and
>>>
>>>>> use office automation to transfer the data into an excelsheet.
>>>>> If the appearance always looks the same , insert it into an existing
>>>
>>>
>>> sheet.
>>>
>>>>> If not : format the sheet.
>>>>>
>>>>> HTH
>>>>> Tom
>>>>>
>>>>>
>>>>> "kd" <kd@discussions.microsoft.com> schrieb im Newsbeitrag
>>>>> news:9DC2B72F-67ED-4EC8-B3B1-69E56F4CDBAA@microsoft.com...
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I think this question sounds stupid!
>>>>>>
>>>>>> Anyway, here it goes...
>>>>>>
>>>>>> Is it possible to draw a table with rows and colums like in MS
>>>>>> Word? I
>>>
>>>
>>> did
>>>
>>>>>> think of using a grid. But, I won't be populating the grid with
>>>
>>>
>>> multiple
>>>
>>>>>> record from a table/s. The contents to be displayed on the table
>>>>>> would
>>>
>>>
>>> be
>>>
>>>>> a
>>>>>
>>>>>> result of a join of several tables which fetches exactly, one
>>>>>> entity's
>>>>>
>>>>>
>>>>> data
>>>>>
>>>>>> from all the tables in the database. But I would be displaying the
>>>
>>>
>>> whole
>>>
>>>>> lot
>>>>>
>>>>>> of information in a several rows and columns.
>>>>>>
>>>>>> Can anybody suggest me how to do this?
>>>>>>
>>>>>> Thanks.
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>