NxGridPrint1
#1
Posted 16 April 2008 - 04:23 PM
#2
Posted 16 April 2008 - 04:41 PM
At this moment it is not possible, but this feature will be added in near future.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#3
Posted 16 April 2008 - 04:48 PM
#4
Posted 17 April 2008 - 08:23 AM
#5
Posted 17 April 2008 - 06:59 PM
I have fix </table> closing tag. Can you please tell me more details about 2nd question.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#6
Posted 18 April 2008 - 08:13 AM
#7
Posted 18 April 2008 - 10:30 PM
You probably want to set table's caption as NextGrid.Caption. If is this I may add it.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#8
Posted 19 April 2008 - 09:21 AM
#9
Posted 19 April 2008 - 11:24 AM
var
i, j: Integer;
Html: TStringList;
HtmlFile: TextFile;
AlignStr: WideString;
CellColor: TColor;
C: string;
begin
Html := TStringList.Create;
Html.Add('<html><body>');
Html.Add('<table width="100%" cellspacing="0" cellpading="1" border="1" style="border-collapse: collapse; border: 1px solid #666666">');
Html.Add('<tr>');
Html.Add('<caption>' + Caption + '</caption>');
for i := 0 to Columns.Count - 1 do
if Columns.PositionItem[i].Visible then
begin
Html.Add('<td bgcolor="#ffffff" width="' + IntToStr(Columns.PositionItem[i].Width) + '">');
Html.Add('<font color="#000000" face="Verdana, Tahoma, Arial, Helvetica, sans-serif" style="font-size: 10px">');
Html.Add('<b>');
Html.Add(Columns.PositionItem[i].Header.Caption);
Html.Add('</b>');
Html.Add('</td>');
Html.Add('</font>');
end;
Html.Add('</tr>');
for j := 0 to RowCount - 1 do
begin
Html.Add('<tr>');
for i := 0 to Columns.VisibleCount - 1 do
if Columns.PositionItem[i].Visible then
begin
case Columns.PositionItem[i].Alignment of
taLeftJustify: AlignStr := 'left';
taCenter: AlignStr := 'center';
taRightJustify: AlignStr := 'right';
end;
CellColor := GetCellColor(i, j);
if CellColor = clNone then CellColor := clWindow;
c := HTMLColorToString(CellColor);
Html.Add('<td bgcolor="' + c + '" align="' + AlignStr + '" width="' + IntToStr(Columns.PositionItem[i].Width) + '">');
Html.Add('<font color="#000000" face="Verdana, Tahoma, Arial, Helvetica, sans-serif" style="font-size: 10px">');
case Columns.PositionItem[i].ColumnType of
ctAutoInc: Html.Add(IntToStr(j + 1));
else Html.Add(Cells[Columns.PositionItem[i].Index, j]);
end;
Html.Add('</td>');
Html.Add('</font>');
end;
Html.Add('</tr>');
end;
Html.Add('</tr>');
Html.Add('</table></body></html>');
try
AssignFile(HtmlFile, FileName);
Rewrite(HtmlFile);
Writeln(HtmlFile, Html.text);
finally
CloseFile(HtmlFile);
Html.Free;
end;
end;
I hope that it works now.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#10
Posted 21 April 2008 - 09:36 AM
#11
Posted 21 April 2008 - 10:55 AM
New version will be out today anyway and you will be able to use new method.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#12
Posted 21 April 2008 - 11:08 AM
#13
Posted 21 April 2008 - 05:59 PM
I will try to add a Footer too.
PS. Can you please read next topic about submisions of apps made by users with our componentns:
http://www.bergsoft....?showtopic=1910
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#14
Posted 21 April 2008 - 07:45 PM
I have completelly re-write SaveToHtmlFunction. Now it save xHtml + CSS file all by standard!
If you don't like attached style-sheet you may attach your own. Also, Formatings for number column are automatically applied too.
Here is how new look may be:
table.gif 2.93KB 0 downloads
and html, much cleaner:
<head>
<title>Report</title>
<link href="test_styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table>
<caption>Test Caption</caption>
<tr>
<th>First Name</th>
<th>Salary</th>
</tr>
<tr>
<td>Mike</td>
<td class="salary">2,253.00</td>
</tr>
<tr>
<td>Jack</td>
<td class="salary">115.32</td>
</tr>
<tr>
<td>Lisa</td>
<td class="salary">0.00</td>
</tr>
<tr class="footer">
<td> </td>
<td>2,368.32 $</td>
</tr>
</table>
</body>
<html>
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#15
Posted 22 April 2008 - 08:49 AM
Best regards!
#16
Posted 22 April 2008 - 09:22 AM
#17
Posted 22 April 2008 - 10:24 AM
Version for Delphi 7 is also updated. Maybe you have try while I have upload files. I suggest trying once more.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#18
Posted 22 April 2008 - 11:54 AM
NextGrid1.SaveToHtml (fname1, [hsSaveCaption, hsSaveFooter]);
What I missed?
Sorry, I find my bug))
#19
Posted 22 April 2008 - 01:11 PM
Please add one more flag hsCreateHeaders. If this option is not set this give possibility to create whole page by own.
But in your case hsCreateHeaders need to be set.
Best regards
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users