I am currently trying to put a localized message in a Pentaho report. The message has one parameter which is to be inserted into the message's localized text like
All approved disconnects of ${company} in ${region}
How do I do that using Pentaho Report Designer? I've tried a resource-message. It correctly accesses a localized text defined in a resource bundle inlined with the report file but I cannot get it to substitute the placeholder for the parameter. How do I connect the message to parameters of the report?
Are you connecting the message to parameters or a field? A resource-message should be fine. You need to replace your curly braces to parentheses.
For example, in my translations file.
REPORT_DATE=Report Date: $(report date, date, MMMM yyyy)
Related
I am working on an entity view that displays billing records with associated date. This date field needs to be displayed as "Month - Year". Unfortunately, I am not able to find a way to format this date field outside of modifying the entity and even then, I only have the option for date only or date and time.
I have noticed that I can select the field and click on Change Properties. There I have "Web Resource" and Function Name. I have tried creating a web resource with a function that returns some data. Set everything up, saved and published. This function is not even found in dev tools. Only examples that I have for it are dealing with using this method for icons:https://www.c-sharpcorner.com/article/view-customization-with-javascript-in-dynamics-365/
In another example the suggestion is to use calculated fields, but this would cause me to lose date sorting and filtering on the form.
That view-based JavaScript seems to be to choose an icon. I'm not sure it would allow you to reformat actual data in the view. And if you're looking for assistance with trying to do that, you'd probably get more help if you posted the code.
Besides the JavaScript approach, you might want to think about creating a separate text field to hold the "Month - Year" value. Then you could use a workflow, plugin, or JavaScript to populate it when the datetime field changes.
One of the free workflow tool packages (Jason Lattimer's, Aiden Kaskela's, or Andrew Butenko's) probably has the ability to parse the date so you can format the month and year, and store the string in the separate field. This would be a no-code option.
Alternatively, you could write a plugin to reformat the datetime values and register it on the RetrieveMultiple message of the entity.
I'd probably go with a separate field and an off-the-shelf workflow utility to populate it.
There are several ways:
1. Setting->Administration->System Setting->Format->Customize,
2. http://prntscr.com/ph42nc,
3. or use on load with js to change date format more on this subject here: How to change date format in JavaScript
I am using Microsoft Dynamics 365 Web API approach to interacting with CRM data.
Here I want to update the field with type: DATE and TIME.
Date value I am passing in the request body is as below:
"packfirstday":"1-15-2018"
Except for above, I have also tried with DateTime and with different date formats.
e.g.
mm-dd-yyyy
m-dd-yyyy
mm/dd/yyyy
yyyy/mm/dd
yyyy-mm-dd
PS: I try to post without date field it is saving details successfully.
The problem is not with the code, the simple misunderstanding.
There are 2 components namely Behavior & Format. You have Format set as 'Date only' not the Behavior. Behavior decides the Database terms whereas Format is used for displaying datepicker controls in Form.
So when you set the field in web api with only date part - the CRM database expects time part also.
Either set behavior also as date only, so this will work:
"packfirstday":"2018-01-15" //YYYY-mm-dd format
Or change your code to pass time part also:
"packfirstday":"2018-01-15T11:10:00.000Z" //UTC offset
Since user local behavior still expects the time part.
I would ask about capability to change the filed datatype from Single line to Multiline without delete this field.
Actually the CRM form editor is disable the data type option set after filed created, so I think I have to change the data type via Database
but I need to know if is it possible to do that, and if we change the data type from the database is it will change the filed from single line shape to multiline in the form.?
because my CRM is online so I need confirm is it possible, to ask Microsoft to do it for me.
Best regards .
It is not possible to convert a single line text field to a multi-line text field. Instead you should create a new multi-line text field and move the data from the old field to the new field.
If you were on-premise, you should not be making direct changes to the database (and there is no way Microsoft would be doing so for you online):
Modifying tables, stored procedures, or views in the database is not
supported.
Yes, as Henrik mentions, it's not possible, but tools can make it appear to be for all practical purposes ;)
The Attribute Manager (it's a plugin for the the XrmToolBox) will do this for you. It's in beta, so don't run it in prod without testing it in another environment first.
Just select your field, check Convert Attribute Type (optionally check Migrate Data if you want it migrated) and execute. You'll need to do it in each environment.
We are using Eclipse (Galileo) to create some custom BIRT reports (version 2.5) for SilkCentral Test Manager (version 11). When creating the report in SCTM, we have to specify the SQL query to be used for the report. We also have to specify the SQL query when designing the BIRT report in Eclipse.
I know that in the SCTM SQL statement we could specify parameters to be pulled based on the current settings, such as the currently selected project:
WHERE TPN.PROJECTID_FK = ${$PROJECTID}
I thought this would carry over to the BIRT report that is associated with the SCTM report, but this is not the case. I created a new report in SCTM and specified the following query (which contains no information that will be displayed in the BIRT report):
SELECT proj."ProjectName", proj."ProjectID_pk"
FROM "Silk"."SCC_Projects" AS proj
I then went to the report tab and associated a custom report and the report displayed correctly, proving that it is using the Data Source/Data Sets from BIRT and not the SQL provided in SCTM.
The problem I'm facing is that I want the custom report to display the currently selected project, but I'm not able to specify it properly in Eclipse. I need this because I want to only have one report template to be used for multiple projects, instead of having to upload a custom report for every single project.
A Hardcoded value for the project definitely does not work:
WHERE TPN.PROJECTID_FK = 34
I tried setting it as a parameter (Name=projectID, DataType=Integer, DisplayType=Text Box, DefaultValue = 34).
WHERE TPN.PROJECTID_FK = ?
When this runs, the report pulls the Default Value, and not the currently selected project.
I tried setting it as a Dynamic Parameter (Name=projectID, DataType=Integer, DisplayType=ListBox, DataSet=ProjectID, SelectValueColumn=ProjectID_pk, SelectDisplayText=ProjectName, DefaultValue=36)
This also pulls the Default Value when the report runs.
Default value is a required field, so I don't know what to do to get this to work properly.
Any suggestions/solutions?
Here is the solution that I came up with using and example from BirtReports.doc from the Borland site:
In SCTM, I edited the SQL query from
WHERE TPN.PROJECTID_FK = ${$PROJECTID}
to
WHERE TPN.PROJECTID_FK = ${currentProject|34|ProjectId}
This creates a parameter named currentProject which passes the value 34 to the BIRT report under the parameter name rp_currentProject.
I then edited the BIRT report's projectID parameter to have the following values: Name=rp_currentProject, DataType=Integer, DisplayType=TextBox, DefaultValue = Empty/Null.
In the DataSet for the report, I edited the ? parameter to be:
Name=param_1, DataType=Integer, Direction=Input, DefaultValue=GreyedOut/Disabled, LinkedToReportParameter=rp_currentProject.
So, I upload the same report template to multiple projects and under the Report > Parameters Tab in SCTM I change the value of the currentProject parameter to the correct project ID. This ID is passed to the Report and the correct information is displayed.
BTW, I also tried this format but I was getting conflicting type errors:
WHERE TPN.PROJECTID_FK = ${currentProject|${$PROJECTID}|ProjectId}
I also tried using DECLARE/SET in the SQL to set the passed value to a variable, but I was getting an error stating that the SQL statement is invalid because it is no longer read-only.
Hope this helps anyone that has this same problem!
This is my first attempt to create a Visual Studio 2008 report using parameters. I have created the dataset and the report. If I run it with a hard-coded filter on a column the report runs fine. When I change the filter to '?' I keep getting this error:
No overload for method 'Fill' takes '1' argument
Obviously I am missing some way to connect the parameter on the dataset to a report parameter. I have defined a report parameter using the Report/Report Parameter screen. But how does that report parameter get tied to the dataset table parameter? Is there a special naming convention for the parameter?
I have Googled this a half dozen times and read the msdn documentation but the examples all seem to use a different approach (like creating a SQL query rather then a table based dataset) or entering the parameter name as "=Parameters!name.value" but I can't figure out where to do that. One msdn example suggestted I needed to create some C# code using a SetParameters() method to make the connection. Is that how it is done?
If anyone can recommend a good walk-through I'd appreciate it.
Edit:
After more reading it appears I don't need report parameters at all. I am simply trying to add a parameter to the database query. So I would create a text box on the form, get the user's input, then apply that parameter programmatically to the fill() argument list. The report parameter on the other hand is an ad-hoc value generally entered by a user that you want to appear on the report. But there is no relationship between report parameters and query/dataset parameters. Is that correct?
My last assumption appears to be correct. After 30 years in the industry my bias is to assume a report parameter actually filters the SQL data using the given parameter. This is not the case with .rdlc files used by Report Viewer. These report parameters have nothing to do with fetching data. Sounds like this was a design decision on Microsoft's part to completely separate the display of data from the fetching of data, hence, Report Viewer has no knowledge of how data may be fetched. Best way for me to conceptualize this dichotomy is to think of Report Parameters more as Report Labels, quite distinct from the dataset query parameters.