locked
Value in Textbox in report RRS feed

  • Question

  • User843229376 posted

    I am developing my report using Stored Procedure. In my Stored Proc , I have a parameter that can take more than one value.

    Let say that Parameter in Stored Proc is @CountryId

    So I input in @CountryId values (11,12,14). Corresponding to these values I will have CountryNames.

    1.)What I want is to display in textbox the names of Countries corresponding to values in @CountryId (this textbox will there only on the First page of report, to show user which countries for , report has been generated)

    I am using a Matrix to display result of my stored proc and has CountryId as my Row Group and also applied page on CountryId, so each time a new CountryId is there, page break will take place.

    2.) Above this I have textbox that shows the CountryName corresponding to the CountryId on that page.

    So I have two textboxes, one shows all Countries being selected(this textbox is visible only on first page)

     The Second textbox shows CountryName for the CountryId for which data is shown in MATRIX on that page( this textbox is to be shown on all pages)

    How can I do this .....Please help...its urgent...!!!

    Friday, July 8, 2011 1:01 AM

All replies

  • User843229376 posted
    //Can we use this in Dataset Properties
    
    Select CountryName from Country
    
    where CountryId in (Select Item from dbo.Split(@CountryId,','))    // Here Split is function to split a string on Comma and return string(Item)
    Friday, July 8, 2011 1:52 AM
  • User2105670541 posted

    //Can we use this in Dataset Properties
    
    Select CountryName from Country
    
    where CountryId in (Select Item from dbo.Split(@CountryId,','))    // Here Split is function to split a string on Comma and return string(Item)

    i dont think its going to work, however you can do this

    Friday, July 8, 2011 2:09 AM
  • Friday, July 8, 2011 2:23 AM
  • User1471008070 posted

    Please refer to this thread http://forums.asp.net/t/1697645.aspx, just add another textbox inside the list, then make use of Join function to join all the parameter's value.

    Monday, July 11, 2011 11:27 PM
  • User843229376 posted
    What I have is that my parameter(can take multiple values) is to be shown with other parameters on the first page of the report.
    
    For instance if my Stored procedure has three parameters
    
    1)StartDate  2)EndDate  3)Learner(can contain multiple values). So report is shown like this
    
     
    
    StartDate(TEXTBOX)      1/1/2011(TEXTBOX)                //To be shown only on first page of report
    
    EndDate(TEXTBOX)         12/12/2011(TEXTBOX)         //To be shown only on first page of report
    
    Learner(TEXTBOX)        Andy,Mark,John(TEXTBOX)       //To be shown only on first page of report , three learners are selected;individual report
    
                                                                                  //for each to be shown
    
    //Then comes report part . First report for Andy is shown,then for Mark and then John
    
    Learner (TEXTBOX)   Andy(TEXTBOX)
    
    //Report for Andy is shown here
    
    
    
    
    
    Learner(TEXTBOX)  Mark(TEXTBOX) ( for every new Learner there will be page break, which is already done in my report
    
    //Report for Mark is shown here
    
    
    
    
    
    Learner(TEXTBOX)    John(TEXTBOX)
    
    //Report for John is shown here
    
    
    
    
    
    
    //Now my problem is how to Show all Learners values in textbox on the first page.
    
    
    Saturday, July 16, 2011 2:37 AM