CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 How to show Grid with no records

Print topic Send  topic

Author Message
mramirez18

Posts: 56
Posted: 08/21/2005, 6:02 AM

I have default page with 3 search options. Currently the default is displaying all the records in the grid. What is the procedure to show no records in GRID.
View profile  Send private message
peterr


Posts: 5971
Posted: 08/21/2005, 12:31 PM

Please refer to this article:
http://support.yessoftware.com/kb_article.asp?article_id=65
This one may also be helpful:
http://docs.codecharge.com/studio/html/ProgrammingTechn...s/HideGrid.html
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Manny
Posted: 08/22/2005, 12:43 AM

I have worked out that i need to use the following example

if (FormName.command.Where = "") then
Form.command.Where = "FieldName = impossible_value"
end if

My Form name is Lender
My Field names in Search Field are loan_choice_id, mtype_id and state_id

Tables are Lender,State,Choice and Mtype.

Can someone provide me with a real example or help me plug-in my values.
peterr


Posts: 5971
Posted: 08/22/2005, 1:02 AM

Hopefully this will work:
if (Lender.command.Where = "") then  
Lender.command.Where = "state_id = -1"  
end if

_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Manny
Posted: 08/22/2005, 1:06 AM

Error Type:
Microsoft VBScript compilation (0x800A03F7)
Expected 'Function'
/crates/default_events.asp, line 13, column 4
end if
peterr


Posts: 5971
Posted: 08/22/2005, 1:11 AM

Did you use the Before Execute Select event of the "Lender" grid?
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
manny
Posted: 08/22/2005, 2:38 AM

Yes.
Manny
Posted: 08/22/2005, 4:21 AM

The error is no longer coming up, but the grid still shows all the records.
Manny
Posted: 08/22/2005, 4:23 AM

'BindEvents Method @1-87B1CA8C
Sub BindEvents()
Set Lender.DataSource.CCSEvents("BeforeExecuteSelect") = GetRef("Lender_DataSource_BeforeExecuteSelect")
Set Lender1.DataSource.CCSEvents("BeforeExecuteSelect") = GetRef("Lender1_DataSource_BeforeExecuteSelect")
End Sub
'End BindEvents Method

Function Lender_DataSource_BeforeExecuteSelect() 'Lender_DataSource_BeforeExecuteSelect @2-7387EEE7

'Custom Code @374-73254650
' -------------------------
if (Lender.command.Where = "") then
Lender.command.Where = "loan_choice_id = -1"
end if
' -------------------------
'End Custom Code

End Function 'Close Lender_DataSource_BeforeExecuteSelect @2-54C34B28

Function Lender1_DataSource_BeforeExecuteSelect() 'Lender1_DataSource_BeforeExecuteSelect @153-FFCC0E5B

'Custom Code @375-73254650
' -------------------------
if (Lender1.command.Where = "") then
Lender1.command.Where = "loan_choice_id = -1"
end if
' -------------------------
'End Custom Code

End Function 'Close Lender1_DataSource_BeforeExecuteSelect @153-54C34B28

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.