none
any concern with this my report.rdlc? RRS feed

  • Question

  • Hello guys, i'm wondering how can i code my report rdlc, i have included controls in it which follows couple of text box but i wanna put the values from the my current opened form which has the reportviewer in it. i want to insert the values ino the report.rdlc textboxes. like for instance i have a textbox for date and time now. i wanna fill up the value through the program not drag and drop including value from the design mode. how can i code this any concern please?

    im using reportviewer in my form. so i need it to refresh everytime the i click the selected item in listview so it needs to repopulate the values in my rdlc file but i have already instantiated controls with name i just dont know how to access it from the form.

    i'll appreciate your suggestions. thanks

    • Moved by Harry Zhu Friday, April 16, 2010 2:49 AM (From:Visual C# General)
    Monday, April 12, 2010 9:56 AM

All replies

  • You can use Report Parameter for filling the values.

    Check this thread for more information

    http://dbaspot.com/forums/ms-sqlserver/400679-reportviewer-how-fill-text-box-data-parent-form.html


    Thanks,
    A.m.a.L
    [MVP Visual C#]
    Dot Net Goodies
    Don't hate the hacker, hate the code
    Monday, April 12, 2010 10:39 AM
  • thanks but amal im not going to get the values from database what i am trying to do is to get transfer the data from selected item in listview to the textboxes in rdlc file. because its just a form and im going to move the values from the form to report.rdlc which will be displayed in reportviewer i just dont know how can i modify the template form i created in report.rdlc it has like 5 textbox.

     

    what im tryin to do is something like that

     

    lets say this is my report.rdlc

    i have textbox1, 2, 3, 4, 5 in it.

    and in the form where i have my reportviewer there is a listview that needs when i click an item in the list view it must copy the the selecteditem and expand the 5 columns values to the 5 textboxes.

    something like 

    txtbox1.text = lview.FocusedItem.SubItems[0].Text;

    txtbox2.text = lview.FocusedItem.SubItems[1].Text;

    txtbox3.text = lview.FocusedItem.SubItems[2].Text;

    txtbox4.text = lview.FocusedItem.SubItems[3].Text;

    txtbox5.text = lview.FocusedItem.SubItems[4].Text;

     

    where my problem is there is no such a code mode in report.rdlc but just drag and drop control tool.

     

    Monday, April 12, 2010 11:41 AM