SSRS Report page Header issue

This question is not answered

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
All Replies
  • 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

    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.

  • 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

  • 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.

  • 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

    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.

  • 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

  • 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

    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.

  • 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

  • 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

    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.

  • 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.

    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.

  • 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

  • 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

  • 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