Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help on GRID Required
Message
De
10/04/2013 14:27:02
 
 
À
10/04/2013 13:34:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01570559
Message ID:
01570649
Vues:
38
>>>>(Repeated Thread)
>>>>
>>>>Taken Some Data In a Cursor 'SEARCHREPORT ' using Select command,I have designed a GRID. The GRID initially displays all the records. The Total of the column is also displayed at the end/bottom of the grid..
>>>>
>>>>Now, I have a combo which has DISTINCT Excahnge Codes. I need that when the user selects any one of the exchange code from the combo the GRID Items should Changed
>>>>accordingly and should display only the records pertaining to that Exchange code. The amount at the bottom should also change accordingly.
>>>>
>>>>
>>>>In order to do so, I placed the following Code in Click Method of combo
>>>>
>>>>
>>>>SET FILTER TO EXCHANGE=ALLTRIM(This.Value)
>>>> SUM(AMT) to C for Exchange=ALLTRIM(This.Value)
>>>>Thisform.Grid1.Refresh
>>>>
>>>>
>>>>But the things are not working. I googled a lot but could not fetch a proper solution. While I was Googling, I encountered that in such cases the Grid Losses its original Formatting, How to overcome this problem ? Kinldy also tell that if I want that the first element of my combo box should be "All Exchanges"."
>>>
>>>This is not a case where the grid should lose its formatting. That happens only if you do something that recreates the underlying cursor.
>>>
>>>You need to refresh the textbox that contains the total as well as the grid.
>>>
>>>
>>>>All Exchanges" is Not any of the exchange and therefore Not is the DISTINCT List, Currently the fisrt element is the name of one of the exchange.
>>>
>>>You didn't indicate the RowSourceType for the combo, but whatever it is, you need to add the "All Exchanges" item. In this situation, I usually use an array RowSource because it's easy to set it up the way I want it. In this case, you can use a query that pulls out the distinct values and then add the "All Exchanges" item to the resulting array.
>>>
>>>Tamar
>>--------------------------
>>I tried The below code in combo box Valid method. But it is Not working
>>
>>
>>SET FILTER TO EXCHANGE=ALLTRIM(This.Value)
>>SUM(AMTPAYABLE) to Text10 for Exchange=ALLTRIM(This.Value)
>>THISFORM.grdsorting1.Refresh && Generates Error as Function, count is invalid
>>THISFORM.TEXT10.Refresh && No change Noticed on Form
>>
>>
>>Where I am Going wrong, what should be the proper code.
>
>You still haven't indicated the RowSourcetype for the combo, so I can't help with that.
>
>For the textbox, it looks like you have no ControlSource, so Refresh won't help. Instead, just store the total to the textbox's Value:
>
>
>SUM(AmtPayable) TO nTotalPayable FOR Exchange = ALLTRIM(This.Value)
>ThisForm.Text10.Value = m.nTotalPayable
>
>
>Tamar
---

Thanks Madam, Its working Now, But with few reservations

MY Rowsource is Exchangewiseoutstanding.exchange and rowsourcetype is Alias.

Among Distinct Exchange I have populated in Combo Box, Some Have NULL Values. I am Not getting the Records in the GRID When I am Selecting NULL in Combo Box. For Other, I am getting my Grid Populated. How to resolve this issue. I need records in grid for NULL values also.

I tried to update the cursor NULL Values with 'Missing Excgange' using Update Searchreport SET Exchange='ME' where Exchange=Null. But that also didn't worked.
Harsh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform