How to add an extra row at the end of the Grid?
Hi gurus,
I am getting result from the select query which has 4 columns.
I got the requirement to display the sum of those columns as the last row.
How can i add the another row at the end of the iGrid ?
Data would look like
Sno Col1 Col2 Col3 Col4
1 4 6 1 6
2 5 8 0 8
3 6 1 2 5
Sum 15 14 3 19
Do i have to add transformation to the sql query? or
Can i add row to the display tempalate by accessing the Gridobject?
Please help.
Thanks
Vansi
Edited by: vamsi P on Feb 12, 2008 8:49 PM
Edited by: vamsi P on Feb 12, 2008 8:49 PM
Hi Vamsi,
There are a few options ...
1) The one suggested by Prasanna
2) Loop through all rows via JavaScript and use the GridObject methods to set cell values and then perform an applet.refreshGrid( false )
3) Apply an Inline transform
4) Use a stored procedure to return the results and the totals as one recordset.
The stored procedure would be the fastest for runtime.
The Iniline XSL transform would be the second fastest. If you specify the XSL in a generic way, you may even be able to reuse it in other scenarios. If you hardcode the fields in the XSL, it would be a matter of simple code adjustment when you encounter a similar scenario.
Hope this helps.
Cheers,
Jai.
Similar Messages
-
How to add A single row at the middle of the table in a Webi report
Hi,
I created a Webi report using Universe(Created universe using bex query).Now i have a requirement to display a row at the middle of a report. Can you please tell me ,how to add a sigle row at the middle of a Webi report.
Thanks in advance
Regards
MonikaHi Monika,
It is not really possible to add a row (I assume you mean of unrelated data) to the middle of a table in a report. You can add a new table with a single row between two tables. For instance you could add a new one row table, or even single cells which are positioned relatively between two tables. Possibly a block on top of another. But this gets tricky.
Can you explain in more detail what you are trying to do?
Thanks -
Hi for past 3 days i was thinking and breaking my head on how to add entire new at top table created in pdf report from c# windows forms with iTextSharp.
First: I was able to create/export sql server data in form of table in pdf report from c# windows forms. Given below is the code in c#.
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Text;
using System.Data;
using System.IO;
using System.Data.SqlClient;
using System.Windows.Forms;
using iTextSharp.text;
using iTextSharp.text.pdf;
namespace DRRS_CSharp
public partial class frmPDFTechnician : Form
public frmPDFTechnician()
InitializeComponent();
private void btnExport_Click(object sender, EventArgs e)
Document doc = new Document(PageSize.A4.Rotate());
var writer= PdfWriter.GetInstance(doc, new FileStream("Technician22.pdf", FileMode.Create));
doc.SetMargins(50, 50, 50, 50);
doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
doc.Open();
PdfPTable table = new PdfPTable(7);
table.TotalWidth=585f;
table.LockedWidth = true;
PdfPTable inner = new PdfPTable(1);
inner.WidthPercentage = 115;
PdfPCell celt=new PdfPCell(new Phrase(new Paragraph("Institute/Hospital:AIIMS,NEW DELHI",FontFactory.GetFont("Arial",14,iTextSharp.text.Font.BOLD,BaseColor.BLACK))));
inner.AddCell(celt);
Paragraph para = new Paragraph("DCS Clinical Report-Technician wise", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK));
para.Alignment = iTextSharp.text.Element.TITLE;
iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
png.ScaleToFit(95f, 95f);
png.Alignment = Element.ALIGN_RIGHT;
SqlConnection conn=new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
SqlCommand cmd = new SqlCommand("Select t.technician_id,td.Technician_first_name,td.Technician_middle_name,td.Technician_last_name,t.technician_dob,t.technician_sex,td.technician_type from Techniciandetail td,Technician t where td.technician_id=t.technician_id and td.status=1", conn);
conn.Open();
SqlDataReader dr;
dr = cmd.ExecuteReader();
table.AddCell("ID");
table.AddCell("First Name");
table.AddCell("Middle Name");
table.AddCell("Last Name");
table.AddCell("DOB" );
table.AddCell("Gender");
table.AddCell("Designation");
while (dr.Read())
table.AddCell(dr[0].ToString());
table.AddCell(dr[1].ToString());
table.AddCell(dr[2].ToString());
table.AddCell(dr[3].ToString());
table.AddCell(dr[4].ToString());
table.AddCell(dr[5].ToString());
table.AddCell(dr[6].ToString());
dr.Close();
table.SpacingBefore = 15f;
doc.Add(para);
doc.Add(png);
doc.Add(inner);
doc.Add(table);
doc.Close();
The code executes well with no problem and get all datas from tables into table in PDF report from c# windows forms.
But here is my problem how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
As the problem i am facing is my title or Header(DCS Clinical Report-Technician wise) is at top of my image named:logo5.png and not coming to it's center position of my image.
Second the problem i am facing is how to add new entire row to top of existing table in pdf report from c# windows form using iTextSharp?.
given in below is the row and it's data . So how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
as you can see how i create my columns in table in pdf report and populate it with sql server data. Given the code below:
Document doc = new Document(PageSize.A4.Rotate());
var writer= PdfWriter.GetInstance(doc, new FileStream("Technician22.pdf", FileMode.Create));
doc.SetMargins(50, 50, 50, 50);
doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
doc.Open();
PdfPTable table = new PdfPTable(7);
table.TotalWidth=585f;
table.LockedWidth = true;
Paragraph para = new Paragraph("DCS Clinical Report-Technician wise", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK));
para.Alignment = iTextSharp.text.Element.TITLE;
iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
png.ScaleToFit(95f, 95f);
png.Alignment = Element.ALIGN_RIGHT;
SqlConnection conn=new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
SqlCommand cmd = new SqlCommand("Select t.technician_id,td.Technician_first_name,td.Technician_middle_name,td.Technician_last_name,t.technician_dob,t.technician_sex,td.technician_type from Techniciandetail td,Technician t where td.technician_id=t.technician_id and td.status=1", conn);
conn.Open();
SqlDataReader dr;
dr = cmd.ExecuteReader();
table.AddCell("ID");
table.AddCell("First Name");
table.AddCell("Middle Name");
table.AddCell("Last Name");
table.AddCell("DOB" );
table.AddCell("Gender");
table.AddCell("Designation");
while (dr.Read())
table.AddCell(dr[0].ToString());
table.AddCell(dr[1].ToString());
table.AddCell(dr[2].ToString());
table.AddCell(dr[3].ToString());
table.AddCell(dr[4].ToString());
table.AddCell(dr[5].ToString());
table.AddCell(dr[6].ToString());
dr.Close();
table.SpacingBefore = 15f;
doc.Add(para);
doc.Add(png);
doc.Add(table);
doc.Close();
So my question is how to make my column headers in bold?
So these are my questions.
1. how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
2. how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
3.how to make my column headers in bold?
I know that i have to do some modifications to my code but i dont know how to do it. Can anyone help me please.
Any help or guidance in solving this problem would be greatly appreciated.
vishalHi,
>>1. how can i align Title(DCS Clinical Report-Technician wise) center of pdf report with image named:logo5.png immediately coming to it's right?.
2. how do i add the given below row and it's data to my top my table in pdf report from c# windows forms using itextsharp?
3.how to make my column headers in bold?<<
I’m sorry for the issue that you are hitting now.
This itextsharp is third party control, for this issue, I recommended to consult the control provider directly, I think they can give more precise troubleshooting.
http://sourceforge.net/projects/itextsharp/
Thanks for your understanding.
Regards,
Marvin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to add an extra page to the index.html page on dreamweaver CS6?
How to add an extra page to the index.html page on dreamweaver CS6?
Index.html = your domain's home page. There is only one home page per site.
To create a new page from your index, go to File > SaveAs > filename.html. Repeat for other site pages. Add links on your index page that lead to other site pages.
See Creating your first web site in DW CC (5-part tutorial)
https://helpx.adobe.com/dreamweaver/learn/tutorials/how-to/first-website-part1.html
Nancy O. -
Add JTable Row Headers At The End Of The Rows(At Right)?
hi all
i got this example for adding JTable Row Headers,but it adds the headers at the left(beginning of the row)
and i want to add the headers at the end of the row(at right),any ideas how to do that?
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.AbstractListModel;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.ListCellRenderer;
import javax.swing.ListModel;
import javax.swing.UIManager;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.JTableHeader;
* @version 1.0 11/09/98
class RowHeaderRenderer extends JLabel implements ListCellRenderer {
RowHeaderRenderer(JTable table) {
JTableHeader header = table.getTableHeader();
setOpaque(true);
setBorder(UIManager.getBorder("TableHeader.cellBorder"));
setHorizontalAlignment(CENTER);
setForeground(header.getForeground());
setBackground(header.getBackground());
setFont(header.getFont());
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus) {
setText((value == null) ? "" : value.toString());
return this;
class RowHeaderExample extends JFrame {
public RowHeaderExample() {
super("Row Header Example");
setSize(370, 150);
ListModel lm = new AbstractListModel() {
String headers[] = { "Row1", "Row2", "Row3", "Row4"};
public int getSize() {
return headers.length;
public Object getElementAt(int index) {
return headers[index];
DefaultTableModel dm = new DefaultTableModel(lm.getSize(), 4);
JTable table = new JTable(dm);
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
table.setRowHeight(18);
JList rowHeader = new JList(lm);
rowHeader.setFixedCellWidth(50);
rowHeader.setFixedCellHeight(18);
rowHeader.setCellRenderer(new RowHeaderRenderer(table));
JScrollPane scroll = new JScrollPane(table);
scroll.setRowHeaderView(rowHeader);
getContentPane().add(scroll, BorderLayout.CENTER);
public static void main(String[] args) {
RowHeaderExample frame = new RowHeaderExample();
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
frame.setVisible(true);
}fixed by:
list.setBackground(table.getTableHeader().getBackground());here's the full code:
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.ComponentOrientation;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.DefaultListModel;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.ListCellRenderer;
import javax.swing.UIManager;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.JTableHeader;
* @version 1.0 11/09/98
class RowHeaderRenderer extends JLabel implements ListCellRenderer {
JTable table;
RowHeaderRenderer(JTable table) {
this.table = table;
JTableHeader header = table.getTableHeader();
setOpaque(true);
setBorder(UIManager.getBorder("TableHeader.cellBorder"));
setHorizontalAlignment(CENTER);
setForeground(header.getForeground());
setBackground(header.getBackground());
setFont(header.getFont());
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus) {
list.setBackground(table.getTableHeader().getBackground());
setText((value == null) ? "" : value.toString());
return this;
class RowHeaderExample extends JFrame {
public RowHeaderExample() {
super("Row Header Example");
setSize(370, 150);
setLocationRelativeTo(null);
DefaultListModel lstModel = new DefaultListModel();
lstModel.addElement("Row 1");
lstModel.addElement("Row 2");
lstModel.addElement("Row 3");
lstModel.addElement("Row 4");
DefaultTableModel dm = new DefaultTableModel(lstModel.getSize(), 4);
JTable table = new JTable(dm);
table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
table.setRowHeight(18);
JList rowHeader = new JList(lstModel);
rowHeader.setFixedCellWidth(50);
rowHeader.setFixedCellHeight(18);
rowHeader.setCellRenderer(new RowHeaderRenderer(table));
JScrollPane scroll = new JScrollPane(table);
scroll.setRowHeaderView(rowHeader);
table.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
scroll.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
getContentPane().add(scroll, BorderLayout.CENTER);
public static void main(String[] args) {
RowHeaderExample frame = new RowHeaderExample();
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
frame.setVisible(true);
} -
How to add an extra DVD drive to a MacPro?
How to add an extra DVD drive to a MacPro?
Is there any where instruction on the procedure?There are instruction in the manual that came with the computer. Set the drive jumper to CS (Cable Select). You will need to remove the tray's lip.
<http://eshop.macsales.com/tech_center/index.cfm?page=removedrivedoor.html>
Be careful not to pinch or cut the cables when reinstalling the drive carrier. -
How to add a Totals row in a dashboard
Oracle Business Intelligence 11.1.1.6.4
Hi there gurus,
I would like to know how to add a totals row at the end of a pivot table within a dashboard. Notice that the column I need to sum up is a measure column and not a dimension one.
Thank a lot.Alejandro Trejo wrote:
Oracle Business Intelligence 11.1.1.6.4
Hi there gurus,
I would like to know how to add a totals row at the end of a pivot table within a dashboard. Notice that the column I need to sum up is a measure column and not a dimension one.
Thank a lot.What do you mean? That's what you would always expect to aggregate. Click the sigma sign on the Rows section and it will sum up the measures column. If not, add the aggregation rule to the measure column. Otherwise, explain IN DETAIL what you did, don't assume that what you did was correct. -
How to add a sub report at the end of the main report whilst grouped
Hi!
I have a main report that is grouped by the Customers name and then details of transactions they did with the company.
I need to add a letter at the end of each group for each customer (With their name displayed in the letter). I tried adding a sub report in the report footer, but it only appears once at the end of the report, rather than at the end of each group for each customer.
How can I achieve the desired result?
Regards
VikVik,
You are on the right track with the sub-report.
1. Create your letter in a separate report.
2. Add the Letter Report to your original report as a sub report in the group footer.
3. Set the report links on the "Group By" field.
This will give you a letter record for each report record with the same grouping as the main report.
Hope this helps,
Jason -
The tabs bar on 3.6 Firefox now focuses on the last tab in the row. This means that I can only effectively see one tab, unless I use the arrow button to scroll back through all the tabs. I am used to scrolling some, when there are a dozen tabs open, but How do I make the tab bar static, they way it used to be, so it stands still when I click on the last tab in the row.??
Thanks for taking a stab at it: that didn't prove to be the problem. That option in the settings for tabbed browsing was not checked.
I may be a bit behind the times: I am used to tabbed browsing showing all the tabs it possibly can, instead of just the last one. Sometimes it won't even show the last tab: I can have 15 tabs open, and not see a single tab. I've been confused by this into closing a window with lots of tabs open, because it looks like a single page-window.
My main problem with the tab-bar flashing to the end of the row is that it means a great deal more mouse-clicking around to browse.
I haven't tried installing the latest beta. Maybe that would fix the problem.
Toddo -
Hi friends,
I need to add one horizontal line for the detail section at the end of the page.
I tried to put that line in page footer and i tried with Box also. Both are not properly working. Some space problem is coming.
Is there any feature to find end of the Page.
I want report format like this.
set id | set name | date Name
1 x dddd vijay
dddd sarathi
dddd reddy
(End of the page)
Thanks in advance...
vijay.Do you know how many detail records are showing up per page?
If you do - you could create a Details B section that is suppressed except for on Record N (where N is a counter, and N is the last Detail record that will show up on a page).
The Page footer is indeed built so that it will be rendered at the bottom of your physical page of paper. -
Does anyone know how to add a preface page at the beginning of the book in ibooks author once the book is written? No matter how I try to add a Preface page, it goes to the end of the book.
Thanks. I've tried this and apparently the template I'm using is one of those where it doesn't work. I've tried dragging it as well as cutting a pasting but it always travels back to the end of the book. Maybe I can try changing the template temporarily, move the preface page, and then convert back to the original template. I'll experiment a little.
-
Need to add a new row at the end of the table
Experts,
working jdev 11.1.1.3.0
i am adding row programetically, my requirement need to add the row at after last row.
i tried different ways.
Row newLastRow = getPWBBidLaneVO().last();
int lastRowIndex = getPWBBidLaneVO().getRangeIndexOf(newLastRow);
getPWBBidLaneVO().insertRowAtRangeIndex(lastRowIndex - 1,
laneRow);
this is giving --- java.lang.ArrayIndexOutOfBoundsException: 0
and
http://kohlivikram.blogspot.com/2008/10/add-new-row-in-adf-table-on-button.html --- its giving index out of bound because vo.getRangeSize() is 25. We set this value at vo for performance improment suggestions.
is there a way to add a new row at the end of the table?Add this to the view row impl class
public void insertRow(Row row) {
//go to the end of Rowset if it has rows
Row lastRow = this.last();
if (lastRow !=null){
//insert new row at the end and make it current
int indx = this.getRangeIndexOf(lastRow)+1;
this.insertRowAtRangeIndex(indx,row);
this.setCurrentRow(row);
}else { // empty Rowset
super.insertRow(row);
} -
How to add a customer field or extn coll in the tab1&2&3..of a UDO doc?
Hi Experts,
Does anybody know how to add a customer field or extn collection in the unused tabs like tab1&2...in a UDO document?
Thanks for your reply in advance.
Thanks & Regards,
DavidHi Subhasini - <br><br>
It seems you have discovered that adding an extension field to the Project Suppliers collection is not possible; many of the collections in E-Sourcing do not support extensions and, even when they do, typically, the table view of the data cannot be changed to show the extension value (it would only show on a "details" page, for example.<br><br>
The solution that you have proposed may work, although I think there is a slight mistake in your logic. I believe you are saying that the script would take data from the newly created extension collection and populate data in the out-of-the-box vendor collection. <br><br>
In thinking about your solution, I believe the benefit is that any logic and reporting based on the standard collection continues to function correctly (e.g., creating an RFx from the Project will use the out-of-the-box vendor collection).<br><br>
That being said, I generally am reluctant to do a "replace" of a standard collection with an extension collection as you propose. My recommendation is that you challenge the customer on the importance of this requirement. For example, could the code be maintained on the vendor record? Why is it maintained in Projects? If it is maintained in the vendor record, could you just populate a read only collection the Projects that shows the vendor and code? Could a report be written that can be launched from within the Project to show the values? How does the customer intend to use this field? Could the display name of the vendor object be the right place for it?<br><br>
I hope these ideas are helpful.<br><br>
Regards,<br><br>
Rob<br><br> -
How to Add a parameter of currency exchange rate in the selection screen
Dear Friends,
How to Add a parameter of currency exchange rate in the selection screen with format (9999.99999). wich field i need to take.
Thanks,
SridharTCURR-UKURS.
~Suresh -
Hi there,
How do I remove the (-signed) which Adobe adds to the end of the document name after having signed it?
It is not convenient to remove it every time I sign a document. So, is there a way to turn this off?
Thank youI think you cannot, because for many people it is so important to keep the unsigned document, and most do not realise this until it is too late.
Maybe you are looking for
-
How can I remove noise from the paparazzi's constant camera clicks?
You know how annoying those camera clicks could be while you're trying to hear others talk! I tried using SoundSoap (the demo version) from BIAS-Inc.com but it cuts down on the whole audio as well so some of the speech gets lost. Is there another fil
-
Mid-2007 Mac mini and HDMI issues
I have a Mid-2007 Mac Mini with OS X 10.7.3, that, most of the time, will work fine with a DVI->HDMI cable and either of 2 HDMI ports on the TV. The Mini recognizes the display correctly (a Vizio E371VL). The display's native res. is 1080p at 60hz, a
-
Any way to get the 'filter comments' button to appear in quick tools
I'm using the 'Highlight Text' tool to add comments to a document. I want to be able to quickly print the document with comments hidden. There doesn't seem to be functionality to display comments on-screen but hide them during printing. Since this is
-
Elements 9, DSLR H.264 - What codec is best to edit with & highest quality?
Hello All, I have quite a bit of DSLR footage I recently shot using a Canon 5d. I have Adobe Premiere Elements 9 and it really chokes down the system. I have a PC with i7 and 8 gigs of RAM. What would be the best file format to convert the H.264 fo
-
Hi Adobe InDesign Scripters/Employee, I have very big doubt? Why not shown the correct answer points Tick Mark and helpful answer start symbol not shown in my Profile why. I was give the correct answer last two things one is "Delete facing pages in I