Print Grid open a blank pop-up

     Clicking on print opens a blank pop-up. But the content of the grid is not shown.

I attach my code



Attachment: lista_36ec65e9.rar

3 Replies

PK Prasanna Kumar Viswanathan Syncfusion Team September 11, 2018 07:27 AM UTC

Hi Gustavo, 

Thanks for contacting Syncfusion support.  

Based on your query we suspect that you are facing issue while printing the Grid. We have prepared a Grid using your code example and we are able to reproduce the some issue while printing. Refer the below screenshot for the error. 

 

If you are facing the above issue,  then we suggest you to make changes in server side. The root cause of the issue is while printing the Skip and Take value will be 0. So kindly check the below condition for Skip and Take value. 

PHP 

<?php 
 
//session_start(); 
 
//include("connection.php"); 
 
?> 
 
<?php 
/** 
* Created by PhpStorm. 
* User: christopheweibel 
* Date: 16/01/15 
* Time: 12:20 
*/ 
header("Content-type:application/json"); 
$link = mysqli_connect('localhost', 'root', '', 'mysql'); 
 
$json_param = file_get_contents("php://input"); 
$params = json_decode($json_param,true); 
/* check connection */ 
if (!$link) { 
    printf("Connect failed: %s\n", mysqli_connect_error()); 
    exit(); 
} 
 
$filterQuery = NULL; 
$skip = isset($params['skip']) ? $params['skip'] : 0 ; 
$take = isset($params['take'])  ? $params['take'] : 0; 
 
$search = isset($params['search']) ? $params['search'] : NULL ; 
$filter = isset($params['where']) ? $params['where'] : NULL ; 
$sort = isset($params['sorted']) ? $params['sorted'] : NuLL ; 
$select = isset($params['select']) ? $params['select'] : NuLL ; 
$query =$sql = "SELECT * FROM help_category"; 
 
/* Searching operation */ 
.                 .               .         .       .  
 
if($take != null && $take > 0){ 
    $query = $query." limit ".$skip.",".$take;  //perform skip and take operation 
} 
 
$result = mysqli_query($link,$query); 
 
$json=array(); 
 
while ($row = mysqli_fetch_array($result)) { 
    array_push($json,array( 
                           'help_category_id' => $row{'help_category_id'}, 
                           'name' => $row{'name'}, 
                           'parent_category_id' => $row{'parent_category_id'}, 
                            
                          )); 
} 
.     .          .              .                .            .  
/* Selection Operation */ 
 
?> 
 


Or if you are using C# 
[C#] 
public ActionResult UrlDataSource(DataManager dm) 
        { 
 
            IEnumerable DataSource = OrderRepository.GetAllRecords(); 
            DataOperations ds = new DataOperations(); 
            List<string> str = new List<string>(); 
            if (dm.Search != null && dm.Search.Count > 0) 
            { 
                DataSource = ds.PerformSearching(DataSource, dm.Search); 
            } 
            if (dm.Sorted != null && dm.Sorted.Count > 0) //Sorting 
            { 
                DataSource = ds.PerformSorting(DataSource, dm.Sorted); 
            } 
            if (dm.Where != null && dm.Where.Count > 0) //Filtering 
            { 
                DataSource = ds.PerformWhereFilter(DataSource, dm.Where, dm.Where[0].Operator); 
            } 
            
            var count = DataSource.Cast<EditableOrder>().Count();            
            DataSource = ds.PerformSkip(DataSource, dm.Skip);            
            if (dm.Take != null && dm.Take > 0) 
            { 
                DataSource = ds.PerformTake(DataSource, dm.Take); 
            } 
            return Json(new { result = DataSource, count = count }); 
        } 

If the above issue that you are not facing in your application, kindly share more details(screenshot of an issue, Essential Studio Version details) regarding the issue that you are facing in your application  

Regards, 
Prasanna Kumar N.S.V 
 



GU Gustavo September 11, 2018 08:04 PM UTC

I Attack my server-side code

My code include

$skip = isset($params['skip']) ? $params['skip'] : 0 ; 
$take = isset($params['take'])  ? $params['take'] : 0; 



if($take != null && $take > 0){ 
    $query = $query." limit ".$skip.",".$take;  //perform skip and take operation 
} 

But still appear blank page.



Attachment: Grid_data_732f920.rar


PK Prasanna Kumar Viswanathan Syncfusion Team September 12, 2018 11:37 AM UTC

Hi Gustavo, 
 
We checked the solution in our PHP sample, but we unable to reproduce the reported issue at our end. For your convenience we have attached the sample and please download the sample from the following link 
 
 
Provide the following detail for better assistance from our end. 
 
1. Share screen shot or video demonstration of the issue. 
 
2. If possible try to reproduce the issue in the attached sample. 
 
Regards, 
Prasanna Kumar N.S.V 


Loader.
Up arrow icon