Odpovědět Tablix sometimes grows and sometimes doesn't

  • Thursday, March 01, 2012 9:10 AM
     
     

    (I have a report which contains a table, filled by dataset.

    This dataset query has 3 parameters: from date, to date and some other parameter.

    For some reason the report table gives different amount of rows on different runs (with the same parameters!).

    Once it gives all the

    records properly and once it only shows 3 records in the table!

    How can that be?

    It should be something with the design since when I run the query in the dataset builder I get the complete amount of results all the times.

    Thank you!)

    Namnami


     Hi,  

    I found the problem but still need help.

    I found that each time I rerun the report the date parameter changes ex: from 01/03/2012 to 03/01/2012 and vice versa.

    (I'm working with format dd/mm/yyyy)

    But how can I avoid this date change? My users are not supposed to recheck their parameters didn't get mixed up each time they rerun the report?!

    Youe help appreciated.

    *******************
    I found this happens only if the parameter is a datetime parameter. I switched it to a string parameter and now it doesn't switch at runtime.

    • Edited by namnami Sunday, March 04, 2012 11:07 AM find workaround
    •  

All Replies

  • Monday, March 05, 2012 4:50 AM
     
     
    This can happen when the regional settings of the server and/or client are not set correctly.  Also, setting the Localization --> Language property of the report may help.
  • Monday, March 05, 2012 6:39 AM
     
     

    My computer's languange settings are already set to DD/MM/YYYY format.

    Also the report's language settings.

    Still this weird behaviour of the date paramter swithing happens. (My earlier post suggesting to make it string instead of date was not helpful either after all).

    I'm speaking about running in VS so I don't suppose it has to do with any server language settings. (I've already tried SSRS server settings too but that helps only for running reports on the server itself).

    Actually I got to solve this problem but only for running reports in Report Manager. I added Culture to reports.asp page.


    Namnami

  • Monday, March 12, 2012 11:14 AM
    Moderator
     
     

    Hi Namnami,

    From your description, it seems that you want to get the uniform date format(dd/MM/yyyy) both view the report on the Report Manager and display the report in a custom application. Currently, the date/time parameter always display “MM/dd/yyyy” format. Right?

    If so, the date format is determined by the language of the installation of Microsoft Visual Studio. To deal with this issue, we can modify the ReportViewer Control language. Please add the “uiCulture="en-gb" Culture="en-gb" configuration to the “@ Page directive”. It looks like:

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication13.WebForm1" uiCulture="en-gb" Culture="en-gb" %>

    Then, the DateTime format will change to “dd/MM/yyyy” in ReportViewer Control. For more information, please refer to:
    How to: Set the Culture and UI Culture for ASP.NET Web Page Globalization


    If the issue persists, please shown me more details information and post two screenshots of the report before and after rerunning the report. Then I will try to reproduce the issue and help you resolve it.

    Regards,
    Mike Yin



  • Tuesday, March 13, 2012 7:33 AM
     
     
     

    Hi, thanks for your response.

    Let me clarify where I am at now-

    In VS the parameter date switch is happening- but that doesn't interfere me that much (although it would be nice if it was working).

    I tried reproducing the date switch in report viewer/ report manager but wasn't able to reproduce this.

    In Report Manager- all's well, since I changed the culture of Report.aspx the parameter is in the needed format of dd/mm/yy.

    In Report Viewer- that's my main problem- even though I set the ReportViewer.aspx culture, still the parameter shows in incorrect format (mm/dd/yy) this confuses the users. This is important for us since Report Viewer is used for email links and also in integration with Sharepoint.

    What do you mean by configuration to the “@ Page directive”- maybe I need to change a different page then the ReportViewer.aspx?

    Let me know if screenshots needed.

    Thanks for your help.


    Namnami

  • Thursday, March 15, 2012 10:46 AM
    Moderator
     
     Answered

    Hi Namnami,

    Thanks for your post.

    To force the language of ReportViewer Control, we need to modify the language of the target .aspx page. Please refer to the steps below:

    1. In the “Solution Explorer”, double click the target .aspx.
    2. Click “Source”, and add the uiCulture="en-gb" Culture="en-gb” configurations to the first row of the codes in the design surface. Please refer to the screenshot below:

    Besides, the “Locale” setting in the SharePoint site determines the language resources that are used for Reporting Services Web pages and reporting Services Report Viewer Web part. At this time, I suggest you reset the language on the SharePoint site. Please refer to the steps below:

    1. Open a site collection (not from Central Administration).
    2. Click “Site Actions”, and click “Site Settings”.
    3. Click “Regional settings” under “Site Administration”, select “English (United Kingdom)” for “Locale”. Click “OK”.

    For more information about the regional settings on a SharePoint site, please see:
    Regional settings


    If you have any questions, please feel free to ask.

    Regards,
    Mike Yin