Pentaho Report Designer shows Year as comma separated value - mysql

I am using Pentaho Report Designer to show user logs. I created a data connection in MySQL :
MySQL field name: activity_date
MySQL field type: timestamp
value: 2013-01-01 00:00:00
Query: "SELECT YEAR(activity_date) AS year....."
gives me an output of 2013.
But in the report template it shows 2,013. So I tried to change my SQL query to
SELECT CAST(YEAR(activity_date ) AS CHAR) AS year
but on changing this, Report Designer shows empty value in that column.

Click on the field in the report designer and check its format in the attributes tab (usually on the bottom right side). Just use # if you don't need a comma.

I had the same problem. I solved the problem by creating the report again, by using the Report Design Wizard. In the last step of the wizard (which is called Format step), fill the Data format input with the string #.

Related

Add Calculation Field To Report

I am running access 2013, with a linked view from SQL Server 2008 R2. I have two fields that I want to sum and data types are:
SQL Server 2008: Decimal(10,2)
Access: Number
They are being formatted in my query to currency using this syntax:
cf1: Format([calcfield1],"Currency")
cf2: Format([calcfield2],"Currency")
I have a report with both of these fields bound to text boxes and am adding a 3rd textbox to SUM() them. This is the control source syntax I input to SUM() the fields:
Name: SumOfFields
Control Source: =Sum([cf1]+[cf2])
Now when I attempt to view the access 2013 form, I get the error message displayed below. What do I need to change in order to perform this calculation on my report?
EDIT
If it makes a difference one cf1 is in the Serial Header section of my report, and the field cf2 is in the Details section of my report, and can have multiple entries. I want the SUM() that I am trying to add to be added to the Details section of the report like below:
Serial Header
$22.40
Details
$10.00
$13.40
$10.20
$56.00
Check out the link here it may help. A few things come to mind to check, but with the limited info this is the best I can do...
1) One of the fields is in a custom header which would mean that the total you are attempting to add needs to be in the custom footer
2) You need to place the total in the footer of the report
Link
I agree with #user2676140 - the total should appear in the group footer and should probably look something like:
=[cf1] + Sum([cf2])
If this doesn't work then I would try taking the Format wrapper off [cf1] and [cf2] and use the controls' properties to format them as Currency. Then maybe have the ControlSource for SumOfFields as
=[calcfield1] + Sum([calcfield2])
Again, use the properties of SumOfField to set the format.

How to display yesterdays date in SSRS expression

In one of the column name, I need to display yesterday's date like - September 4,2014
I used DateAdd("d",-1,Today()) function to display,but it is displaying like - 9/4/2014 12:00:00 AM.
How can i get the above format like - monthname,dd,YYYY ?
Use .. =format(dateadd("d", -1, today()), "MMMM dd,yyyy")
If you want add dynamic date or yesterday date in email body using ssrs tool SQL Server 2017, please fellow these steps:
Step 1>
Upload rdl file .
Step 2> Right click on file
Then click manage
Step 3> In Left menu click Subscription
Step 4> Click New Subscription
You will see this window
Then choose data-driven subscription
Then click edit dataset
Then you will get below window
From this select custom source you will get below window
after filling all type query like you want yesterday date then type below query:
Then click Validate Query AND APPLY
IN SUBJECT TAKE VALUE FROM DATABASE AND SEND MAIL

Removing the timestamp from a date in an Excel pivot table connected to a cube

So I have a cube created in Analysis Services 2008 R2. The cube has some dates on one of the non time dimensions. When I put the date on the filters in the excel pivot table, it always puts the date as, for example, 01/18/2012 00:00:00.000. Is it possible to exclude the timestamp from it? I tried using the format cell in excel, but it does nothing to it. I also tried converting from the source (The source is a view from a SQL Server database) from datetime to date using Convert(date,fieldWithDateInfo), and that drops the timestamp, but then Excel treats the field as string, and then the filters start acting really funky. Any suggestions?
check the "format string" property for the attribute...I believe the "shortdate" option is what you want.
Add a calculated column to your time dimension using the code below
CONVERT(Varchar, [YOUR DATE COLUMN], 103) AS Date_UK
and change the 'Name Column' attribute to your new calculated column for the datetime dimension attribute

Adding Date as Optional Parameter with NULL Check Box in SSRS

I have report with date range as the parameters, User can narrow the results by selecting the date range. Now user want to make the date range fields optional. I enabled "Allow NUlls", user can gary out the date range parameters. The report is returning Zero records after selecting the Check BOX(Graying out the date fields)
I Follwed below ling to fix this, but while Im editing the Formula window, its either throwing END of formula expected ot Sysntax error over ':' .
I copied below code in the Edit as Formula window
OR(FIND(Fund_Project_Date, Parameter:Fund_Project_Date) <> 0, Parameter: Fund_Project_Date = EMPTY)
http://social.technet.microsoft.com/Forums/en-US/sqlreportingservices/thread/d2dd4521-fedd-4501-a675-1ec3b4b87989
Software used:
SSRS 2008 R2 , Report developed from Report Model edited through Report builder 3.0
Thanks in advance
I found it . the solution is "=IIF(Isnothing(Parameters!ItemWorkflow_CUWC_Event_Date.Value),"12/12/1900",Para‌​meters!ItemWorkflow_CUWC_Event_Date.Value)" at Dataset properties level not at Query Designer Filter level. Thanks every one.
You need to use a ! not a :
Hope this helps.

Parameter missing a value

I am new to reporting services and have a reporting services 2005 report that I am working on to use as a base report template for our organization. I am trying to place the date that the report was last modified on the report server into the page header of the report. However, I keep getting a 'ParamX' parameter is missing a value error when I try to This is what I have done:
Set up a Parameter ReportName with a default value of Globals!ReportName. It is also hidden and internal.
Set up a Dataset ReportHeader that calls a stored procedure that returns the date the report was last updated or another date, if the report is not on the report server. It has a parameter #ReportName assigned to the Parameter!ReportName.Value. The Dataset returns values when run on the dataset tab in the BI tool.
Set up a Parameter ReportVersion that has a default value Query From based on the dataset ReportHeader and picking the ModDate column. It is the last parameter in the report parameters list.
I assign a textbox to the parameter.
When I preview, I get "The 'ReportVersion' parameter is missing a value whether I place it in the report body or page header (which is where I want it). I have deleted and added the parameter again, toyed with the hidden and internal settings on it.
What does this error really mean, what I am missing, and can I even do this with parameters?
Thanks In Advance
Jim
If I understand what you're doing, it sounds like you want to be using a field where you're implementing a parameter...
You are returning the ModDate from the data source, correct? If you're doing this, you can simply throw a text box in there, and use something like this: =Fields!modDate.Value to display it.
Parameters are values that go in to the query, fields are what it returns.
Hope this helps...
EDIT:: OK so are you trying to retrieve the mod-date column value from the reportserver db? If that's what we're talking about, you'll need to add a few things to the report. Add a datasource to report db, a dataset containing the date (query below), a list object in the report linked to the dataset, and a textbox in said list object to display the field. If you hit the report server with a query like this:
SELECT MAX(ModifiedDate) AS ModDate FROM catalog WHERE name='myReportName'
That will return your modifieddate from the ReportSErvices Database as a field that you can use.