none
Reportviwer local and Dataset RRS feed

  • Question


  • I am using the reportviewer processing mode  as local in my winform.

    I have three datatables in my dataset

    datatable1 contains the header infromation
    datatable2 contains the subheader information
    datatable3 contains the body information

    datatable3 contains the information about different items. Each item can be very lengthy and sometimes it can be of two or three pages.



    My question is 

    datatable1-- header information needs to repeat on every page.
    datatable3 -- If the item is finished in the mid of the page, next item should should start in a different page.

    Also, how to add the background image for the report

    Please suggest me

    Thanks
    Sunday, May 17, 2009 12:45 AM

All replies

  • Answer to 1st query(datatable1-- header information needs to repeat on every page.):

    1. Open RDLC File.
    2. from the Menu Items, go to: Report > Page Header.
    3. A Page Header Scetion would appear on your RDLC File on top.
    4. Put your- datatable1 in this Page Header Region.
    5. Done. Now, this information would appear on every page.
    Regards, Lakra :) - If the post is helpful or answers your question, please mark it as such.
    Monday, May 18, 2009 1:47 AM
  • Answer to your 2nd query(datatable3 -- If the item is finished in the mid of the page, next item should should start in a different page.):

    1. Go to datatable3's Properties.
    2. Set it's property- PageBreakAtEnd = True.
    3. Done. Now, at the end of the datatable3 - each time, there would be a Page Break for further items to start from new page.
    Regards, Lakra :) - If the post is helpful or answers your question, please mark it as such.
    Monday, May 18, 2009 1:51 AM
  • Answer to 3rd query(how to add the background image for the report):

    Please Refer: http://sites.google.com/site/abylexsite/Home/dotnet/images-in-reports-microsoft-reportviewer--through-code-at-runtime-dynamically
    http://www.c-sharpcorner.com/UploadFile/abylex/ImagesInReportsMicrosoftReportViewerThroughCodeAtRuntimeDynamically05112009051000AM/ImagesInReportsMicrosoftReportViewerThroughCodeAtRuntimeDynamically.aspx

    Using the information from above link(s), you can also set the background image to the Report from RDLC's Body >  BackgroundImage-Properties.
    Regards, Lakra :) - If the post is helpful or answers your question, please mark it as such.
    Monday, May 18, 2009 1:57 AM
  • Abhijeet,

    Previously I have placed a table in the Body of the report. So I could assign the datasetname property = datatable1. But when I try to place a table in the report, It says that table or lists or not allowed to place in the header. Could you please tell me how to assign the datasource to the textbox fields.

    Thanks
    Monday, May 18, 2009 5:54 AM
  • In the header, first place a Rectangle-control. And, then place the Table-control inside this rectangle. This should work.

    What about your other 2 queries? Are they working fine now?
    Regards, Lakra :) - If the post is helpful or answers your question, please mark it as such.
    Monday, May 18, 2009 6:00 AM
  • For this, I would like to have a pagebreak for every row. Say for example, I have placed table3 in the body of the report and assigned datasetname = datatable3. So, Now I need the pagebreak for every row of the table. As soon as it finishes, the first row of table3, next row should start from a new page. Any ideas?

    Thanks
    Monday, May 18, 2009 6:32 AM
  • Could you summarize your exact and all the requirements for the Report?
    I mean- a diagram or picture would be great.
    It would help in understanding what you exactly need and in suggesting you with appropriate solution.
    Regards, Lakra :) - If the post is helpful or answers your question, please mark it as such.
    Monday, May 18, 2009 6:49 AM

  • Eventhough I have placed my table in a rectangle in the header of the report, I am getting an error after processing the report like this "Table table1 is in the page header or footer. Dataregions and subreports cannot be used in page headers or footers".

    For the remainig queries

    I would like to explain it again

    From the below diagram,
    1) I need this header information on every page.
    2) Also, after end of each record from table2, i.e in the body, it should start with a new page with the header information. The header information will be same.  

    3) My other question about the image is... If the Department is of type Software or Hardware then the page of that particular report should contain a background image.

    4) In the last page of the report I need to print 4 images per image of the employees in table2. This last page should start in a new page.

    Hope this explains..

    Thanks


    Header:

    Employment:

    =Fields!EmpNo.Value

     

    Title:

    =Fields!title.value

    desc

    Fields!desc.value


    -- table1


    Body:

    ID

    Details

    Department

    =Fields!ID.Value

     

    =Fields!Details.Value

     

    =Fields!Department.Value

     

     -- table2
    • Edited by winnster Monday, May 18, 2009 8:03 AM
    Monday, May 18, 2009 7:53 AM
  • Please see the following link: http://sites.google.com/site/abylexsite/rdlc-header
    You can download the attachment which has an RDLC file to implement as per your image and description.

    For your second query on background image:
    Please see the follwoing link on how to have a dynamic behavior in Reports based on values, etc:
    http://www.c-sharpcorner.com/UploadFile/abylex/DynamicBehaviorReportsUsingMicrosoftReportViewer04152009002826AM/DynamicBehaviorReportsUsingMicrosoftReportViewer.aspx?ArticleID=817e7b96-2552-4510-ba22-0b1082397333

    or http://sites.google.com/site/abylexsite/Home/dotnet/dynamic-behavior-in-reports-using-microsoft-report-viewer

    Regards, Lakra :) - If the post is helpful or answers your question, please mark it as such.
    Monday, May 18, 2009 8:32 AM
  • How did you assign the values to the textbox fields in the header

    Eventhough I have placed my table in a rectangle in the header of the report, I am getting an error after processing the report like this "Table table1 is in the page header or footer. Dataregions and subreports cannot be used in page headers or footers".

    Could you suggest me about the pagebreak afterevery record of table2


    Thanks,

    Monday, May 18, 2009 3:24 PM
  • Answer to 1st query(datatable1-- header information needs to repeat on every page. ):

    1. Open RDLC File.
    2. from the Menu Items, go to: Report > Page Header.
    3. A Page Header Scetion would appear on your RDLC File on top.
    4. Put your- datatable1 in this Page Header Region.
    5. Done. Now, this information would appear on every page.
    Regards, Lakra :) - If the post is helpful or answers your question, please mark it as such.
    hi,
      I am using two Data Adapter as datatable1 and datatable2 Amount column is placed in two table how can i subtract and get values in the report.

    Best Wishes
    Monday, May 25, 2009 7:43 AM
  • Answer to your 2nd query(datatable3 -- If the item is finished in the mid of the page, next item should should start in a different page.):

    1. Go to datatable3's Properties.
    2. Set it's property- PageBreakAtEnd = True.
    3. Done. Now, at the end of the datatable3 - each time, there would be a Page Break for further items to start from new page.
    Regards, Lakra :) - If the post is helpful or answers your question, please mark it as such.


    hi,

    i have one table and i placed the fields in it may be 6 rows.

    now i tried this pageBreakAtEnd = True; but, it want work

    i have 23 diffrent records but those all are displaying within 5 or 6 pages...

    please help.....

    Thursday, December 9, 2010 10:16 AM