【发布时间】:2016-12-13 05:45:55
【问题描述】:
我是水晶报表和 .net 技术的新手。我最近开始研究它们,我想知道水晶报表表达式是否可以转换为等效的 vb 代码,以便在 SSRS 报表中使用它们。
另外,下面的水晶报表表达式本身看起来像是一种 vb 代码(如果我错了,请有人纠正我)。
水晶报表公式:
local StringVar x :="";
if not isnull({Availability.Address}) and trim {Availability.Address}) <> ""
and {Availability.Address} <> {Availability.Building}
then x := x + {Availability.Address} + chr(10);
if not isnull({Availability.Park}) and trim({Availability.Park}) <> ""
then x := x + {Availability.Park} + chr(10);
if not isnull({Availability.City}) and trim({Availability.City})
<> "" then if not isnull({Availability.State})
then x := x + {Availability.City} + ", "
else x := x + {Availability.City} + " ";
if not isnull({Availability.State}) and trim({Availability.State})
<> "" then x := x + {Availability.State} + " ";
if not isnull({Availability.Zip}) and trim({Availability.Zip})
<> "" then x := x + {Availability.Zip} + " ";
x;
VB 代码:
Public Function Test(ByVal profit As String) As String
{
//crystal report expressions as vb code?
}
现在我可以把这个水晶公式转换成vb代码了吗?
注意:Availability in the formula is the stored procedure name and followed by a field name.
【问题讨论】:
标签: c# vb.net reporting-services crystal-reports