Reporting Services :: JQuery DatePicker UI Not Binding Correctly By Dates Fetched From Database
May 2, 2015
Code :
protected void Page_Load(object sender, EventArgs e)
{
Session["ID"] = "2";
string strConnString = ConfigurationManager.ConnectionStrings["BSDConnectionString"].ConnectionString;
var con = new SqlConnection(strConnString);
using (var sda = new SqlDataAdapter())
[Code] ....
That was my code , now lets see what my problem is :
I am getting only two dates in a single row from sql to my asp.net webform and then bindng those dates in jQuery UI Datepicker. Now if i set session to 1 then date picker works well but if i put session = 2 , it shows the end date till 2020 which is wrong.
Below are the dates which are fetched from database and i have copied here for your ease.
When Session["ID"] = "1";
Start Date : 01/07/2014 00:00:00
End Date : 05/02/2015 00:00:00
When Session["ID"] = "2";
Start Date : 07/04/2015 00:00:00
End Date : 27/08/2016 00:00:00
I have set my mindate to startdate and maxdate to end date. please check and see where the error is happening.
Also point of interest is that if i don't fetch values from database and use only List<string> in my web method then every thing works well. like this :
[WebMethod]
public static List<string> GetDates()
{
List<string> arr = new List<string>();
arr.Add("2014-07-01");
arr.Add("2015-02-05");
return arr;
}
VS 2008. I have the following set up. Group1, Group2, Group3 header, Group 3 detail rows..When I set the row visibility (hide based on Group2) on the Detail row, it still shows up when the report is originally rendered.
It should be: Group1 expanded, Group2 collapsed, Group3 header hidden and detail rows hidden It is showing: Group1 expanded, Group2 collapsed, Group3 header hidden, Group3 detail row visible.
I never had this trouble in 2005. Is there something different about row visibility in 2008?
Created a custom SSRS report. applied an interactive sort for a date field. I have the the formatting set to "MM/DD/YYYY" and it sorts everything correctly except for the year.
Example:
As you can see, the dates with 2014 aren't sorted correctly. I want it to sort the dates like:
11/06/2014 12/10/2014 01/07/2015 etc, etc.
Is there a way to get this to take into account the year? but also the month and day?
In SSRS 2014 std (on a win 2012 server) the report controls display incorrectly in IE11. The save and several other features display on multiple lines instead of one line unless you are in capability mode.Also works fine on SSRS 2014 entr on win 2012 server.
I am facing some issue in rendering my SSRS report(2012 version) to excel sheet with color codes. i am using conditional formatting to display the colors. So what is happening is ,take the below expression as an example, for the id = 0, we are not getting white back ground, we are getting some other colors. But the same thing is working fine in SSRS 2008R2.
In an asp.net app I'm creating email attachments from ssrs reports and am rendering them In Word and Excel using the WORDOPENXML and EXCELOPENXML format extensions. When I render the report in excel, the image is sized correctly, however, when I render the same report in word, its very small. I will attach a screenshot of each, and in the word screenshot, I will select the image so you can see the image control's outline (the control's actual size). Notice the image inside of the border is very small. How can I resolve this?
I created a view that i want to use in ssrs.In the view there is a column for running balance.In the table contain transaction of inventory with their quantity.
"SELECT TOP (100) PERCENT ITEMNMBR, TRXSORCE, DOCTYPE, DOCNUMBR, DOCDATE, HSTMODUL, UOFM, UNITCOST, EXTDCOST, TRXQtyInBase, (SELECT SUM(TRXQtyInBase) AS Expr1 FROM dbo.INVTRXB AS b WHERE (DEX_ROW_ID <= a.DEX_ROW_ID) AND (ITEMNMBR = a.ITEMNMBR)) AS ENDQTY FROM dbo.INVTRXB AS a ORDER BY ITEMNMBR, DOCDATE"
If i run the query on sql or use the view on ssr. The end qty is not showing accurately.I ran it on another database it works perfectly. Then i noticed that the dex_row_ID of the second database is sequential as the date. But for the initial database it was not sequential as with the date.
We mark cells in a report using color names like red, pink, and transparent in the fill expression. In the browser it works correctly. When exported to Excel the colors go to the wrong cells. This worked correctly in SSRS 2008.
We are having problems with a new PC, we have installed oracle 10g client, Toad, and SQLServer2005 BITools PC regional settings set to en-NZ( we need date format to be dd/mm/yyyy) BITools/tools/options/international settings language = Same as Microsoft Windows
Ran a simple query(against oracle db) using between with 2 date parameters one parameter is datatype string the other datetime. When previewing report string is entered 01/03/2008 and datetime param is entered by choosing from datepicker, when view report button is clicked the datetime param is transposed whereas the string param remains unchanged.
The problem seems to be the datepicker not picking up on regional date format.
This is a new PC with xp-sp3 and the above software installed.
CREATE FUNCTION [dbo].[get_date_only] (@date datetime) RETURNS datetime AS BEGIN RETURN dateadd(day, DateDiff(day, 0, GetDate()), 0) END
CREATE FUNCTION [dbo].[get_month_end] (@date datetime) RETURNS datetime AS BEGIN RETURN dateadd(ms, -3, dateadd (m,datediff(m,0, dateadd(m,1,@date)),0)) END
CREATE FUNCTION [dbo].[get_month_start] (@date datetime) RETURNS datetime AS BEGIN RETURN dateadd(m,datediff(m,0, @date),0) END
CREATE FUNCTION [dbo].[get_today_end] (@today datetime) RETURNS datetime AS BEGIN return dateadd(ms, -3, datediff(d,0,dateadd(d,1,@today))) END
CREATE FUNCTION [dbo].[get_today_noon](@date datetime) RETURNS datetime BEGIN RETURN DATEADD(hh, 12, DATEADD(d,DATEDIFF(d,0, @date),0)) END
CREATE FUNCTION [dbo].[get_today_start] (@today datetime) RETURNS datetime AS BEGIN return dateadd(day, 0, datediff(d,0,@today)) END
CREATE FUNCTION [dbo].[get_tomorrow_noon](@date datetime) RETURNS datetime BEGIN RETURN DATEADD(hh, 12, DATEADD(d,DATEDIFF(d,-1, @date),0)) END
CREATE FUNCTION [dbo].[get_week_end] (@date datetime) RETURNS datetime AS BEGIN return dateadd(yyyy, datepart(yyyy, dateadd(weekday,7-datepart(weekday, @date),@date))-1900, 0) + dateadd(ms, -3, dateadd(dy, datepart(dy, dateadd(weekday,7-datepart(weekday, @date),@date)),0) ) END
CREATE FUNCTION [dbo].[get_week_start] (@date datetime) RETURNS datetime AS BEGIN return dateadd(yyyy, datepart(yyyy, dateadd(weekday,1-datepart(weekday, @date),@date))-1900, 0) + dateadd(dy, datepart(dy, dateadd(weekday,1-datepart(weekday, @date),@date))-1,0) END
CREATE FUNCTION [dbo].[get_weekday_end] (@weekday tinyint, @date datetime) RETURNS datetime AS BEGIN return dateadd(yyyy, datepart(yyyy, dateadd(weekday,@weekday- datepart(weekday, @date),@date))-1900, 0) + dateadd(ms, -3, dateadd(dy, datepart(dy, dateadd(weekday,@weekday-datepart(weekday, @date), @date)),0) ) END
CREATE FUNCTION [dbo].[get_weekday_start] (@weekday tinyint, @date datetime) RETURNS datetime AS BEGIN return dateadd(yyyy, datepart(yyyy, dateadd(weekday,@weekday- datepart(weekday, @date),@date))-1900, 0) + dateadd(dy, datepart(dy, dateadd(weekday,@weekday-datepart(weekday, @date), @date))-1,0) END
CREATE FUNCTION [dbo].[get_year_start] (@date datetime) RETURNS datetime AS BEGIN RETURN DATEADD(year,DATEDIFF(year,0, @date),0) END
CREATE FUNCTION [dbo].[get_yesterday_end] (@today datetime) RETURNS datetime AS BEGIN return dateadd(ms, -3, datediff(d,0,@today)) END
CREATE FUNCTION [dbo].[get_yesterday_start] (@today datetime) RETURNS datetime AS BEGIN RETURN dateadd(day, -1, datediff(d,0,@today)) END
Then create a Table-Valued Function like so:
CREATE FUNCTION [dbo].[udfCommonDates] (@date datetime) RETURNS @t table (week_start datetime, week_end datetime, lastweek_start datetime, lastweek_end datetime, month_start datetime, month_end datetime, lastmonth_start datetime, lastmonth_end datetime, yesterday_start datetime, yesterday_end datetime, today_start datetime, today_end datetime, thisweek_monday_start datetime, thisweek_monday_end datetime, year_start datetime, year_end datetime, tomorrow_noon datetime, today_noon datetime, date_only datetime) BEGIN INSERT @t SELECT dbo.get_week_start ( @date ) AS week_start, dbo.get_week_end ( @date ) AS week_end, dbo.get_week_start ( DATEADD(d, -7, @date ) ) AS lastweek_start, dbo.get_week_end ( DATEADD(d, -7, @date ) ) AS lastweek_end, dbo.get_month_start( @date ) AS month_start, dbo.get_month_end ( @date ) AS month_end, dbo.get_month_start ( DATEADD(m,-1, @date) ) AS lastmonth_start, dbo.get_month_end ( DATEADD(m,-1,@date) ) AS lastmonth_end, dbo.get_yesterday_start ( @date ) AS yesterday_start, dbo.get_yesterday_end ( @date ) AS yesterday_end, dbo.get_today_start (@date) AS today_start, dbo.get_today_end ( @date ) AS today_end, dbo.get_weekday_start(1,@date) AS thisweek_monday_start, dbo.get_weekday_end(1,@date) AS thisweek_monday_end, dbo.get_year_start(@date) AS year_start, dbo.get_year_end(@date) AS year_end, dbo.get_tomorrow_noon(@date) AS TomorrowNoon, dbo.get_today_noon(@date) AS TodayNoon, dbo.get_date_only(@date) AS DateOnly RETURN END
Now the RS folks might be thinking but how does this help me as I need a dataset and a dataset can only be based on a Stored Procedure or a direct table. No problem create the following stored procedure:
CREATE PROCEDURE [dbo].[uspCommonDates] AS begin set datefirst 1 declare @date datetime set @date = getdate() select * from dbo.udfCommonDates(@date) end
Now you've got a stored procedure to use as a dataset...Now in reporting services add a new dataset:
Now go to the report parameters section of the report:
Now pick that dataset dsFunctions (or whatever you called it) and then pick any of the value fields from the scalar functions such as:
I've a requirement per below business rule to change the Scheduled Delivery Date on the report. Below is the DDL:
1) If the Job has a batch number, the Scheduled Ship Date will be next monday to Requested Delivery Date. Say for example if the job has Requested Delivery Date as 2015-07-29 and it also has a batch number then Scheduled Ship Date will be 2015-08-03.
2) If the Job does not have a batch number then the Scheduled Ship Date will be the Monday before the REquested Delivery Date. Say for example if the Job J012347 has Requested Delivery date as 2015-08-04 and it does not have batch number then the Scheduled Ship Date will be the Monday before i.e. 2015-08-04.
Similarly if the Requested Delivery date is 2015-08-07 and it does not have a batch number then Scheduled Delivery Date will be 2015-08-03.
DECLARE @Date datetime; SET @Date = GETDATE(); DECLARE @TEST_DATA TABLE ( DT_ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED ,JobNumberVARCHAR(10) NOT NULL ,JobStatus CHAR(1) NOT NULL
SSRS 2012 - VS2010...The report compares two years with a sort order on a value that has been engineered based on text switched to int. When sorting A-Z this is the result in the horizontal axis is: 5th, K, 1st, 2nd, 3rd, 4th, 5th..When sorting Z-A the result in the horizontal axis is:5th, 4th, 3rd, 2nd, 1st, PreK..Z-A is correct but A-Z sorting shows 5th as the start and end. The magnitude of the PreK location is correct but the label is wrong on the A-Z sort order. The sorting is implemented using the Category Group sorting option.
I have the SQL code for one of the select list columns as shown below in the SSRS Data set query level.
Example : Select IsNUll(max(ET.[# Utilizations by Utilization Method]),0) as [Employee Period Total]
SQL Result Set Output :
0 0 0
The above code when run in SQL displays correctly with zeroes if NULL values are available from the Source tables.Now at the SSRS Report level design I have grouped with more than one values.Even at the expression I have given =Fields!Employee_YTD_Total.Value but report output displays blank In order to evaluate 0 from the SQL result set I even tried equating the values to 0 like = Iif(Fields!Employee_YTD_Total.Value = 0 ,0,Fields!Employee_YTD_Total.Value) but still the report outputs is blank.
Issue/Query : Why it displays blank and I should have this as 0 in the report output to eliminate blank as this would be not appropriate to the end users to validate. What has to be changed either at the SSRS level or at the SQL level.
On my SSRS report, I use a date parameter to let the user select a date with the little calendar tool. When a date is selected, I have a small bit of coding run to convert the date to text, because when the report first fires up, the field is populated with "1/1/1900," and I need that turned into a blank character to let the report pull up all rows. So far, all well and good.If someone picks a date, then the report will filter the data on that selected date. Works fine.
But, it appears there is no way to get the calendar tool to go back to allowing ALL dates - so that all records are pulled - except by manually typing in, or selecting it with the tool, 1/1/1900.If I try to clear the field, causing it to use '' as a WHERE criteria (WHERE AdmitDate LIKE '%' + @AdmitDateTxt + '%'), it repopulates the field with the last selected date. So, I guess the question is, how does one tell the calendar tool for picking dates for a date parameter to reset back such that all records are pulled, not just those for a single date, without being required to type in, 1/1/1900? Or, is there some way of telling the date parameter to select all dates?
I have a report that uses several filters including a from and to date filter, I have a field named TimeLastMod which is a Timestamp. I am extracting the From and To dates from this field using Select format(TimeLastMod,'MMM') as FromMonth,format(TimeLastMod,'MMM') as ToMonth From Eventlogs syntax.
These I pass on to a parameter and eventually to a tablix filter in an between opeartion. When I run the report, the records returned by the report is not what is expected as it sometimes returns an extra months data e.g., using between Aug and Sept will return october data as well.
I have a table in which records are inserted daily and with them i am storing the dates also. Now in SSRS i need to show the data for one week . The format should be like :
In above example Business Name , Phase, Activity will repeat lonely but its work description will be generated in next section according to that business name and that date. How to achieve this task ? I have referred : [URL] ....
I have a requirement to display project start date and finish date in timescale view. The data in database table available as per below -The start date and project finish date should fill color in the timeline view as per below example, by quarters for a current financial year, last year and plus two years a head.
I have created range bar chart and I am not able to achieve the following tasks.
1. Change X-axis Label Format to Quarter:
I have x-axis with dates and y axis of project groups. I have changed x-axis interval type = month and interval=3.
Set the Maximum = Max(ProjectEndDate) and Minimum = Min(ProjectStartDate).
Now my chart showing 3 months x-axis interval dates in mm/dd/yyyy format. I want to change this interval date format to Quarter. The problem is LabelsFormat property is not recognize the "=Q or q or quarter" and also not accepting the expressions. How can I achieve this?
2. Placing series side by side when it is not overlapping
I want to place the same group series side by side only when the previous project end date is less than next project start date, otherwise place the next project to next row. How can I achieve this?
I set up a connection to mysql using ADO.NET's ODBC Data Provider. And I'm running a simple query to return one table's maximum ID(int32 unsigned).But when I bind the result to a variable and excute task. It gives out error message: "An error occurred while assigning a value to variable "MaxAuditLogID": "Result binding by name "MaxID" is not supported for this connection type. " I tried to change the type of variable around but with no luck.
I have multiple data sets within one report, they are all using STRTOMEMBER(@FromDatesYearQuarterMonthDate) and STRTOMEMBER(@ToDatesYearQuarterMonthDate) as the parameter names.
I went into 'edit' on each data set, to the 'parameter' tab, then wrote some code to convert the parameter to cdate. Looks like this: =[Dates].[Year - Quarter - Month - Date].[Date].&["&cdate(Parameters!FromDatesYearQuarterMonthDate)&"]"
I edited each of the datasets this way, when I hit the execute button on each, I get data back, no errors.
In the 'report parameters' section I have the two parameters there: FromDatesYearQuarterMonthDate and ToDatesYearQuarterDate. I have tried both 'Non-Queried' (which returns no data, but report runs), and "From Query" using the From.... and To.... parameters. Value = ParameterValue and label = parameterCaptionIndented on both. The report brings back error saying "The expression referenced a non-existing parameter in the report parameters collection".
Does anyone have a solid method for making this work? It wouldn't be an issue except that users really want the datepicker instead of having to scroll through the list of dates to get to the one they want.
Insert Into Table2 Select * From Table1 Where Column1Val = '4'
As you can see, I don't need any parameters so I havent configured any. Also, there should not be any result set so I shouldnt need to configure a resultset parameter.
Why is the above query failing with
Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly
I am new to .net and I am using Visual Web Developer 2005 Express with SQL Server 2005 Express. What I would like to do is connect to my SQL database (which resides in the app_data folder) and open a table and pull out a field and place it in either a textbox or label on the page. No editing or deleting. Just simple one field binding. By the way, I can do this with all the cool built-in tools of VWD, but I want to know how to do it all by hand. I would really appreciate it if someone could help me out.
I am trying to migrate my reports from SQL server 2000 reporting services 32bit to 2005 64bit. I am following the migration steps that MS specified. Restored my Reportserver and ReportserverTempDB databases Then I was using the configure Report services to upgrade these databases but I always end up getting the follwoing exception when I run the upgrade on the "Database Setup" configuration for 'ReportServerTempDB' database System.Data.SqlClient.SqlException: Could not locate entry in sysdatabases for database 'ReportServerTempDBTempDB'. No entry found with that name. Make sure that the name is entered correctly. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.ReportingServices.Common.DBUtils.ApplyScript(String connectionString, String script) at ReportServicesConfigUI.SqlClientTools.SqlTools.ApplyScript(String connectionString, String script)
It's driving me crazy, why is it looking for 'ReportServerTempDBTempDB' in the catalog instead of 'ReportServerTempDB'? Is it possible to migrate from 32bit to 64bit?
I have a simple package to load data from sql server db into a flat file. I have a date field in the source data base (data type DATETIME) when i open the csv file some show the exact time stamp and some records show just the seconds like (00:00:0.7). I used CAST CONVERT bu still the same issue.
Hello Everyone. I recently installed MS Sql Server 2005 and Reporting services on a dedicated server. My report server database and my content databases (report content) are all mounted on a named instance of SQL (on the local machine). When I attempt to run a report via the web based report manager I get the following error message.
An error has occurred during report processing. Cannot create a connection to data source 'Production'. The feature: "The edition of Reporting Services that you are using requires that you use local SQL Server relational databases for report data sources and the report server database." is not supported in this edition of Reporting Services.
The data source production has a connection string with the Data Source element set to the named instance of SQL running on the local machine. The report manager web application is also running on the same machine.
All databases are on the local machine (SERVER217MSSQL2K5WG). The version of reporting services installed is what shipped with the Workgroup edition of SQL Server 2005. Does anyone know what could be causing this error? I can assure you all of the data is on the local machine.
OK - truck loads of folk have reported this problem - but I cannot solve it - so apologies for repeating the question...
My SQL Server 2005 Report is developed on the same server as it is run.
I have SQL Server 2005 SP2 installed. The report language is set as en-GB.
The browser language setting is en-NZ.
The report previews fine - I pick May 22 from the picker and it appears as 22/05/2007 in the report parameter text box - which since I am in NZ is exactly as I want it.
I deploy the report - If I run it from the report manager virtual directory the date picker performs as above i.e correctly.
I run the deployed report from the report server virtual directory and here is where the problem occurs - selecting May 22 from the date picker produces 05/22/2007 in the report parameter text box and produces the error
"The value provided for the report parameter 'StartScheduledDate' is not valid for its type. (rsReportParameterTypeMismatch)"
thanks for any help here - this problem has made this a ridiculously expensive report!