我在记事本++中打开了这个,我没有看到任何遗失的副词。当我预览ssrs报告时,任何人都可以一目了然地看到放置良好的paranthesis会使这个脚本正确运行吗?
public void writeText()
{
try
{
Class.forName("com.mysql.jdbc.Driver");
}
catch(Exception e)
{
e.printStackTrace();
}
final String DB_URL ="jdbc:mysql://mis-sql.uhcl.edu/gattupalliv3940";
Connection conn = null;
Statement stat = null;
ResultSet rs = null;
try
{
conn = DriverManager.getConnection(DB_URL,"gattupalliv3940","1552688");
stat = conn.createStatement();
rs = stat.executeQuery("select * from student_2");
FileWriter fw = new FileWriter("data.txt");
BufferedWriter bw = new BufferedWriter(fw);
String line ="";
while(rs.next())
{
line = rs.getInt(1)+"\t"+rs.getString(2)+"\t"+rs.getDouble(3);
bw.write(line);
bw.newLine();
}
bw.close();
}
catch(Exception e)
{
e.printStackTrace();
}
finally
{
try
{
conn.close();
rs.close();
stat.close();
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
答案 0 :(得分:3)
试试这个:
=IIF((InStr(Fields!GRP_NAME.Value,"SOCS") > 0 OR
InStr(Fields!GRP_NAME.Value, "TOC") > 0)
, (IIF(DateAdd("YYYY",3,Fields!CP_PRD_END_DT.Value) <
Fields!CP_PRD_END_DT.Value
, "*See CO"
IIF(Fields!SAMPLE_MONTH.Value>0
,"YES"
IIF(Fields!CP_PRD_BEGIN_DT.Value < Globals!ExecutionTime
,"NO","FUTURE"))))
如果你跟踪括号,我认为你最后错过了一个额外的括号。也是第一行中OR语句后的括号。
还可以考虑使用不同的代码编辑器,它会突出显示括号,例如emacs。