Ssrs 2008 query question regarding in statement

I am no sql expert, so any help would be greatly appreciated.  Thank you in advance.  I want the user to enter in loan numbers they would like to reflect on a report in ssrs 2008.  The loan number field is a text field.
My sql looks like this, and the user will enter in loan numbers like ( 0001,0002,0003) - comma separated.  However, Visual studio does not like the format.  I know it must be something simple, but I can't figure out the correct syntax.
select * from dbo.vwEscrowHistoryLoan
where Lnid in @LnID

allow multiple values will solve your problem first.
only follow below steps. if it doesnt solve your problem.
1.create the table valued function in your SSMS(managementstudio)
not in report vb code.
2.
DECLARE @LnID VARCHAR(MAX)='1,2,3,4'
select
* from dbo.vwEscrowHistoryLoan
where Lnid in (SELECT DATA FROM DBO.
F_Split(@LnID,','

Similar Messages

  • SSRS 2008 R2 Problem understanding View State Validation steps

    Hi,
    Sorry, but I have some problem understanding this steps. Please help me to understand this. 
    Pasted from
    http://technet.microsoft.com/en-us/library/cc281307.aspx?lc=1033
    How to Configure View State Validation
    To run a scale-out deployment on an NLB cluster, you must configure view state validation so that users can view interactive HTML reports. You must do this for the report server and for Report Manager.
    View state validation is controlled by the ASP.NET. By default, view state validation is enabled and uses the identity of the Web service to perform the validation. However, in an NLB cluster scenario, there are multiple service instances
    and web service identities that run on different computers. Because the service identity varies for each node, you cannot rely on a single process identity to perform the validation.
    To work around this issue, you can generate an arbitrary validation key to support view state validation, and then manually configure each report server node to use the same key. You can use any randomly generated hexadecimal sequence.
    The validation algorithm (such as SHA1) determines how long the hexadecimal sequence must be.
    Generate a validation key and decryption key by using the autogenerate functionality provided by the .NET Framework.
    (Well, how to generate Validation key using .Net Framework?) In the end, you must have a single <machineKey> entry that you can
    paste into the Web.config file for each Report Manager instance in the scale-out deployment.  
    The following example provides an illustration of the value you must obtain. Do not copy the example into your configuration files; the key values are not valid.
    Copy Code
    <machineKey validationKey="123455555" decryptionKey="678999999" validation="SHA1" decryption="AES"/>
    Open the Web.config file for Report Manager, and in the <system.web> section paste the <machineKey> element that you generated. By default, the Report Manager
    Web.config file is located in \Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportManager\Web.config.
    Save the file.
    Repeat the previous step for each report server in the scale-out deployment. 
    (Do I need to repeat all 3 previous steps?)
    Verify that all Web.Config files in the \Reporting Services\Report Manager folders contain identical <machineKey> elements in the <system.web> section.
    Thanks

    Jerry,
    Thanks for the reply.
    From the above View State Validation Steps,
    For 1st step , how to generate validation key using .Net Framework?
    for 4th step, Do I need to repeate all 3 previous steps?
    Thanks
    Kp

  • Beginner question regarding switch statements with arrays....

    Doing a little project for my beginner's object oriented programming course. I've written the following code, but the switch statement won't recognize my array values....I'm required to use a switch statement in my program, which will count various character types in an external file....any insight is appreciated.
    import java.io.*;
    public class MyProg
      public static BufferedReader inFile;
      public static void main(String[] args)
        throws IOException, StringIndexOutOfBoundsException
        String line;
        inFile = new BufferedReader(new FileReader("TME5Part1.dat3"));
          char UpperCase[]= {'A','B','C','D','E','F','G','H','I','J','K','L','M',
                                          'N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};          
          char LowerCase[]=     {'a','b','c','d','e','f','g','h','i','j','k','l','m',
                                          'n','o','p','q','r','s','t','u','v','w','x','y','z'};
          char Digit[]= {'0','1','2','3','4','5','6','7','8','9'};
          char EndMark[]= {'!','.','?'};
          char MidMark[]= {',',':',';'};
        char symbol;                                                            
        int upperCaseCt = 0;                                             
        int lowerCaseCt = 0;
        int digitCt = 0;
        int endMarkCt = 0;
        int midMarkCt = 0;
          int spaceCt = 0;
          int otherCharCt = 0;
        line = inFile.readLine();          //read first line (priming read)
        while (line != null)               // Loop until end of data (empty line)
          for (int count = 0; count < line.length(); count++)  // Loop until end of line
            symbol = line.charAt(count);                    
                for (int i=0; i<=25;i++)                              
                        char uppercase=UpperCase;               //get array values for i
                        char lowercase=LowerCase[i];
                        if (i<=9) {char digit=Digit[i];}               
                        if (i<=2) {     char endmark=EndMark[i];     
                                            char midmark=MidMark[i];
                        switch(symbol)                                             
                                  case uppercase : upperCaseCt++;
                                            break;
                                  case lowercase : lowerCaseCt++;
                                                 break;
                                  case digit          : digitCt++;
                                                 break;
                                  case endmark     : endMarkCt++;
                                                 break;
                                  case midmark     : midMarkCt++;
                                                 break;
                                  case ' '          : spaceCt++;
                                                 break;
                                  default          : otherCharCt++;
                                                 break;
              line = inFile.readLine();                                   
         System.out.println("Number of uppercase letters = "+upperCaseCt);               
         System.out.println("Number of lowercase letters = "+lowerCaseCt);
         System.out.println("Nubmer of digits = "+digitCt);
         System.out.println("Number of end punctuation marks = "+endMarkCt);
         System.out.println("Number of mid punctuation marks = "+midMarkCt);
         System.out.println("Number of spaces = "+spaceCt);
         System.out.println("Number of other characters = "+otherCharCt);
    I was trying to do it this way rather than "case 'A':
    case 'B':
    case 'Z:" for each type of 'symbol'.
    Unfortunately, the switch statement is required or this would be easier with arrays and for loops...I'm not sure if my code is even possible. Thanks in advance =)
    Edited by: RiTarDid

    RiTarDid wrote:
    For sure it is the most straightforward way, but my curiosity is getting the better of me....I will most likely submit the program with the longer (value-by-value) switch method, as I haven't found anyone who can tell me how to properly reference an array value in a 'case'.Well, you can do this (basically):
    switch(some_array[some_index]) {
        case 'a':  blahblah
        case 'z':  blahblah
    }What you can't do is this:
    switch(some_scalar_value) {
      case a_whole_array:  blahblah
      case a_whole_another_array: blahblah
    }Because the latter isn't what "case" means.
    If you want to do something like the latter, use if/else statements. Here's a dirty little industry secret: people seldom use switch/case. if/else is a lot more common.
    Actually that dirty little secret isn't really particular dirty or particularly secret. It is, however, little.
    I just recall a suggestion to use arrays for any group that is more than 10 values in size;Well...sort of...
    You should use the expression of data that's appropriate for what the data is. If it's a collection of data of the same kind and an ordering, then an array or a java.util.List makes sense. If it's data that is of the same kind but no ordering and no duplicates are allowed, use a java.util.Set. (Etc. on this front.) If it's a collection of un-alike data, but which belongs in associated groups (e.g., a user's name, age, height, and whether s/he's married) then you should create a class that represents that logical grouping. Etc. If you have more than 10 individual data that can't be grouped or collected somehow, then chances are you need to rethink what's happening.
    so I wanted to see if an array could be employed for comparisons with the 'switch' statement. The program is simple enough, I'm just trying to flex my problem-solving muscle in different ways. :)
    thanks for replying, hope I can get a definite "yes, it can be done this way" or "no it can't" if there's anyone out there who knows.....The problem is that your example is contrived. So you can do a variety of things that fit into the contrivance, but they'd be weird things.
    In practice, you'd want to use the character classification methods in Character, if you wanted to characterize a bunch of characters. Or maybe a regular expression. There's no need to keep an array of characters to match against if you want to determine whether a particular character is upper case. In fact, that's the wrong way of doing things, because Character.isUpperCase is more likely to tell whether any character (not just stuff that's also an element of ASCII) qualifies as upper case.

  • Write PL/SQL query from SSRS 2008

    Hello,
    I've need of writing the following statement as query or procedure within SSRS 2008(SQL Server Reporting Services 2008) to query Oracle data.
    IF :PARAMETER1 = 1
    SELECT A1,B1,C1 FROM TABLE1
    INNER JOIN TABLE2 ON TABLE2.X = TABLE1.X
    INNER JOIN TABLE3 ON TABLE3.Y = TABLE1.Y
    WHERE TABLE1.FIELD1 = :PARAMETER1
    ELSE IF :PARAMETER1 = 0
    SELECT A1,B1,C1 FROM TABLE1
    INNER JOIN TABLE2 ON TABLE2.X = TABLE1.X
    WHERE TABLE1.FIELD1 = :PARAMETER1
    Can someone please help since I am trying to write query with IF ELSE statement or block from SSRS 2008?
    Brief scenario - I'm trying to query data from Oracle db by using Oracle data source connection(11g client) from SSRS 2008 to display on SSRS report.
    Thanks,
    JS.

    user1378136 wrote:
    Thank you for the tip and sample snippet as you mentioned it may not work, it did not work.
    Probable I did not ask the question right way. Let me ask you this. If I were to write SQL or PL/SQL (which ever is required because of IF condition) to query Oracle DB how do I do below mentioned statements,
    IF condition = true
    do something.....
    Else IF condition = false
    do something.....
    Thank you,
    JS.Typically i'd create a function that returns a ref cursor for something like this (on the Oracle database you need to query) and then call that from wherever it is required.
    create or replace function get_some_data
       p_PARAMETER1   number
    return sys_refcursor
    is
       some_ref_cursor   sys_refcursor;
    begin
       IF p_PARAMETER1 = 1
       then
          open some_ref_cursor for
             SELECT A1,B1,C1 FROM TABLE1
             INNER JOIN TABLE2 ON TABLE2.X = TABLE1.X
             INNER JOIN TABLE3 ON TABLE3.Y = TABLE1.Y
             WHERE TABLE1.FIELD1 = 1;
       ELSIF p_PARAMETER1 = 0
       then
          open some_ref_cursor for for
             SELECT A1,B1,C1 FROM TABLE1
             INNER JOIN TABLE2 ON TABLE2.X = TABLE1.X
             WHERE TABLE1.FIELD1 = 0;
       end if;
       return some_ref_cursor;
    end get_some_data;
    /So you'd return a pointer to 1 of 2 queries via this function, and the client would process it accordingly.

  • SSRS 2008 R2 is extremely slow. The query runs in less than a second in the dataset designer but if you try to view the report it takes over 10 minutes. I have read this is a bug in SSRS 2008 R2. We installed the most recent patches and service packs.

    SSRS 2008 R2 is extremely slow.  The query runs in less than a second in the dataset designer but if you try to view the report it takes over 10 minutes.  I have read this is a bug in SSRS 2008 R2.  We installed the most recent patches and
    service packs.  Nothing we've done so far has fixed it and I see that I'm not the only person with this problem.  However I don't see any answers either.

    Hi Kim Sharp,
    According to your description that when you view the report it is extremely slow in SSRS 2008 R2 but it is very fast when execute the query in dataset designer, right?
    I have tested on my local environment and can‘t reproduce the issue. Obviously, it is the performance issue, rendering performance can be affected by a combination of factors that include hardware, number of concurrent users accessing reports, the amount
    of data in a report, design of the report, and output format. If you have parameters in your report which contains many values in the list, the bad performance as you mentioned is an known issue on 2008 R2 and already have the hotfix:
    http://support.microsoft.com/kb/2276203
    Any issue after applying the update, I recommend you that submit a feedback at https://connect.microsoft.com/SQLServer/ 
    If you don’t have, you can do some action to improve the performance when designing the report. Because how you create and update reports affects how fast the report renders.
    Actually, the Report Server ExecutionLog2  view contains reports performance data. You could make use of below query to see where the report processing time is being spent:
    After you determine whether the delay time is in data retrieval, report processing, or report rendering:
    use ReportServer
    SELECT TOP 10 ReportPath,parameters,
    TimeDataRetrieval + TimeProcessing + TimeRendering as [total time],
    TimeDataRetrieval, TimeProcessing, TimeRendering,
    ByteCount, [RowCount],Source, AdditionalInfo
    FROM ExecutionLog2
    ORDER BY Timestart DESC
    Use below methods to help troubleshoot issues according to the above query result :
    Troubleshooting Reports: Report Performance
    Besides this, you could also follow these articles for more information about this issue:
    Report Server Catalog Best Practices
    Performance, Snapshots, Caching (Reporting Services)
    Similar thread for your reference:
    SSRS slow
    Any problem, please feel free to ask
    Regards
    Vicky Liu

  • Questions regarding hard disk replacement in MacBook Pro Early 2008 Edition

    Hello -
    You folks probably get this a lot but I have a MacBook Pro Early 2008 edition and would like to upgrade the base 200 GB 5400 RPM drive to a Seagate Momentus 7200.4 drive. I have a few questions regarding this, and would appreciate any feedback.
    1) Does anybody know if installing a new hard drive in a MacBook Pro would cause the warranty to be invalidated? I don't believe a hard drive is considered a user replaceable part, at least from what I read, and I would like to know if replacing it myself would void AppleCare.
    2) Does anybody have any experience with the Segate Montentus 7200.4? I'm interested in how reliable the drive is and how much heat it generates. I've quickly discovered that I can use my MacBook Pro as an oven in tight spots and would like to prevent it from cooking its own internals.
    3 random) Does anybody know at what temperature the system actually overheats? I'm seeing 171 F and this is with smcFanControl turned up to the Higher RPM mode. I'm a little nervous when I'm running WoW and the system is averaging above 170 with smcFanControl totally cranked up to 6000 rpm.
    Thanks everyone!

    Thanks for that. I've had mixed results with both Seagate and WD, but less issues historically with WD. My experience with IBM/Hitachi makes is nearly impossible to recommend their products, so based on what I'm seeing the Western Digital Scorpio Black looks like the best bet. Do you happen to know if Apple will do hardware installations outside of warranty repair scenario's? Ripping open my only notebook to perform "involved" hardware maintenance is not something I'd prefer to do, even with my technical background.

  • Issues passing drillthrough parameters from a multi-level tablix in SSRS 2008 R2

    Hello,
    I am really struggling with trying creating a drillthrough report that starts with a matrix (tablix)  and passing those  parameters. I am using SSRS 2008 R2.
    Here's my scenario:
    I have a matrix that has mulitple levels where you can drill down. Here an example with all the levels open:  
    Active
    Term
    Leave
    Total
    128
    88
    121
    United States
    110
    80
    85
    New York
    65
    30
    57
    Manhattan
    10
    6
    9
    Buffalo
    20
    23
    4
    Albany
    35
    1
    44
    Texas
    45
    50
    28
    Dallas
    40
    30
    22
    Houston
    5
    20
    6
    France
    18
    8
    36
    Centre
    18
    8
    36
    Blois
    7
    2
    8
    Druex
    6
    1
    15
    Tours
    5
    5
    13
    I want to drillthrough to another report - Detail Report. As I understand it, I would click the 65 for New York and I would see the detail for the 65 Active people. If I click the 2 under Blois, I would see the 2 terminated people in Blois. My understanding
    for this to work, the Detail Report would need a a parameter for each of the level possibilities in the matrix that I could click: Country, State, City as well as the Status (Active, Term, Leave).
    While I understand about passing parameters, what I don't understand is how to pass the parameters if they are blank. Let's say I clicked 65 for New York, I would need to pass State = New York  Status = Active. But the remaining parameters (Country
    and City  would be null). I know Country doesn't need to be Null in this case.
    My Detail Report has the parameters defaulted to Null, but whether I put the parameters in a Filter for the dataset or in the query itself, I cannot get it to ignore the Nulls.
    As a crazy work-around (I think) I can put in the Where of the query  something along the lines of: this:
            and (a.Country in (@paramCountryCode) or NULL  in (@paramCountryCode) )
    and I would need to do that for each parameter. Usually I have to use 'ALL' instead of NULL, I'm note sure why.
    Additionally, in the Report Action of the Main Report, I need to pass those parameters for each level and their Status. I am also not clear whether or not I need to put in all the parameters on each of the levels (Country, State, City) of the matrix. And if
    I do, do I need to make the expressions an IIF statement stating whether or not they are In Scope?
    All the examples I was able to find, only showed one or maybe two parameters being passed. Doing the way I am trying, seems convoluted, error-prone and tedious. I really hope that I am wrong.
    Is there a better way to approach drilltrough reports from a matrix when there are multiple levels?
    Thank you for the help.
    ~J

    Hi Jenna_Fire,
    According to your description, you have a matrix contains total for each group on each level. Now your requirement is, when you click on any number (data field or total), it will go to the detail report which returns all the detail information of the people
    within the group scope. For example, if you click on the total of Active users in United States, it will return the detail information of Active users in New York and Texas. Right?
    In this scenario, we should set the parameter (@Country, @State, @City) allow multiple values in both main and detail report. And in Default Value (@Country, @State, @City), query out all distinct values. In the textbox which contains
    those total values, when set use these parameters to run the report, we only need to pass the parameters of parent groups. For example, if we click on the total of Active users in New York, we only need to pass Country, State, Status to detail report, and
    in the detail report, the City parameter will use all distinct values (Default Values) because we don't pass the City parameter. We have tested this case with sample data in our local environment. Here are steps and screenshots for your reference:
    1. Create parameter Country, State, City and Status in both main report and detail report. Set both Available Value and Default Value get values from query (Create a dataset for each parameter, use "select distinct [column] from [table]" as query). Set allow
    multiple values for parameter Country, State and City in both reports.
    2. In corresponding textbox, pass appropriate parameters in go to report Action.
    4. Filter data in detail report (in where clause or using filters).
    5. Save and preview. It looks like below:
    Reference:
    Using Parameters to Connect to Other Reports
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • SSRS Error : Query execution failed for dataset 'dataSet'. (rsErrorExecutingCommand) Semantic query execution failed. Invalid object name 'RPT.*********'. (rsSemanticQueryEngineError)

    I am new to SSRS and I am trying to migrate reports from 2008 to 2012. As I have so many reports to migrate, I simply got the back up of ReportServer,
    ReportServerTempDB, and Encryption Key and restored them to test environment. I made necessary configuration from RS configuration tool. I am able to see the reports now when I browse //hostname/reports. But when I open any particular report I am getting some
    error.
    · An error has occurred during report processing.
    (rsProcessingAborted)
    Query execution       failed for dataset 'dataSet'.
          (rsErrorExecutingCommand
    Semantic query        execution failed. Invalid object name
           'RPT. ******'. (rsSemanticQueryEngineError)
    ****** - I am assuming this is a custom data class.
    Does anyone have insight on this? or any better way that I can migrate the reports to new server with less efforts.
    I don’t have the reports solution file to deploy the reports, so I have followed backup and restore process.

    Hi Kishore237,
    According to your description, you migrated some reports from Reporting Services (SSRS) 2008 to 2012. Now you get error when accessing the reports on SSRS 2012. Right?
    In this scenario, did you modify the report data source in database after migration? You can try to open the report in Report Builder or Report designer and check the report dataset. If you can preview the report in Report builder or Report designer,
    please try to redeploy the report to Report Server. If it is still not working, please try to restore the database from backup. And for migrating reports, please follow the "Content-Only Migration" in the link below:
    http://msdn.microsoft.com/en-us/library/ms143724(v=sql.110).aspx
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Ssrs 2008 r2 csv export

    In an existing ssrs 2008 r2 report, I have a question about the csv export.
    When the report was originally written, I only expected the users to export the data to excel.
    Basically the issue is, based on the states where the customers exist. If the customers exists on the east coast, I version of the report is displayed. If the users exist in the Midwest, another version of the report is displayed. if the users exist on the
    west coast a third version of the report is displayed.
    However now if the users want to export the data to csv (comma delimited), all 3 versions are appearing in the csv file.
    I do know that when I hide a tablix, that does not export the data to a csv file. However when I pick the option to show or hide a tablix based upon the expression, the tablix is exported to a csv file.
    Is there a way to export the columns and data that actually apply to the particular customer. I do not want all the data columns for east coast, Midwest, and west coast to appear on the csv export?
    If there is a way to not display the extra data columns and rows, can you tell me how to accomplish this goal? Showing me code and/or a url would also be helpful.

    Hi Wendy,
    When exporting a report to CSV format in Reporting Services, the visibility of a report item/object is only controlled by the Property DataElementOutput. If the DataElementOutput property of a report item is set to Auto or Output, it will be exported to
    the CSV file, otherwise, the report item won’t be exported to CSV. Currently, the DataElementOutput property is hard-coded which doesn’t allow us to set the property based on an expression. In this way, it is impossible for different users to have different
    exported CSV files in your scenario.
    Here, I would suggest you submitting a wish at
    https://connect.microsoft.com/sql.
    Connect site is a connection point between you and Microsoft, and ultimately the larger community. Your feedback enables Microsoft to make software and services the best that they can be, and you can learn about and contribute to exciting projects.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Ssrs 2008 r2 using parameter values

    In an existing ssrs 2008 r2 report, I have a requirement from a user where they want to add 2 more parameters to the report. Right now there is an option where the user can choice to generate report1, report2, report3, report4, report5, report6, report7,
    report8, and/or any combination of the reports I just listed.
    This is setup by using an expression in the visibility property for each of the 8 tablixes.
    For your information, the following is an example of how to display one of the reports or not:
    =iif(InStr(join(Parameters!report.Value,","),6)>0,false,true)
    Now the user wants to be able to add the parameters of customer and inventory_item based upon if report7 and/or or report8 is selected.
    Now can you tell me the following:
    1. Would you show me the code I can use in the dataset to select report7 and/or report8?   
     2. If the above is not possible to select specific reports, then would the dataset query need to look something like: where @report is null or where @report is not null? What would you suggest?

    Hi midnight_car,
    According to your description, you have specified visibility for each tablix in a report with IIF() function. When you select 7 or 8, you want to add an additional parameter to filter displayed tablixes, right?
    In Reporting Services, since we can’t specify the visibility of a parameter as an expression, we could add a cascading parameter. When the first value is 7 or 8, then selected values from the cascading parameter can filter the displayed tablixes. Please
    refer to steps below:
    1. Sample data.
    2. Create a new dataset with the query below:
    select distinct SalesTerritoryRegion as region from dbo.DimSalesTerritory
    where SalesTerritoryRegion=
    case when 3 in (@report)or 4 in (@report)
    then SalesTerritoryRegion
    else 'NA' end
    3. Specify the parameter @region using the new dataset.
    4. Query in main dataset like below:
    select SalesTerritoryRegion as region,SalesTerritoryCountry as country,SalesTerritoryGroup as [group] from dbo.DimSalesTerritory
    where SalesTerritoryRegion= case when 3 in (@report) or 4 in (@report)
    then @region
    else
    SalesTerritoryRegion end
    4. Preview the report.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Ssrs 2008 r2 use 'Globals!ReportServerUrl in url

    In a SSRS 2008 R2 report, I am able to have the users open a pdf document in a new window by using the following code in the action field of a textbox property:
    ="javascript:void(window.open('http://test1.op.org/ReportServer/Pages/Resource.aspx?%2fboards%2fImages%2fHS.pdf'))".
    My goal is not to hard code the url path. I would like the url path to be dynamic based upon which report server the ssrs report is running from.
    Basically I would like to replace the
    http://test1.op.org/ReportServer with the Globals!ReportServerUrl variable that report server has a available.
    I would like to replace the above expression with the following:
    ="javascript:void(window.open('Globals!ReportServerUrl/Pages/Resource.aspx?%2fboards%2fImages%2fHS.pdf'))". However this expression does not work.
    Thus can you tell me how to use the Globals!ReportServerUrl ssrs item with the javasctript window open statement so that the expression works correctly?

    Hi Wendy,
    If we are put Globals!ReportServerUrl expression in the “”, in Reporting Services, it will recognize it as a string data. So, it cannot display as report server URL.
    Please refer to the following expression:
    = Globals!ReportServerUrl & “/Pages/Resource.aspx?%2fboards%2fImages%2fHS.pdf”
    If you have any questions, please feel free to let me know.
    Regards,
    Alisa Tang
    If you have any feedback on our support, please click
    here.
    Alisa Tang
    TechNet Community Support

  • SSRS 2008 R2 - Dynamic header data stays the same when exporting

    Background:
    I have a SSRS 2008 R2 report with a single Tablix.
    The data is grouped by InvoiceID, with each appearing on a separate page.
    I'm displaying some of the detail data in the group header row using Expressions similar to the following:
    ="Invoice # "  & ReportItems!InvoiceID.Value"
    The data referred to by my ReportItems statements are all hidden in the detail row (Advanced Mode, the Hidden Value for the Static Row Group is set to false).
    Problem:
    When I Preview the report in Visual Studio, everything looks as it should - the dynamic header data changes correctly with each group.
    However, whenever I export the results (I've tried all the formats), the header data is the same for every group - its taking the values from the first group and using it in all the groups.
    I've copied the same expressions into my Totals row, and the data is correct when exported; its only happening in my header rows.
    Any help in resolving this is greatly appreciated, thank you.

    Hi Alex,
    According to your description, you have a header with expression contains ReportItems. Now you find it shows incorrect result when exporting to a file. Right?
    In Reporting Services, it has reported some similar issue that the ReportItem returns unexpected result when exporting.  In this scenario, since you just want to show the group name in each page as a header for detail rows. So you can make the
    detail rows group on the Group. Then delete the Group column but still keep the group. After that add a row above detail row (Out side of group) and put in "=Fields!InvoiceID.Value". Now it will show the corresponding Group name
    when you set page break between each group instance. We have tested this case in our local environment. Here are screenshots for your reference:
    Reference:
    SSRS
    field expressions using ReportItem refrences have unexpected results when exporting
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • SSRS 2008: how to show an empty chart with legend and x and y axis when no data available

    Hi,
    I am using SSRS 2008, I generated one chart in report designer with the data from Analysis Services (Cube).
    According to the dataset, there is no data returned when I run the query. so when I preview the chart, there is nothing but "no data available" showing on the chart.
    Here I want to know is there any possible to show an empty chart with legend and x and y axis?
    If it is possible, can you tell me how can I make it?
    Best Regards.
    Connie Zhu

    Hi,
    When there is no data, the chart displays the message "no data available". But using a little work around, you can display an empty chart.
    Please find the below steps given to achieve this
    1. Create a new dataset using TSQL to return 1 row of data having the category field and value field set to 0. Add the fields that are necessary for the category fields, series fields and datafields.
       A simple example would be like
       SELECT 'abc' as Category, 0 as Amount
    2. Add a new chart, set the category field to 'Category' and set the data field to Amount from above dataset created in step 1.
    3. In the new chart, right click the category axis and select axis properties, Click on the labels tab, check on
    'Hide axis labels' and then click ok
    4. Now set the Visibility property of both the charts depending on the rows returned from your main dataset
       a. click on your main chart and set its Hidden property to :
    =iif(CountRows("MainDataSet"),false,true) 
       b. click on the new blank chart added and set its Hidden proprety to (the opposite) :
    =iif(CountRows("MainDataSet"),true,false) 
       Note : Please change the dataset name in above expression "MainDataset" to the name of your chart's dataset
    5. Resize the new chart to the same size as your main chart, then position the new chart on the place as the main chart.
       (Note : You can set the position of new chart to be same by copying the location property from the main chart) 
    6. Now run and observe the result. When there are no rows returned by your main dataset, the new chart (the blank chart) should be displayed.
    I've added a working sample of this kind of a report
    here.
    Hope this helps. Please feel free to discuss if you have any questions.
    Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful.
    BH

  • How to clearn SSRS 2008 R2 Exceution Logs

    Hi
    I am using SSRS 2008 R2 for my reports and dashboard development, also to check all the report and dashboard usage I have created few reports usage reports.
    Now for next year 2015 I want to clean all previous reports execution logs data from the table.
    So please provide me query or tell me how can I do this???
    Thanks

    Hi YLee_1980,
    According to your description, you want to clean all previous reports execution logs data.
    In Reporting Services, deleting the execution log is executed by the stored procedure [dbo].[ExpireExecutionLogEntries]. If we want to clear the execution log, we can set the expected value for ExecutionLogDaysKept, then execute the stored procedure [dbo].[ExpireExecutionLogEntries].
    Please refer to steps below:
    1. Display the existing execution log.
    2. Specify the value(10) for ExecutionLogDaysKept by the query below:
    Use ReportServer
    update ConfigurationInfo set Value='10' where Name='ExecutionLogDaysKept'
    3. Execute the query below to delete the corresponding execution log.
    exec [dbo].[ExpireExecutionLogEntries]
    4. Display the left execution log.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • Ssrs 2008 r2 date parameter not working all the time

    In an SSRS 2008 r2 report, I am not getting some records selected when I run the report in the ssrs 2008 r2 report.
    However when I run the sql in ssis manager, the records are selected. Thus I am trying to determine why some of the records are not selected whe running the ssrs report.
    In the table called 'transactionfile', the fields that I am trying to determine where there is a problem is the following:
    SchoolNumber (varchar(50),null), and
    TransactionPaymentDate (varchar(50),null).
    Examples of data are SchoolNumber = '121' and TransactionPaymentDate = '04162014'
    In the SSRS report, the parameter value for @SchoolNumber is text and the parameter value for @EndDate and @StartDate is date/time.
    The following is the query I am having a problem with:
    SELECT  s.SchoolNumber,      
          CONVERT(smalldatetime,substring(TransactionPaymentDate,5,4) + '-' + substring      (TransactionPaymentDate,1,2)+ '-' +
    substring(TransactionPaymentDate,3,2)) as        TransactionPaymentDate
     from [eF].[dbo].[transactionfile] f
           INNER JOIN
        [eF].[dbo].schools] s      
        on rtrim(ltrim(s.SchoolNumber)) =rtrim(ltrim(f.SchoolNumber))
     where  rtrim(ltrim(s.SchoolNumber)) = rtrim(ltrim(@SchoolNumber))
          AND
          Cast(Right(TransactionPaymentDate,4)+Left(TransactionPaymentDate,4)  as Date)
            >= @StartDate
         AND
       Cast(Right(TransactionPaymentDate,4)+Left(TransactionPaymentDate,4)  as Date) <= @EndDate
    Thus could you suggerst what could be wrong when selecting some records by date?

    First check whether transaction payment date has 8 digit or not. In yes then try the below query,
    SELECT s.SchoolNumber,
    CONVERT(smalldatetime,substring(TransactionPaymentDate,5,4) + '-' + substring(TransactionPaymentDate,1,2)+ '-' +
    substring(TransactionPaymentDate,3,2)) as TransactionPaymentDate
    from [eF].[dbo].[transactionfile] f
    INNER JOIN [eF].[dbo].schools] s
    on rtrim(ltrim(s.SchoolNumber)) =rtrim(ltrim(f.SchoolNumber))
    where rtrim(ltrim(s.SchoolNumber)) = rtrim(ltrim(@SchoolNumber))
    AND
    cast(substring(TransactionPaymentDate,5,4) + '/' +
    substring(TransactionPaymentDate,1,2)+ '/' +
    substring(TransactionPaymentDate,3,2) as date) between @StartDate AND @EndDate
    Regards, RSingh

Maybe you are looking for

  • InputNumberSlider can not be converted

    On the Oracle 11g database, there is a field of Number(1,0) type. When dragged and dropped from the ViewObject under the AppModuleDataControl, the field is added to the page as af:inputText w/Label. Then I converted the af:inputText to af:inputNumber

  • Outlook 365 converting text boxes into images

    Hello, When sending out an email containing text boxes with text, links and images inside, people receive it as images. It does not matter if you created the email as HTML or Rich Text. Same behaviour both cases. Is there any way to avoid this issue?

  • Headphones aren't working:(

    Ever since I updated my iPad to IOS 7 none of my headphone worked does anyone have some ways for me to fix it?

  • Regarding AS2 Adapter

    Hi Experts,         can any one of u provide a detailed information about AS2 adapter and any scenario using AS2 adapter ? Thanks, Ravi.N

  • How do I get rid of Recently Added

    Since upgrading to the new look iTunes I am unable to get rid of the Recently Added selection at the top of My Music can anyone tell me how to delete it from my view? thanks