Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace duplicate with empty space
Message
From
10/06/2008 05:33:26
 
 
To
10/06/2008 05:24:47
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01322771
Message ID:
01322772
Views:
9
Today in another forum, Anders Altberg posted a good answer to the very same question:
>>
This can easily be done in reports. There's a report field property setting for not displaying repeated values.

In a grid you can get this effect when you show two cursors with a relation set between them in one grid. If you use code like this:
USE Mytable AGAIN ALIAS xx IN 0 Order xx
SET RELATION TO dtoc(date,1) + alltrim(type)+str(voucher,4) INTO xx IN table
SET SKIP TO xx IN Mytable
SELECT mytable

Then set up a grid with the expression dtoc(Mytable.date,1) + alltrim(mytable.type)+str(mytable.voucher,4) in one column and the other columns from xx

You could of course also have a grid of mytable with all the fields except date,type, voucher.
Show these fields in three textboxes over the grid. Refresh them in the grid's AfterRowColChange. That's probabvly what I would do as first choice if I was designing a form, not a report.
>>



-Stefan



>Dear Experts
>
>Table1 has following indexing
>index on dtoc(date,1) + alltrim(type)+str(voucher,4) to abc
>
>Data in Table1 is as
>
>date---Voucher-type-amount
>9/6/2008---1---SR---500
>9/6/2008---1---SR---600
>9/6/2008---2---SR---200
>9/6/2008---2---SR---300
>10/6/2008--1---SR---400
>10/6/2008--1---SR---700
>10/6/2008--1---SC---350
>10/6/2008--1---SC---200
>
>I want to display empty DATE, VOUCHER and TYPE fields where date+type+voucher is same
>
>Following data view is required
>
> date---Voucher-type-amount
> 9/6/2008---1---SR---500
> --------------------------600
> 9/6/2008---2---SR---200
> --------------------------300
> 10/6/2008--1---SC---350
> --------------------------200
> 10/6/2008--1---SR---400
> --------------------------700
>
> Please help
Previous
Reply
Map
View

Click here to load this message in the networking platform