如何根据传递给SSRS报告的参数显示或隐藏表列?

时间:2017-01-11 20:30:10

标签: reporting-services ssrs-2012 ssrs-tablix

我有一个包含4个参数的SSRS报告。参数1 =国家/地区。国家/地区的有效值列表为:1,2,3,4,9,16。

当参数在1,2,3,4中时,我想将文本框的可见性设置为true。如果参数是9或16,那么我想隐藏列。

我试过了:

<?php

    // Lets fetch the value of msg_id
    $data = $_REQUEST;
    $msg_id = $data['msg_id'];

    // Connect to MySQL Server TODO change to strato
    $con = mysqli_connect( "localhost" , "root" , "" , "db2723249" );

    // If msg_sender and group_msg is available then
    // add it in table chats
    if(
        isset( $data['msg_sender'] ) &&
        isset( $data['group_msg'] )
    ) {

        $insert = "
            INSERT INTO group_messages (group_id, group_msg, msg_sender)
            VALUES( '".$data['msg_sender']."' , '".$data['group_msg']."' )
        ";
        $insert_result = mysqli_query( $con , $insert );
    }

        $select = "SELECT * FROM group_messages WHERE msg_id > '".$msg_id."' ";

    $result = mysqli_query( $con , $select );

    $arr = array();
    $row_count = mysqli_num_rows( $result );

    if( $row_count > 0 ) {
        while( $row = mysqli_fetch_array( $result ) ) {
            array_push( $arr , $row );
        }
    }

    // Close the MySQL Connection
    mysqli_close( $con );

    // Return the response as JSON
    echo json_encode( $arr );

?>

“In”不是Visual Basic中的有效运算符。我觉得这应该很容易,但没有发现“等”。任何见解都表示赞赏。

1 个答案:

答案 0 :(得分:1)

试试这个。基于要测试的最少参数。

=IIF(Parameters!CountryList.Value ="9" OR Parameters!CountryList.Value = "16", False,True)
相关问题