How to setup Codeigniter

How to setup Codeigniter

In this blog, we have laid down a step-by-step guide to download and install Codeigniter. The tutorial will help you setup Codeigniter. 

Before jumping into it, let’s revisit a few basics about the MVC Architecture

The Model represents your data structures.

The View is the information that is being presented to a user.

The Controller serves as an intermediary between the Model, the View, and any other resources needed to process the HTTP request and generate a web page.

Now, let’s get started.

CodeIgniter installation steps:

CodeIgniter installation steps

CodeIgniter ins

tallation steps

  • Step 1 Download Codeigniter from “https://www.codeigniter.com/download
  • Step 2 Unzip the package.
  • Step 3 Upload the CodeIgniter folders and files to your server.
  • Step 4 Open the application/config/config.php file with a text editor and set your base Step. If you intend to use encryption or sessions, set your encryption key Like : “$config[‘encryption_key’] = ‘A41H0LLJG3bc83M0Rl87CfOA3xn3zSKY’”
  • Step 5 if you want to use the database then open the application/config/database.php file with a text editor and set your database settings.
  • Step 6 If you want to use libraries then open the application/config/autoload.php file with a text editor and set libraries like :
  • Step 7 “$autoload[‘libraries’] = array(‘database’,’session’,’form_validation’);”
  • Step 8 if you want to remove index.php from the base URL then just create a .htaccess file into your project folder and paste code below:

 

  • RewriteEngine on
  • RewriteCond $1 !^(index\.php|resources|robots\.txt)
  • RewriteCond %{REQUEST_FILENAME} !-f
  • RewriteCond %{REQUEST_FILENAME} !-d
  • RewriteRule ^(.*)$ index.php/$1 [L,QSA]
  • And You should remove index.php from you config file under \application\config in :-
  • $config[‘index_page’] = ”;

That’s all there is to it. You’re good to go!

If you have any queries please schedule a meeting according to your convenience.

How to Print Each Row of Table on Separate Page in Jasper Studio

How to Print Each Row of Table on Separate Page in Jasper Studio

How to Print Each Row of Table on Separate Page in Jasper Studio

One of the most asked but least answered questions is how to print each row of a table on a separate page in Jasper Studio. Well, we have a step-by-step guide down below to answer your question.

Create a report Like separate.jrxml

To do that:

1. Click on file -> New -> Jasper Report

New Report wizards window open

2. Select Template Blank A4 and click on next.

New Report wizards report file window opens.

3.  Select the folder in the workspace where you want to put the report, and name the report Like Separate.jrxml and click on the next button.

New Report wizards  Data source  window open.

4. Select data adapter Like: “Sample DB” and write query Like “Select * from address”;

New Report wizards’ Fields window opens.

5. After selecting fields click on next button

6. Click on the Finish button.

Note: After creating the Main Report, disable all bands except the Summary Band.

Create a table in a report

To create a table in a report:

1. Select the table element from the palette and drag it to the summary band. Dataset wizard open:

2. Select dataset name Like “dataset1” and select radio button “create a new dataset from a connection or data source” and click on next button.

3. Data source window open. Select data adapter “sample DB” and put the query like “select * from address” and click on the next button

4. The window opens. Select the fields which you want to show in the dataset and click on the next button.

5. Group by the window: Select fields which you want to use in a group and click on the next button.

6. Connection window opens: select option “use same connection used to fill the master report” and click on next button.

7. Table columns window open: Select fields which you want to use in the table and click on the finish button. Tables are generated in the summary band.

Connectivity to print each row on a separate page:

Print Rows in Jasper Studio

 

1. Click on dataset1 from the outline which is created for the table.

2. Click on Groups from dataset1

3. Select a field from groups which are used in table

4. Click on the properties tab and select the advanced tab

5. Edit property “start New Page” change it to true.

Conclusion:


This is how you print each row of a table on a separate page in Jasper studio. Need expert advice? Get in touch with our team of specialists!