March 2010

You are currently browsing the articles from Information City written in the month of March 2010.

Crystal Report export to Excel: missing footer

There’s this mystery issue happened in the recent Visual Studio project code upgrade. The problem happens after upgrading from Visual Studio 2003 to Visual Studio 2008. Those reports which were exported to Excel document found out to have missing footer but the same issue did not happen to other reports type (pdf/word).

Searching around the net, found this link. Posted on SAP community network Forum, the very same problem which I am facing. User “A G” posted some codes which worth trying:

Something that I tried in VS2005 and CRXIR2SP2 (higher that 10) to bring the footer contents in every page:

ReportDocument RDObject = new ReportDocument();
// Loading the report
RDObject.Load(Server.MapPath(“Employee Sales.rpt”));
// Passing the parameter to report
RDObject.SetParameterValue(“Employee ID”,”AFTRD”);

ExportOptions exop = new ExportOptions();

// Setting the format to Excel type
ExcelFormatOptions excel = ExportOptions.CreateExcelFormatOptions();
exop.ExportFormatType=ExportFormatType.Excel;
exop.ExportFormatOptions=excel;

// Enabling the headers and footers for each page
excel.ExportPageHeadersAndFooters = (ExportPageAreaKind.OnEachPage);
CrystalReportViewer1.ReportSource = RDObject ;

// Exporting the report
RDObject.ExportToHttpResponse(exop, Response, true, “”);

I haven’t try it myself but the user has claimed it manage to print the footer on each of the pages. Probably will try it out later.

Written by admin on March 31st, 2010 with no comments.
Read more articles on Entertainment.

Crystal report export Excel, fit to 1 page

Apparently this was one of the request from a client recently. Sadly, the report was a direct export from crystal report function and attempting to search for a way to force the report to be exported with the scaling of 1 page width and height failed. The current version that we are using is 10.5, which is also the version which comes with VS2008.

And another enhancement came in place was the crystal report to print a dynamic picture where the source location should be configurable (in app.config). There is an obvious limitation reported for version 10.5 and the feature was made available in the recent version of Crystal, we were to come up with a workaround to make it work. After much trial and errors, manage to do it by saving the image into a table of a database, and linking the table to the existing ones in crystal. This way the crystal would grab the image from the database instead of the physical location in the local directory. Not the best solution but could get the thing delivered.

Written by admin on March 27th, 2010 with no comments.
Read more articles on Knowledge Base and Programming.

Twitter hacker: “No system is invulnerable”

In the recent news reported, Hacker Croll, the nick of the hacker who broke into the twitter administrator account being nice in proving to public on the above mentioned statement. I agrees with the statement indeed, in fact, I believes there is no system that is perfect (bug-free). Programs are developed by the programmers which are human who could have prone to error. If the bug has been identified, the turn-over time on fixing the problem should be rated instead to ensure that it is being resolved and improved. A program without improvement would not be of any better, in which I believe same goes to human which learns each and every day.

Written by admin on March 27th, 2010 with no comments.
Read more articles on Personal.

« Older articles

No newer articles