rdlc report getting extra margin during printing


I am working on a rdlc report.I use full width(7.6 inch) of rdlc.when i check it in pdf format using crome browser I see exactly what i design in rdlc where there is no margin.I set all margin 0 using report properties option. But problem happens when i print that report,i am getting extra one inch margin around my rdlc content which is not in there when i see it in pdf view.

How can i get rid of that extra margin or reduce that margin or control that margin? is there any way to control it or set print page margin from the code?


Your print setup and properties needs configuration. i think this post is useful Every Other Page Is Blank

First you need to check whether condition is true mean check the control going inside your condition if(isset($_POST['submit'])){ //code} put die('inside condition') for the check.

Then you should insert with INSERT INTO table_name (column1, column2, column3,...) VALUES (value1, value2, value3,...)

after mysql_query you should write the echo mysql_errno() . ": " . mysql_error() . "\n"; for the get the error and find out what is the error occur during the execution.

Note: Usage of mysql extension was deprecated in PHP 5.5.0, and it was removed in PHP 7.0.0. Instead, the MySQLi or PDO_MySQL extension should be used.

You have made some few mistakes so that the query might not be inserting datas into the phpmyadmin database. The basic error you have made is in the insert query by not concatenating the values that you want in the VALUES section and the insert statement syntax will be like this.

Insert Syntax:

INSERT INTO table_name (column1, column2, column3,...) VALUES (value1, value2, value3,...)

Note: If a column is AUTO_INCREMENT (like the "id" column) or TIMESTAMP (like the "reg_date" column), it is no need to be specified in the SQL query; MySQL will automatically add the value.

Replace your Insert Code with the following

$query = "INSERT INTO booking(`name`,`email`,`contact`,`room`,`adult`,`children`,`arrival`,`departure`,`date`,`status`) VALUES('".$name."','".$email."','".$contact."','".$room."','".$adult."','".$children."','".$arrival."','".$departure."','".$date."','".$status."')";

Ensure all the values that i give in the table(column1,column2) are correct as per the table structure that you have.

Mysql Connectivity

You are missing mysql connectivity code in the code that you have provided. Ensure that you have placed the connectivity code to your file.

   $dbhost = 'localhost';
   $dbuser = 'root';
   $dbpass = '';
   $conn = mysql_connect($dbhost, $dbuser, $dbpass);
   if(! $conn )
     die('Could not connect: ' . mysql_error());
   echo 'Connected successfully';
   mysql_select_db( 'TUTORIALS' );

Note: You first put echo to the Insert Statement and then break the execution by putting the exit; and you copy the statement that is echoed and place it in SQL of the DB and then check whether any error occurs in insertion. If no error occurs remove the echo and delete the exit;

And after all the check i am suggesting you to check the Note that i have mentioned just above to this line since it will be delivering you with the perfect error what you have made.

This video can help you solving your question :)
By: admin