Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Empty Table Notification

Status
Not open for further replies.

BBobinski

Programmer
Oct 2, 2002
9
US
I have a Table entitled rpdnotification that has the following fields - subject, authority, startdate, narrative, and rundays. It prints out on a report for x number of days (Normally the user will select 5 days). Sometimes there are no notifications. Is there a way to load a message into the subject field that if the table has 0 records than subject would equal "None at this time"?
 
You have a table (SQL?) and a report (Crystal-Reports? JReport? some self build one? some RDBMS-specific?) and a subject-field (email? report-subject?).

Is your question somehow related to java?

seeking a job as java-programmer in Berlin:
 
I use JSP. What I was basically looking for was that if the rpdnotification table is empty - prompt a line where the data would normally go saying "None at this time" using JSP.
 
And what do you have so far?
Without more information I only may answer:

Code:
int cnt = 0;
while (rs.next ())
{
   ++cnt;
   // fill fields...
}
if (cnt == 0) fillFieldXY ("None at this time");

seeking a job as java-programmer in Berlin:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top