473,387 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to wrap data using fpdfp to generate pdf?

Expand|Select|Wrap|Line Numbers
  1. function BuildTable($data) 
  2.         {    //int WordWrap($row, 15)
  3.  
  4.             if(isset($_REQUEST['ByPart']))
  5.             {
  6.             $w=array(30,30,40,30,20,20);//column heading size        
  7.             }
  8.             elseif(isset($_REQUEST['CCred']))
  9.             {
  10.             $w=array(35,60,20,30,25,23);//column heading size    
  11.             }
  12.             elseif(isset($_REQUEST['AcctRep']))
  13.             {
  14.             $w=array(40,60,35,30,20);//column heading size    
  15.             }
  16.             else
  17.             {
  18.             $w=array(40,50,30,30);//column    
  19.             }
  20.             //Color and font restoration
  21.             $this->SetFillColor(200,224,200); // column colour alternate
  22.             $this->SetTextColor(0);
  23.             $this->SetFont('');
  24.             //now spool out the data from the $data array
  25.             $fill=true; // used to alternate row color backgrounds            
  26.  
  27.                 foreach($data as $row)
  28.                     {
  29.  
  30.                         $this->SetTextColor(0);
  31.                         $this->SetFont('Times','',7);
  32.                         for($j=0;$j<count($row);$j++)
  33.                         $this->Cell($w[$j],5,$row[$j],'LR',0,'C',$fill);
  34.                         $this->Ln();            
  35.                         $fill =! $fill;
  36.                     }
  37.             $this->Cell(array_sum($w),0,'','T');
  38.         }

I want to wrap the data from mysql but its no use can anyone helo me?
Apr 22 '14 #1
0 1021

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: ASzasz | last post by:
I am new to VB .NET: I can configure a SQL adapter and access data via the datagrid. But how do you access and manipulate data if you do not require the data to show up on a form. I simply want to...
3
by: asadikhan | last post by:
Hi, I am trying to use a datalist to edit data in a MySql database as follows. For now I just want to be able to get the changes to be made on the dataset. Here is my code: using System;...
7
by: BillE | last post by:
What is the best way to add data using a DataGridView in a multi-tier application (data entry is handled in a data access layer using stored procedures)? Thanks Bill
3
by: STEPHENSS | last post by:
Hi, I have a crystal report that has many subreports over many pages and Iam getting the following error Unable to save data with report, the save data is incomplete generate the saved data Yes...
0
by: shwethatj | last post by:
Can anyone please help me..... In Crystal Reports , how to access data using PULL method .. I have got a table in server explorer which has 3 got fields. But i dont know how to access it and...
3
by: amollokhande1 | last post by:
Hi All, I am using Sql server 2005 as a backend for my application. I want to read/write the unicode data using sql query. When I am using insert into UnicodeData values('سي') command and...
1
by: blackirish | last post by:
Hi all, i am trying to write a program which takes a regular expression and generate data according to that expression. I know it's possible because there are such programs to manage this task. Do...
0
by: gouse | last post by:
Hi All, I am using libpq 'C' interface to connect to the PostgreSQL database. The encoding of Database is UTF8 and it also contains a table with UNICODE data. By using PQconnectdb() I have made a...
4
by: milan12 | last post by:
Hello Everyone, I am doing a project where i need to develop a C# windows application. I need to receive data in my laptop (windows 7) using BLED 112 Dongle from NRF 8001 which is Bluetooth Low...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.