473,406 Members | 2,705 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,406 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 1024

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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.