Validation error message

Stimulsoft Ultimate discussion
Post Reply
becomex_jle
Posts: 39
Joined: Fri Aug 26, 2011 8:14 am
Location: Brazil

Validation error message

Post by becomex_jle »

Good morning, I have a report where there are two DataBands where one will always be filled and the other may sometimes null. For example: I have a DataBand of "expenses" and other "items", the items Datasource always always return data, but not the expense. Is there any possibility to play a MessageBox on the screen saying that the DataBand of "expenses" has no expenses or it appears in the report itself?

Thank You.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Validation error message

Post by Alex K. »

Hello,

As a way, you can use the following code in BeginRender event of report:

Code: Select all

DataSourceName.Connect();
if (DataSourceName.DataTable.Rows.Count == 0)
	MessageBox.Show("Empty!")
Thank you.
becomex_jle
Posts: 39
Joined: Fri Aug 26, 2011 8:14 am
Location: Brazil

Validation error message

Post by becomex_jle »

Aleksey wrote:Hello,

As a way, you can use the following code in BeginRender event of report:

Code: Select all

DataSourceName.Connect();
if (DataSourceName.DataTable.Rows.Count == 0)
	MessageBox.Show("Empty!")
Thank you.
Problem solved.

Thank You.
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Validation error message

Post by Andrew »

Hello,

Great!

Thank you for letting us know.
Post Reply