Question Status

Unanswered
veeru ogu asked a question on 16 Sep 2013 9:49 PM

Hi All,

    I have an doubt reg ssrs report page header

   in all of my customized reports  page header having the Logo,Address,ReportTitle,Execution time and Date.
      Logo ,CompAddress and company name are getting one rdp class
through this rdp i sent to the report .
In this scenario even the body of the report is empty page header showing , how can i restrict the page header portion if the body is empty .
   How to approch this , I have to implement this for many customized reports.
 
Thanks
----------
veer
Reply
Dominic Lee responded on 17 Sep 2013 12:35 AM

Hi Veer,

What about...

- Add a flag/parameter at the RDP class which gives you the data for report body. This flag will indicate whether there's any data in the report body.

- In all report header controls, modify the "Hidden" property to something like:

iif(<body rdp have data>,"false","true")

Regards,

Dom

kind regards,

Dominic Lee

My blog | PBC

This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Reply
Martin Mikes responded on 17 Sep 2013 12:42 AM

Hi Dom,

I used similar way as you suggest but still after hidden fields it remain empty space after page header. On viewer looks good but export to pdf or print it looks bad. Did you solve it?

Martin

Reply
veeru ogu responded on 17 Sep 2013 2:07 AM

Hi Dolee,

   Thank you very much for your reply .

That means every control on the page header we need to write the expression in hidden prop.

this is the only way or any ither ways to hide.

Reply
Dominic Lee responded on 17 Sep 2013 2:10 AM

Hi Martin,

I assume your problem is abit different than Veer's. You would like to hide some controls in the report body. And your problem is after hiding those controls they are still taking up space?

Regards,

Dom

kind regards,

Dominic Lee

My blog | PBC

This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Reply
veeru ogu responded on 17 Sep 2013 3:05 AM

Hi Dolee ,

  How can i check if the report body having data or not

if data exist in a body how to pass parameter to the rdp class

Thanks

veer

Reply
Dominic Lee responded on 17 Sep 2013 7:20 PM

Hi Veeru,

As you mention you are using RDP class to pass header info, I assume you are using RDP class for report data as well.

Then:

- Add a NoYesId type parameter (e.g. dataExists) in data contract class.

- Create a UIBuilder class if you don't already have one, then hide the dataExists parameter in the dialog.

- Override the preRunModifyContract method of the controller class. Base on user selections, determine whether report data exists and update dataExists accordingly.

You'll then be able to see and use the dataExists parameter in your report model project.

Regards,

Dom

kind regards,

Dominic Lee

My blog | PBC

This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Reply
veeru ogu responded on 17 Sep 2013 9:18 PM

Hi Dolee,

 Thank you very much for your valuble reply.

I have to customize many reports all the reports having the header in this header contains Logo ,Company address,Company Name...etc

For that till now i am using rdp class for header portion.

Is any best way to show the header portion other than using rdp class.

if i use the rdp class for header portion i need to deevlop the UIBuilder class for all the reports so can you guide me the best approch.

Regards

-----------

Veer

Reply
Dominic Lee responded on 18 Sep 2013 7:04 PM

Hi Veer,

I don't have any opinion on a best way for this. But I can share what I'd do if I was planning something similar to yours. I probably would embed the header related code in a base class. (e.g. CustomDPBase) then extend this base class to create classes for each report.

- It's similar to your method in that the header-stuff only needs to be declared once.

- It has the flexibility to override header related methods in the descendents for report specific behavior

- Related to your original question, I could just delete all values from header tmp table within processReport method if it was found that there is no report data. Also I won't have to add extra parameter or add UIBuilder class in the data contract.

Regards,

Dom

kind regards,

Dominic Lee

My blog | PBC

This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Reply
Dominic Lee responded on 18 Sep 2013 10:36 PM

Hi Veer,

I just came across this post: www.agermark.com/.../hiding-data-member-attribute-from.html

So the UIBuilder class is not needed if we simply wanted the attribute to be invisible in the dialog.

Cheers.

kind regards,

Dominic Lee

My blog | PBC

This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Reply
venkatesh vadlamani responded on 19 Sep 2013 9:21 AM

If body is empty why do you want to print it is the question??

i do feel your question is last page should not render in such scenario since you dont have anything to print

try Restricting the blank spaces below you report design controls in body.

After executing the iterative control the SSRS assumes blanks space them is to executed and your report has that and based on your report page size setting this if a page ends there will be additional page at the end.

Put you efforts in controlling this veer it would be easier

Reply
veeru ogu responded on 19 Sep 2013 9:46 PM

Hi Venkatesh,

    Thank you for your reply

I think your not understand my  query?

i have to do many customized reports , in every report i have to print CompLogo,Address, so for that i created an RDP Class used for all the reports .

In that scenario header portion is 1RDP  class and for report body have 1RDP class,so if body empty also report header portion shown because of suparate RDP class .

for that i want to restirct if body empty , i want to show the msg like REPORT EMPTY.

Can you share any idea for this.

Regards

-----------

veer

Reply
venkatesh vadlamani responded on 21 Sep 2013 3:29 AM

For each iterative control you have no rows message can be used.

Hiding the header values is pretty easy i guess.

Use  Cdbl(ReportItems!TextBoxNum.Value) for some distic text box in your tablix which contains some value like Amount or some interger etc. If this value is null pleas set the hidden to true.

Note this will always execute with last instace value of the text box in the iterative control under the current page scope if you want first please use the first(reportItems!TextBox.Value) instead

hope this helps

regards

Venkatesh

Reply