Android - 小数点后2位[重复](Android - Round to 2 decimal places [duplicate])
可能重复:
在小数点后将一个双数乘以2个有效数字我知道有很多关于如何舍弃这种数字的例子。 有可能有人告诉我如何回合双倍,以获得值,我可以显示为字符串,并且总是有2位小数位?
Possible Duplicate:
Round a double to 2 significant figures after decimal pointI know that there are plenty of examples on how to round this kind numbers. But could someone show me how to round double, to get value that I can display as a String and ALWAYS have 2 decimal places?
原文:https://stackoverflow.com/questions/9366280
最满意答案
尝试设置参数“默认值”以使用与“可用值”相同的查询。 实际上,它将每个“可用值”提供为“默认值”,并自动选中“全选”选项。
Try setting the parameters' "default value" to use the same query as the "available values". In effect it provides every single "available value" as a "default value" and the "Select All" option is automatically checked.
相关问答
更多-
MultiValue参数出错(Error with MultiValue parameter)[2022-03-20]
所以我跑了SQL事件探查器,看到错误来自正在寻找的代码是一个空的(@param为空)是一个错误,因为我已经选择了sead,现在允许null 谢谢你克里斯拉塔你帮帮我分配:) So i Ran the SQL Profiler and seen that the errors came from the code that is looking is the param a null (@param is null) that was the mistake because i allready sead i ... -
尝试设置参数“默认值”以使用与“可用值”相同的查询。 实际上,它将每个“可用值”提供为“默认值”,并自动选中“全选”选项。 Try setting the parameters' "default value" to use the same query as the "available values". In effect it provides every single "available value" as a "default value" and the "Select All" option ...
-
使用主数据集中的列作为子报表中的多值参数(Using column from main dataset as multi-value parameter in subreport)[2023-07-23]
在您调用子报告的Action中,映射到shippingIDs_sub的位置,只要数据集中的值为NULL,就使用表达式传递一些有效值。 =IIF(IsNothing(Fields!ShippingID.value),"Some Valid Value",Fields!ShippingID.value) 至于这个: 有没有办法过滤掉NULL并仅为现有ID运行子报表? 不,您无法关闭转到子报表的功能,但您可以通过更改用户点击的内容来“隐藏”它,使其看起来不像是可点击的。 例如,在我们的报告中,当某些内容可以点击 ... -
快速修复可能是删除报告的服务器版本,并将.rdl重新部署/上载为新报告。 当上传新定义以替换现有报告时,SSRS会保留一些有关报告的元数据。 这包括参数的一些属性。 从服务器删除报告时,将删除此元数据。 如果删除报告的服务器版本,您将丢失订阅,并且可能需要重新连接数据源,但如果报告在本地工作,那么我认为这将解决问题。 A quick fix might be to delete the server version of the report and redeploy/upload your .rdl as ...
-
使用join()将参数的值放入字符串中。 所以它会...... =join(Parameters!Thingy.Value, ",") 然后,您可以看到字符串返回的值。 例如 =iif(join(Parameters!Thingy.Value, ",") = "0,1", TRUE, FALSE) Use join() to put the values of the parameter into a string. So it would be.. =join(Parameters!Thingy.Va ...
-
多值参数是一个数组,要显示逗号分隔列表,您需要执行以下操作: =Join(Parameters!MultiValueParam.Value, ",") The multivalue parameter is an array, to display a comma separated list you need to do something like this: =Join(Parameters!MultiValueParam.Value, ",")
-
您是否尝试将参数选择放在单个字符串中? 您可以使用JOIN将它们放入单个文本行: =Join(Parameters!TagHum.Value, ";") https://msdn.microsoft.com/en-us/library/aa337292(SQL.90).aspx Are you trying to put your parameter selections in a single string? You can use JOIN to put them into a single text ...
-
我也遇到了这个问题,不支持将唯一标识符的默认值指定(我找不到任何来源支持这个,只是我自己的经验)。 是否有特定原因导致您无法使用查询中的获取值 ? 解决方案user1578107地址也可以使用,使用转换将varchar(36)传递给您的参数: select convert(varchar(36),Id) from table I have also ran into this problem, specifying default values to a Unique identifier is not ...
-
我遇到了一个非常类似的问题 - 正如您所见,最奇怪的部分是,当选择一个参数但不适用于多个参数时,它可以工作。 无论如何,我通过稍微不同地将Parameters传递给存储过程来解决这个问题 - 在数据集的Parameters部分中使用以下表达式: =Join(Parameters!Value.Value, ",")替换参数名称。 这实际上仍然会传递相同的逗号分隔的值字符串,但由于某种原因似乎正确处理引号。 I experienced a very similar problem - the weirdest ...
-
有趣的问题,我唯一能想到的是将参数数组转换为数据集中的xml,然后通过xml节点将其转换为表。 然后应该在表达式中将数据集参数(让我们称之为@par)设置为: = "
" + join(Parameters!P.Value," ") + " " 然后查询数据集将是这样的: declare @parxml xml = @par Select p.query('./text()') from @parxml.nodes('/n') as T(p) 这将提供一个表,每个选定的参数值都有一 ...