asp.net - Adding a default message to ReportViewer -
i have reports 2 tables , chart in each. there several textboxes used headings, header , footer.
i know if want set custom message when no data returned can click on report element (table, chart, etc) , in properties, write in norowsmessage field.
however, because reports contain several elements, message repeated several times. think looks ugly.
in addition, textboxes, header , footer still shown.
is there way of hiding whole report or preventing rendering, when there no data, , showing single message on screen?
i don't know of specific functionality in ssrs, can try various workarounds mimic this:
you can hide elements in report based on rows in dataset adding rectangle same size of body report, adding report objects rectangle.
set hidden property of rectangle to:
=iif(countrows("dataset1") = 0, true, false)
this means if there no rows in dataset, rectangle , child elements hidden.
if want 1 single message displayed, add textbox bottom of report outside rectangle , set hidden property opposite expression:
=iif(countrows("dataset1") = 0, false, true)
so way, have 1 , 1 message displayed when there no rows in dataset. advantage of having more control on no rows message formatting.
you can similar thing header , footer. makes sense me display these in cases, guess depends on requirements.
so it's pretty involved set of steps might close desired result.
Comments
Post a Comment