Export to .rtf
Export to .rtf
Hi,
We are using StimulReport .NET 2007.1 Trial version. We have faced with some problems.
1. While exporting the report in xls, rtf, and html formats, the links in the table of contents part does not work. Also, the report appears in a tabular form. Is this a problem in the trial version, or can't I have a proper report in .doc format?
2. While retrieving images from the database (using the URL of the images), it does not retrieve all of the images I want, although the URLs are correct.
3. Is it possible to have unlimited page size during design time, and have A4 pages at run time?
4. The header appears on every page that the data of the header continues. Is it possible to write the header once?
If I am not clear, let me know.
Any ideas are appreciated.
Thanks in advance.
We are using StimulReport .NET 2007.1 Trial version. We have faced with some problems.
1. While exporting the report in xls, rtf, and html formats, the links in the table of contents part does not work. Also, the report appears in a tabular form. Is this a problem in the trial version, or can't I have a proper report in .doc format?
2. While retrieving images from the database (using the URL of the images), it does not retrieve all of the images I want, although the URLs are correct.
3. Is it possible to have unlimited page size during design time, and have A4 pages at run time?
4. The header appears on every page that the data of the header continues. Is it possible to write the header once?
If I am not clear, let me know.
Any ideas are appreciated.
Thanks in advance.
Export to .rtf
This ability works now for export in Pdf only.bakidost wrote:1. While exporting the report in xls, rtf, and html formats, the links in the table of contents part does not work.
Please see the report.ExportDocument method. There you can set additional parameters for the export.bakidost wrote:Also, the report appears in a tabular form. Is this a problem in the trial version, or can't I have a proper report in .doc format?
For the HTML export you may use Span mode of the export, for the Rtf - Frame mode. These parameters may be set as in the export parameters window as in the settings parameter of the ExportDocument method.
Please describe this in more details.bakidost wrote:2. While retrieving images from the database (using the URL of the images), it does not retrieve all of the images I want, although the URLs are correct.
1. You need to set LargeHeight in true.bakidost wrote:3. Is it possible to have unlimited page size during design time, and have A4 pages at run time?
2. LargeHeightFactor property sets the number of times in which the Height of the page in the design time will be increased.
This mode doesn't affect to runtime.
Please set PrintOnAllPages property in false.bakidost wrote:4. The header appears on every page that the data of the header continues. Is it possible to write the header once?
Export to .rtf
Thank you for your quick reply.
I have a problem while I was trying to export the report in HTMLSpan mode. The images appear in the viewer, but they do not appear in the report in HTMLSpan mode. I saved the report with .html extension, can the problem arise due to that?
2. While retrieving images from the database (using the URL of the images), it does not retrieve all of the images I want, although the URLs are correct.
I am using SQL Server as the database and connect to the database inside the designer. I have drag and drop of database fields to the report, and there is no problem in the text part. I also dragged images to the report. I used Image URL, and the Image URL is the database field {Image.URL}. I have a databand X, and I used it as master component of the image databand. Here, for some groups, it retrieves the images, and for some of them it does not retrieve. What can be the problem? Is the database refreshed each time the report is compiled?
I have a problem while I was trying to export the report in HTMLSpan mode. The images appear in the viewer, but they do not appear in the report in HTMLSpan mode. I saved the report with .html extension, can the problem arise due to that?
2. While retrieving images from the database (using the URL of the images), it does not retrieve all of the images I want, although the URLs are correct.
I am using SQL Server as the database and connect to the database inside the designer. I have drag and drop of database fields to the report, and there is no problem in the text part. I also dragged images to the report. I used Image URL, and the Image URL is the database field {Image.URL}. I have a databand X, and I used it as master component of the image databand. Here, for some groups, it retrieves the images, and for some of them it does not retrieve. What can be the problem? Is the database refreshed each time the report is compiled?
Export to .rtf
You need to create image host for saving images, if needed we can provide a sample code for this. The best way is to save into mht file format.bakidost wrote:I have a problem while I was trying to export the report in HTMLSpan mode. The images appear in the viewer, but they do not appear in the report in HTMLSpan mode. I saved the report with .html extension, can the problem arise due to that?
Please send tobakidost wrote:2. While retrieving images from the database (using the URL of the images), it does not retrieve all of the images I want, although the URLs are correct.
I am using SQL Server as the database and connect to the database inside the designer. I have drag and drop of database fields to the report, and there is no problem in the text part. I also dragged images to the report. I used Image URL, and the Image URL is the database field {Image.URL}. I have a databand X, and I used it as master component of the image databand. Here, for some groups, it retrieves the images, and for some of them it does not retrieve. What can be the problem? Is the database refreshed each time the report is compiled?

Thank you.
Export to .rtf
If you can provide a sample code for the image host, it will be very fine.
I have solved retrieving images problem by setting "PrintIfDetailEmpty = true".
Now, I have some other problems.
1. I have Databand1 whose source is Student. Databand2 & Databand3's master band is DataBand1.
Databand1 - Student
Databand2 - Personal Information
Databand3 - Courses
And I want to create a table of content, that is consisting of
Jack Moliere ....................................................1
Jack Moliere's Personal Information....................1
Jack Moliere's Courses......................................2
Jane Eyre........................................................2
Jane Eyre's Personal Information ......................2
Jane Eyre's Courses ........................................0
Here, Jane Eyre's page number is 0, this is because she has not an entry in the courses table, and does not actually appear in the report, but it is appearing in the TOC. How can I avoid this situation? That is, if the detail is empty, I do not want it to be seen in the TOC.
2. Is there a table template in StimulReport? I want to create a table as below, so cross-tabs do not seem to be convenient.
StudentName-------- BirthDay ------------ BirthPlace
John Lock ------------ 1.1.2007 ------------- London
Kevser Sonmez ----- 17.06.2007 ----------- Ankara
Now, I am creating a table by simply dragging text fields and bordering them. But, when I save the report .rtf or .doc format, some fields do not fit into the cell, although they are seemed to be fitting in the viewer. How can I handle these problems?
Thank you in advance..
I have solved retrieving images problem by setting "PrintIfDetailEmpty = true".
Now, I have some other problems.
1. I have Databand1 whose source is Student. Databand2 & Databand3's master band is DataBand1.
Databand1 - Student
Databand2 - Personal Information
Databand3 - Courses
And I want to create a table of content, that is consisting of
Jack Moliere ....................................................1
Jack Moliere's Personal Information....................1
Jack Moliere's Courses......................................2
Jane Eyre........................................................2
Jane Eyre's Personal Information ......................2
Jane Eyre's Courses ........................................0
Here, Jane Eyre's page number is 0, this is because she has not an entry in the courses table, and does not actually appear in the report, but it is appearing in the TOC. How can I avoid this situation? That is, if the detail is empty, I do not want it to be seen in the TOC.
2. Is there a table template in StimulReport? I want to create a table as below, so cross-tabs do not seem to be convenient.
StudentName-------- BirthDay ------------ BirthPlace
John Lock ------------ 1.1.2007 ------------- London
Kevser Sonmez ----- 17.06.2007 ----------- Ankara
Now, I am creating a table by simply dragging text fields and bordering them. But, when I save the report .rtf or .doc format, some fields do not fit into the cell, although they are seemed to be fitting in the viewer. How can I handle these problems?
Thank you in advance..
Export to .rtf
Please see following code:If you can provide a sample code for the image host, it will be very fine.
Code: Select all
public class StiWebImageHost : StiHtmlImageHost
{
public override string GetImageString(Bitmap bmp)
{
Guid imageGuid = Guid.NewGuid();
MemoryStream imageStream = new MemoryStream();
bmp.Save(imageStream, webViewer.ImageFormat);
webViewer.Page.Cache.Add(imageGuid.ToString(), imageStream.ToArray(), null, Cache.NoAbsoluteExpiration,
webViewer.ServerTimeOut, System.Web.Caching.CacheItemPriority.Low, null);
string url = null;
string query = null;
if (webViewer.Page.Request.UrlReferrer != null)
{
url = webViewer.Page.Request.UrlReferrer.AbsolutePath;
query = webViewer.Page.Request.UrlReferrer.Query;
}
else
{
url = webViewer.Page.Request.Url.AbsolutePath;
query = webViewer.Page.Request.Url.Query;
}
if (query != null && query.Length > 0)
{
return string.Format("{0}{1}&stimulreport_image={2}", url, query, imageGuid);
}
else
{
return string.Format("{0}?stimulreport_image={1}", url, imageGuid);
}
}
private StiWebViewer webViewer = null;
public StiWebImageHost(StiWebViewer webViewer) : base (null)
{
this.webViewer = webViewer;
}
}
Please see sample report Anchors in category navigation of Demo application. This report used special anchors. To output page number in TOC we use following expression:1. I have Databand1 whose source is Student. Databand2 & Databand3's master band is DataBand1.
Databand1 - Student
Databand2 - Personal Information
Databand3 - Courses
And I want to create a table of content, that is consisting of
Jack Moliere ....................................................1
Jack Moliere's Personal Information....................1
Jack Moliere's Courses......................................2
Jane Eyre........................................................2
Jane Eyre's Personal Information ......................2
Jane Eyre's Courses ........................................0
Here, Jane Eyre's page number is 0, this is because she has not an entry in the courses table, and does not actually appear in the report, but it is appearing in the TOC. How can I avoid this situation? That is, if the detail is empty, I do not want it to be seen in the TOC.
Code: Select all
{GetAnchorPageNumber(component.TagValue)}
Code: Select all
{GetAnchorPageNumber(component.TagValue)==0?"-":GetAnchorPageNumber(component.TagValue).ToString()}
[/quote]
Export to .rtf
We will post you tomorrow special instructions for creating reports which will be export as table.bakidost wrote: 2. Is there a table template in StimulReport? I want to create a table as below, so cross-tabs do not seem to be convenient.
StudentName-------- BirthDay ------------ BirthPlace
John Lock ------------ 1.1.2007 ------------- London
Kevser Sonmez ----- 17.06.2007 ----------- Ankara
Now, I am creating a table by simply dragging text fields and bordering them. But, when I save the report .rtf or .doc format, some fields do not fit into the cell, although they are seemed to be fitting in the viewer. How can I handle these problems?
Thank you.
Export to .rtf
Read the following instruction on creating reports with table structure, please. Following the principles from this guide will cause to getting the reports with correct table structure. All unnecessary cells will never occur again!
http://forum.stimulsoft.com/upload/MSExcelExport.zip
Thank you.
http://forum.stimulsoft.com/upload/MSExcelExport.zip
Thank you.