How to refresh the reports in excel using macros ?
Hi All,
I am generating a report using MS Excel to connecting the Sql Server 2008 Database.
In the Sql Server the reporting table is a transaction table.
When open the Excel report and click the Refresh All button under the Data tab. Then the report takes the more time to load the data.
I need the less time to load the data in the Excel report.
How can you performance to increase the report to load the data quickly.
Thanks in Advance.
Thanks,
Sreekanth
sreekanth kancharla
Hello,
First, this is a forum for SSRS = SQL Server Reporting Services, not for Excel or other topics of your question.
Do you have a filter in the query to get the data?
Olaf Helper
[ Blog] [ Xing] [ MVP]
Similar Messages
-
How to get the Report Names which use a Folder in Discoverer Administrator?
Hello All,
How could I get which Reports in discoverer Desktop are using a particular folder in Discoverer Administrator?
Or
How to know which Discoverer Desktop Reports are being derived from a folder in Discoverer Administrator?
We have Oracle 9i DS installed and have a Custom Folder Created in the Administrator, and want to know exactly which Reports/Workbooks are using that folder?
Thanks in advance :)Well Abhijit,
The eul workbooks have been created by oracle specifically to analyze your eul and make your work easier!. So, I prefer this way to view the information about my eul in a report format in the desktop. Try it! you may like it.
If you want you can follow these steps:
Run the script called eul5.sql located in <discoverer_installation_path>\discoverer\util in the user who own the eul in the database.
Then import the eul5.eex file located at <discoverer_installation_path>\discoverer\ in the discoverer administrator.
Then login into desktop and open the reports in the database, you can see a report called[b] EUL Workbook Management. Open that and goto the sheet named Workbook Dependency - Folders & Items Lookup. I think it the last but one worksheet in that workbook.
Hope it helps you! -
How to view the reports in excel
created repots in excel, then how the user will view the reports.what we must provide to the user
First of all, user should installed Spreadsheet Addin
Then, we would need to provide an access to the particular application.
Regards
Cnee -
How to get the Report Page count using crystal reports 2008
Hi,
I have to implement a business logic where in i will have to display the no. of pages generated for the report
Say for e.g. crytal report that's generated spans 25 pages in the report.
Then i will have to display a message to the user after the report generation something like "25 Pages generated"
So, how would i get this report page count so that i can fetch the value and display the same to the user.
Any sample code snippet would be of great help.
Thanks in Advance
Regards,
RamnathHi,
I am using crystal reports 2008 and i visited the link forwarded in your previous mail and got the solution for getting the lastpagenumber of the report.
nPages = crReport.FormatEngine.GetLastPageNumber(New CrystalDecisions.Shared.ReportPageRequestContext)
but, i don't find FormatEngine property for ReportDocument object.
I just wanted to know whether this property is availale in crystal reports 2008 or should i even install any service packs for this.
Please find below the namespaces that importing in my class
Imports System.Windows.Forms
Imports System.Drawing.Printing
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.Windows.Forms
Imports CrystalDecisions.CrystalReports.ViewerObjectModel
Imports CrystalDecisions.Shared.ReportPageRequestContext
Please let me know how can i get the formatEngine property for reportdocument object
Thanks in Advance
Regards,
Ramnath -
How to export the report to Excel in Essbase
I have to export a report in exce from Web Analysis.
I am selecting the option Send to Excel given in services but when I am clicking to Export Pop up appears with message "Could not Export to File"
ThanksHi Ojha,
You wish to export to an excel page from a web analysis report.
When you select "send to excel" as one of the options of the "services", a lable named "send to excel " appears on your report(you can give a desired name of this label/buttion) , then come out of the "designer" mode and click on the buttion "send to excel"( or the buttion which you had just made by providing a name).
If you are doing this ,then a new excel should open .
Hope you dont have any problem with your microsoft excel too .It might not be the reason, but re check that too.
Sandeep Reddy Enti
HCC
http://analytiks.blogspot.com -
How to delete empty coulums in Excel using Macro
Dear Users,
i have prepared a very big excel file. actually this file is record of old prices and i vlook the the part number from different files and extract the old prices. some time there is no record so all the columns is empty. let me explain little more.....i
have excel files by year 1992 To 2013. most of the times i have to vlookup the old prices, now for exampe one item we just sale in 94,97and 2007, but except these years all the columns of other years from 92 to 2013 are empty. one by one check them top to
end and delete is very hard. is there any macro which checks the value from top to end, if there is no value so it delete all the coulum...........hope i could explain my question.................
Best Regards
Tahir MehmoodHi,
Please try this code:
Sub DeleteBlankColumns()
Dim c As Integer
'declare c as variable for column number
c = ActiveSheet.Cells.SpecialCells(xlLastCell).Column
'save last column number in used range
Do Until c = 0
'Loop for each column number until it equals 0
If WorksheetFunction.CountA(Columns(c)) = 0 Then
'Check if entire column is blank
Columns(c).Delete
'if column is blank delete column
End If
'closes if statement
c = c - 1
'proceeds to the next lowest column number
Loop
End Sub
PS:
This is the forum to discuss questions and feedback for Microsoft Excel, if you have further question, please post the thread to the MSDN forum for Excel
http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
George Zhao
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs. -
Export the Report in Excel format
Hi,
How to export the Report in Excel format directly from the SAP to my Desktop.
Plz. give me the process???
Thanksuse this,
INCLUDE OLE2INCL.
INCLUDE EXCEL__C.
AND
H_EXCEL TYPE OLE2_OBJECT, " Excel object
H_MAPL TYPE OLE2_OBJECT, " list of workbooks
H_MAP TYPE OLE2_OBJECT, " workbook
H_ZL TYPE OLE2_OBJECT, " cell
H_F TYPE OLE2_OBJECT, " font
H TYPE I.
AND
PERFORM SUB_GET_DATA.
'get data here
PERFORM SUB_POP_DATA.
'populate data here
AND
PERFORM SUB_DISP_EXCEL.
*& Form SUB_DISP_EXCEL
FORM SUB_DISP_EXCEL.
START EXCEL
CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
SET PROPERTY OF H_EXCEL 'Visible' = 1. " for printing o/p line by line in excel sheet
get list of workbooks, initially empty
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
add a new workbook
CALL METHOD OF H_MAPL 'Add' = H_MAP.
output column headings to active Excel sheet
PERFORM FILL_CELL USING 1 1 1 10 'Mat Doc Number'(001) 'R'.
PERFORM FILL_CELL USING 1 2 1 4 'Item'(002) 'R'.
PERFORM FILL_CELL USING 1 3 1 10 'Mat Doc Date'(003) 'R'.
PERFORM FILL_CELL USING 1 4 1 10 'Vendor'(004) 'R'.
PERFORM FILL_CELL USING 1 5 1 20 'Mat Doc Item amount'(005) 'R'.
PERFORM FILL_CELL USING 1 6 1 15 'Material price'(006) 'R'.
PERFORM FILL_CELL USING 1 7 1 4 'Currency'(007) 'R'.
PERFORM FILL_CELL USING 1 8 1 18 'Material'(008) 'R'.
PERFORM FILL_CELL USING 1 9 1 30 'Material Desc'(009) 'R'.
PERFORM FILL_CELL USING 1 10 1 19 'Qty in Unit of Entry'(010) 'R'.
PERFORM FILL_CELL USING 1 11 1 19 'Qty Received'(011) 'R'.
PERFORM FILL_CELL USING 1 12 1 4 'Unit of Entry'(012) 'R'.
PERFORM FILL_CELL USING 1 13 1 20 'Mat Group'(013) 'R'.
PERFORM FILL_CELL USING 1 14 1 16 'Vendor Invoice'(016) 'C'.
LOOP AT T_OUT INTO W_OUT.
copy flights to active EXCEL sheet
H = SY-TABIX + 1.
PERFORM FILL_CELL USING H 1 0 10 W_OUT-MBLNR 'R'.
PERFORM FILL_CELL USING H 2 0 4 W_OUT-ZEILE 'R'.
PERFORM FILL_CELL USING H 3 0 10 W_OUT-BLDAT 'R'.
PERFORM FILL_CELL USING H 4 0 10 W_OUT-LIFNR 'R'.
PERFORM FILL_CELL USING H 5 0 20 W_OUT-DMBTR 'R'.
PERFORM FILL_CELL USING H 6 0 15 W_OUT-NETPR 'R'.
PERFORM FILL_CELL USING H 7 0 4 W_OUT-WAERS1 'R'.
PERFORM FILL_CELL USING H 8 0 18 W_OUT-MATNR 'R'.
PERFORM FILL_CELL USING H 9 0 30 W_OUT-MAKTX 'R'.
PERFORM FILL_CELL USING H 10 0 19 W_OUT-ERFMG 'R'.
PERFORM FILL_CELL USING H 11 0 19 W_OUT-WEMNG 'R'.
PERFORM FILL_CELL USING H 12 0 4 W_OUT-ERFME 'R'.
PERFORM FILL_CELL USING H 13 0 20 W_OUT-WGBEZ 'R'.
PERFORM FILL_CELL USING H 14 0 16 W_OUT-XBLNR 'C'.
CLEAR W_OUT.
ENDLOOP.
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTIN G #1 = 2.
SET PROPERTY OF H_EXCEL 'Visible' = 1.
PERFORM ERR_HDL USING 'Unable to create workbook'.
add a new workbook
CALL METHOD OF H_MAPL 'Add' = H_MAP EXPORTING #1 = 2. "----------can remove-------THIS IS FOR STAY AT LIST
PERFORM ERR_HDL USING 'Unable to create new workbook'..
FREE OBJECT H_EXCEL.
PERFORM ERR_HDL USING 'Unable to free workbook'.
ENDFORM. " SUB_DISP_EXCEL
FORM FILL_CELL *
sets cell at coordinates i,j to value val boldtype bold *
FORM FILL_CELL USING I J BOLD COL VAL I_HORIZON_ALIGN.
CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
PERFORM ERR_HDL USING 'set cell object error'.
SET PROPERTY OF H_ZL 'Value' = VAL .
PERFORM ERR_HDL USING 'set value object error'.
GET PROPERTY OF H_ZL 'Font' = H_F.
PERFORM ERR_HDL USING 'set font object error'.
SET PROPERTY OF H_F 'Bold' = BOLD .
PERFORM ERR_HDL USING 'set bold object error'..
SET PROPERTY OF H_ZL 'ColumnWidth' = COL.
PERFORM ERR_HDL USING 'set columnwidth object error'.
IF NOT I_HORIZON_ALIGN IS INITIAL.
IF I_HORIZON_ALIGN = 'L'.
SET PROPERTY OF H_ZL 'HorizontalAlignment' = XLLEFT.
ELSEIF I_HORIZON_ALIGN = 'R'.
SET PROPERTY OF H_ZL 'HorizontalAlignment' = XLRIGHT.
ELSEIF I_HORIZON_ALIGN = 'C'.
SET PROPERTY OF H_ZL 'HorizontalAlignment' = XLCENTER.
ENDIF.
ENDIF.
PERFORM ERR_HDL USING 'set Alignment object error'.
ENDFORM. "FILL_CELL
*& Form ERR_HDL
outputs OLE error if any *
--> p1 text
<-- p2 text
FORM ERR_HDL USING VAL.
IF SY-SUBRC <> 0.
WRITE: / VAL.
STOP.
ENDIF.
ENDFORM. " ERR_HDL -
Exporting CRM 2011 SSRS 2008 report to excel uses old Excel 1997-2003 version
The Notes field is appearing cut off on the exported excel spreadsheet. I am wondering if it is related to the version of excel when exporting from CRM report. The only option is MS Excel 1997-2003, when in fact we have MS Office 2010 installed. How can
I get the report export to excel to use the 2010 version? Will this clear up the issue of the excel cell from being too small to dispay the entire field? Any help would be appreciated, Thank you, Mark A MHi Mark A M,
In SQL Server 2008 Reporting Services, the Excel rendering extension renders a report that is compatible with Microsoft Excel 1997-2003. This is the unique renderer for Excel renderer in SSRS 2008. Since SSRS 2012, the default Excel renderer is the version
compatible with Microsoft Excel 2007-2010. So we cannot export the report to excel use Microsoft Excel 2007-2010 version in SSRS 2008. This is by design.
As to your issue, please note that the width of the column in Excel which inherit the width in the report. So we need make sure the cell width is sufficient to display the Notes field in report.
Reference:
Exporting to Microsoft Excel (Report Builder 2.0)
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Extract the report into excel file
how to extract the report into excel file?
which function module i have to use ?Hi Pavan,
If you want to download the displayed list in the Excel file,then at the time when the list is displayed on the screen, you can go to System option on the menu bar,from there go to List and then Save.You will get a pop up which shows you all the formats of download available.Select the one you want to and mention the target path of the file on the Presentation server.
Secondly,you can use the T-codes "CG3Y" to download the data from the Application Server to the Presentation Server and T-code "CG3Z" for vice-versa.
Or else you can use any of the FMs to first download the ABAP list to the ASCII or the BIN format and then convert it to excel using the FM "SAP_CONVERT_TO_XLS_FORMAT" or "TEXT_CONVERT_XLS_TO_SAP
I hope I have tried to answer your query.
In case of any further queries,please let know.
Regards,
Puneet Jhari. -
How to generate a report in Excel with multiple sheets using oracle10g
Hi,
I need a small help...
we are using Oracle 10g...
How to generate a report in Excel with multiple sheets.
Thanks in advance.
Regards,
RamThanks Denis.
I am using Oraclereports 10g version, i know desformat=spreadsheet will create single worksheet with out pagination, but my requirment is like the output should be generated in .xls file, and each worksheet will have both data and graphs.
rdf paperlayout format will not workout for generating multiple worksheets.
Is it possible to create multiple worksheets by using .jsp weblayout(web source) in oracle reports10g. If possible please provide me some examples
Regards,
Ram -
Hi,
Currently, we are using crystal report to all of our reporting applications, but since I/users have encountered some issues about CR's speed to load only a simple report, maybe it is now time for us to adopt a new reporting environment in which I think SSRS
can fill this problem.
To start with, I have here a sample code, that uses the crystal report to print the report directly without previewing:
csCashInvoiceCal csCashCal; --Crystal report name .rpt
dsCsReceipt dsCs; --created dataset
DataTable u;
DataRow s;
private System.Drawing.Printing.PrintDocument printDocument1;
private System.Windows.Forms.PrintDialog printDialog1;
ParameterValues paramValue;
ParameterDiscreteValue discreteValue;
ParameterFieldDefinition fieldDefinition;
private void btnPrint_Click(object sender, EventArgs e)
this.Cursor = Cursors.WaitCursor;
loadReceipt2();
print2();
csCashCal.Close();
this.Cursor = Cursors.Default;
private void loadReceipt2()
dsCs = new dsCsReceipt(); --created dataset
u = dsCs.Tables.Add("DtCsReceipt");
u.Columns.Add("Qty", Type.GetType("System.String"));
u.Columns.Add("UOM", Type.GetType("System.String"));
u.Columns.Add("Description", Type.GetType("System.String"));
u.Columns.Add("UnitPrice", Type.GetType("System.String"));
u.Columns.Add("Discount", Type.GetType("System.String"));
u.Columns.Add("Amount", Type.GetType("System.String"));
try
for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
s = u.NewRow(); double.TryParse(dgvDesc.Rows[i].Cells[Discount2.Name].Value.ToString(), out discount);
s["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
s["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
s["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
s["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
if (discount != 0)
s["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
else
s["Discount"] = "";
s["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
u.Rows.Add(s);
catch (Exception) { }
csCashCal = new csCashInvoiceCal();
csCashCal.SetDataSource(dsCs.Tables[1]);
//csCashCal.Refresh();
loadParameter2();
private void loadParameter2()
ParameterFieldDefinitions paramFieldDefinitions;
paramValue = new ParameterValues();
discreteValue = new ParameterDiscreteValue();
paramFieldDefinitions = csCashCal.DataDefinition.ParameterFields;
discreteValue.Value = date;
fieldDefinition = paramFieldDefinitions["Date"];
commonParam();
discreteValue.Value = txtcsno.Text;
fieldDefinition = paramFieldDefinitions["InvoiceNo"];
commonParam();
discreteValue.Value = txtNameTo.Text;
fieldDefinition = paramFieldDefinitions["CustomerName"];
commonParam();
discreteValue.Value = txtAdd.Text;
fieldDefinition = paramFieldDefinitions["CustomerAddress"];
commonParam();
------other parameters----
private void commonParam()
paramValue.Clear();
paramValue.Add(discreteValue);
fieldDefinition.ApplyCurrentValues(paramValue);
private void print2()
using (printDocument1 = new System.Drawing.Printing.PrintDocument())
using (this.printDialog1 = new PrintDialog())
//this.printDialog1.UseEXDialog = true;
this.printDialog1.Document = this.printDocument1;
DialogResult dr = this.printDialog1.ShowDialog();
if (dr == DialogResult.OK)
int nCopy = this.printDocument1.PrinterSettings.Copies;
int sPage = this.printDocument1.PrinterSettings.FromPage;
int ePage = this.printDocument1.PrinterSettings.ToPage;
string PrinterName = this.printDocument1.PrinterSettings.PrinterName;
try
csCashCal.PrintOptions.PrinterName = PrinterName;
csCashCal.PrintToPrinter(nCopy, false, sPage, ePage);
printcount++;
//saveCountPrint();
catch (Exception err)
MessageBox.Show(err.ToString());
This is only a simple sales receipt application that uses dgv and textboxes to push its data to dataset to the crystal report, a simple one but there are instances that it is very slow.
But I'm having trouble implementing this using SSRS, since I'm only new to this one, wherein I created the report using report wizard, with two button options inside the form for print preview or direct print selection. Actually, it is very easy to implement
with print preview because it uses reportviewer. My problem is that how can I print the report directly without using a reportviewer?
So here is my code so far which I don't know what's next:
private void button2_Click(object sender, EventArgs e)
this.Cursor = Cursors.WaitCursor;
loadReceipt3();
//print3();
this.Cursor = Cursors.Default;
ReportParameter[] parameter = new ReportParameter[11];
private void loadParameter3()
parameter[0] = new ReportParameter("InvoiceNo", txtcsno.Text);
parameter[1] = new ReportParameter("Date", date);
parameter[2] = new ReportParameter("CustomerTin", txtTin.Text);
parameter[3] = new ReportParameter("CustomerName", txtNameTo.Text);
parameter[4] = new ReportParameter("CustomerAddress", txtAdd.Text);
parameter[5] = new ReportParameter("Agent", agent);
parameter[6] = new ReportParameter("Discount", "Discount: ");
parameter[7] = new ReportParameter("TotalDiscount", lblDiscount.Text + "%");
parameter[8] = new ReportParameter("TotalSales", rdtotal);
parameter[9] = new ReportParameter("Tax", rdtax);
parameter[10] = new ReportParameter("TotalAmount", rdnet);
private void loadReceipt3()
DataSet dsrs = new DataSet();
DataTable dtrs = new DataTable();
DataRow drs;
dtrs.Columns.Add("Qty", Type.GetType("System.String"));
dtrs.Columns.Add("UOM", Type.GetType("System.String"));
dtrs.Columns.Add("Description", Type.GetType("System.String"));
dtrs.Columns.Add("UnitPrice", Type.GetType("System.String"));
dtrs.Columns.Add("Discount", Type.GetType("System.String"));
dtrs.Columns.Add("Amount", Type.GetType("System.String"));
try
for (int i = 0; i < dgvDesc.Rows.Count - 1; i++)
drs = dtrs.NewRow();
drs["Qty"] = double.Parse(dgvDesc.Rows[i].Cells[Qty.Name].Value.ToString());
drs["UOM"] = dgvDesc.Rows[i].Cells[Uom2.Name].Value.ToString();
drs["Description"] = invcode + dgvDesc.Rows[i].Cells[Description.Name].Value.ToString();
drs["UnitPrice"] = dgvDesc.Rows[i].Cells[UnitPrice.Name].Value.ToString();
if (discount != 0)
drs["Discount"] = "(" + string.Format("{0:0.##}", discount) + "%)";
else
drs["Discount"] = "";
drs["Amount"] = dgvDesc.Rows[i].Cells[Amount2.Name].Value.ToString();
dtrs.Rows.Add(s);
catch (Exception) { }
int addtlRow = 7;
if (addtlRow > (count - 1))
addtlRow = addtlRow - (count - 1);
for (int i = 0; i < addtlRow; i++)
dtrs.Rows.Add();
loadParameter3();
LocalReport localreport = new LocalReport();
localreport.SetParameters(parameter);
localreport.DataSources.Clear();
localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
localreport.Refresh();
//what's next....
So what's next after local..refresh()? Actually, I have googled a lot but I didn't found the exact solution that I'm looking for which confuses me a lot.
Anyway I'm using VS 2010 with sql server 2012 express.
You're help will be greatly appreciated.
Thank you,
HardzAfter some further studies with ReportViewer controls and with the use of this tutorial @ : http://msdn.microsoft.com/en-us/library/ms252091.aspx, which helps me a lot on how to print a report without using a report viewer, I found out what is missing
with my code above and helps solve my question.
Here's the continuation of the code above:
private void loadReceipt3()
loadParameter3();
LocalReport localreport = new LocalReport();
localreport.ReportPath = @"..\..\SsrsCashReceipt.rdlc";
localreport.SetParameters(parameter);
localreport.DataSources.Clear();
localreport.DataSources.Add(new ReportDataSource("dsSalesReceiptSsrs", dtrs));
Export(localreport);
print4();
private IList<Stream> m_streams;
private int m_currentPageIndex;
private void Export(LocalReport report)
string deviceInfo =
@"<DeviceInfo>
<OutputFormat>EMF</OutputFormat>
<PageWidth>8.5in</PageWidth>
<PageHeight>11in</PageHeight>
<MarginTop>0.25in</MarginTop>
<MarginLeft>0.25in</MarginLeft>
<MarginRight>0.25in</MarginRight>
<MarginBottom>0.25in</MarginBottom>
</DeviceInfo>";
Warning[] warnings;
m_streams = new List<Stream>();
report.Render("Image", deviceInfo, CreateStream,
out warnings);
foreach (Stream stream in m_streams)
stream.Position = 0;
private void print4()
if (m_streams == null || m_streams.Count == 0)
throw new Exception("Error: no stream to print.");
PrintDocument printDoc = new PrintDocument();
PrintDialog printDlg = new PrintDialog();
printDlg.Document = printDoc;
DialogResult dr = printDlg.ShowDialog();
if (dr == DialogResult.OK)
if (!printDoc.PrinterSettings.IsValid)
throw new Exception("Error: cannot find the default printer.");
else
printDoc.PrintPage += new PrintPageEventHandler(PrintPage);
m_currentPageIndex = 0;
printDoc.Print();
Dispose();
public void Dispose()
if (m_streams != null)
foreach (Stream stream in m_streams)
stream.Close();
m_streams = null;
private Stream CreateStream(string name, string fileNameExtension, Encoding encoding, string mimeType, bool willSeek)
Stream stream = new FileStream(name + "." + fileNameExtension,
FileMode.Create);
m_streams.Add(stream);
return stream;
private void PrintPage(object sender, PrintPageEventArgs ev)
Metafile pageImage = new
Metafile(m_streams[m_currentPageIndex]);
// Adjust rectangular area with printer margins.
Rectangle adjustedRect = new Rectangle(
ev.PageBounds.Left - (int)ev.PageSettings.HardMarginX,
ev.PageBounds.Top - (int)ev.PageSettings.HardMarginY,
ev.PageBounds.Width,
ev.PageBounds.Height);
// Draw a white background for the report
ev.Graphics.FillRectangle(Brushes.White, adjustedRect);
// Draw the report content
ev.Graphics.DrawImage(pageImage, adjustedRect);
// Prepare for the next page. Make sure we haven't hit the end.
m_currentPageIndex++;
ev.HasMorePages = (m_currentPageIndex < m_streams.Count);
Thank you very much for this wonderful tutorial. :) -
How can I export the report to Excel or CSV format in Rational(Java)?
<p>Dear all,</p><p>Now I develop CR report integrate with Web application, I use Ratioanl(RAD) to develop. And I want to export the report to Excel/CSV format, but always failed.</p><p>If I force it export CSV file in the system, when I use MS office to open this CSV file, the file content is bad.</p><p>Could any one tell me how to achieve this?</p><p> Many thanks!</p><p>Steven</p>
<p>CR4E is bundled with RAD 7...actually to be clear it is a version of CR4E Professional. Users of RAD 7 will also get a dev/test license of CR Server as well as number of additional features to support developing applications against their BusinessObjects Enterprise or Crystal Reports Server systems. For more information regarding the RAD 7 launch you can read the press release here:</p><p><strong><a href="http://biz.yahoo.com/bw/061205/20061205005363.html?.v=1">http://biz.yahoo.com/bw/061205/20061205005363.html?.v=1</a> </strong> </p><p>I am hoping to do a webinar in January highlighting a number of the new features available with the IBM Rational Application Developer integration.</p><p>As for RAD 6 support, unfortunately the CR4E toolkit does require Eclipse 3.2 support so it will not work with RAD 6. </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) <br /><br /> <strong><a href="http://www.eclipseplugincentral.com/Web_Links-index-req-ratelink-lid-639.html">Rate this plugin @ Eclipse Plugin Central</a></strong> </p>
-
How to freeze the columns in excel exported from SSRS report??
We have created a report for our client. The client wants the report in excel format. As there are nearly about 30,000 rows in the excel. Client wants us to freeze the column header names in the excel so that even after scrolling down they
will be able to see the column names.
can anybody have idea how to achieve this in SSRS?Hi Shard,
Thanks for your post, You can achive your requiremets by using the below logic. hope this will help you.
Steps to achieve it
1. Select the tabix and click on Tablix properties.
2. In the General tab under Column Headers section you can see "Keep header visible while scrolling" checkbox, check it.
3. Now the header row will be remain fixed in the report.
OR
1. In the grouping pane, make sure to turn on advanced mode (click on the small black down arrow on the far right of the grouping pane)
2. Select the corresponding (Static) item in the row group hierarchy
3. In the properties grid, set RepeatOnNewPage to true
4. KeepwithGroup to After
OR
1)Freeze the header of all columns[ Freezing table header ] : To do select static member of table header row from row groups [ Advanced Mode ] and set FixedData to true
2) Freeze the initial 2 columns : To do select static member of columns in column group and set fixedData to true .
How do you freeze the tablix header row in an Excel export file in SSRS 2008
Suhas Kudekar
Mark as Answer if this resolves your problem or "Vote as Helpful" if you find it helpful.
My Blog
Follow @SuhasKudekar -
How to send the report output to the application server in a excel file
Hello,
how to send the report output to the application server in a excel file.
and the report runs in background.
Thanks in advance.
SundeepDear Sundeep.
I'm providing you with the following piece of code ... Its working fine for me ... hopefully it suits your requirement ...
D A T A D E C L A R A T I O N *
TYPES: BEGIN OF TY_EXCEL,
CELL_01(80) TYPE C,
CELL_02(80) TYPE C,
CELL_03(80) TYPE C,
CELL_04(80) TYPE C,
CELL_05(80) TYPE C,
CELL_06(80) TYPE C,
CELL_07(80) TYPE C,
CELL_08(80) TYPE C,
CELL_09(80) TYPE C,
CELL_10(80) TYPE C,
END OF TY_EXCEL.
DATA: IT_EXCEL TYPE STANDARD TABLE OF TY_EXCEL,
WA_EXCEL TYPE TY_EXCEL..
E V E N T : S T A R T - O F - S E L E C T I O N *
START-OF-SELECTION.
Here you populate the Internal Table.
Display - Top of the Page.
PERFORM DISPLAY_TOP_OF_PAGE.
E V E N T : E N D - O F - S E L E C T I O N *
END-OF-SELECTION.
SET PF-STATUS 'GUI_STATUS'.
E V E N T : A T U S E R - C O M M AN D *
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'EXPORT'.
Exporting the report data to Excel.
PERFORM EXPORT_TO_EXCEL.
ENDCASE.
*& Form DISPLAY_TOP_OF_PAGE
text
--> p1 text
<-- p2 text
FORM DISPLAY_TOP_OF_PAGE .
SKIP.
WRITE: /05(128) SY-ULINE,
/05 SY-VLINE,
06(127) 'O R I C A'
CENTERED COLOR 1,
132 SY-VLINE.
WRITE: /05(128) SY-ULINE,
/05 SY-VLINE,
06(127) 'Shift Asset Depreciation - Period/Year-wise Report.'
CENTERED COLOR 4 INTENSIFIED OFF,
132 SY-VLINE.
WRITE: /05(128) SY-ULINE.
E X C E L O P E R A T I O N
CLEAR: IT_EXCEL[],
WA_EXCEL.
PERFORM APPEND_BLANK_LINE USING 1.
WA_EXCEL-cell_02 = ' XYZ Ltd. '.
APPEND WA_EXCEL TO IT_EXCEL.
CLEAR: WA_EXCEL.
WA_EXCEL-cell_02 = 'Shift Asset Depreciation - Period/Year-wise Report.'.
APPEND WA_EXCEL TO IT_EXCEL.
PERFORM APPEND_BLANK_LINE USING 1.
ENDFORM. " DISPLAY_TOP_OF_PAGE
*& Form APPEND_BLANK_LINE
text
-->P_1 text
FORM APPEND_BLANK_LINE USING P_LINE TYPE I.
DO P_LINE TIMES.
CLEAR: WA_EXCEL.
APPEND WA_EXCEL TO IT_EXCEL.
enddo.
ENDFORM.
*& Form EXPORT_TO_EXCEL
text
--> p1 text
<-- p2 text
FORM EXPORT_TO_EXCEL .
DATA: L_FILE_NAME(60) TYPE C.
Create a file name
CONCATENATE 'C:\' 'Shift_Depn_' SY-DATUM6(2) '.' SY-DATUM4(2)
'.' SY-DATUM+0(4) INTO L_FILE_NAME.
Pass the internal table (it_excel which is already populated )
to the function module for excel download.
CALL FUNCTION 'WS_EXCEL'
exporting
filename = L_FILE_NAME
tables
data = IT_EXCEL
exceptions
unknown_error = 1
others = 2.
if sy-subrc <> 0.
message e001(ymm) with 'Error in exporting to Excel.'.
endif.
ENDFORM. " EXPORT_TO_EXCEL
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When you click the button - Export to Excel ( GUI-Status) you'll be able to export the content of the Internal Table to an Excel file .......
Regards,
Abir
Don't forget to award Points * -
How to read the data from Excel file and Store in XML file using java
Hi All,
I got a problem with Excel file.
My problem is how to read the data from Excel file and Store in XML file using java excel api.
For getting the data from Excel file what are all the steps i need to follow to get the correct result.
Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
Thanks & Regards,
Sreenu,
[email protected],
india,If you want someone to do your work, please have the courtesy to provide payment.
http://www.rentacoder.com
Maybe you are looking for
-
can you help i got this printer last week i have put the xp drivers when i try to print the page is blank but there is some little shape at the bottom of the paper i have run a test sheet and that is fine has anyone got any ideas thanks Message Edite
-
Final cut pro wont open after installing universal upgrage
my Final cut pro wont open after installing universal upgrage, I installed just the FCP 5 from the universal disc i got from apple now it wont open goes almost all the way then simply quits without explanation I am afraid to instal the other apps for
-
Cisco Call Manager 9.1 on UCS E
Hi Community. Does any one know if the Cisco Call Manager 9.1 is supported on UCS E? i already checked the documentation on cisco.com, but i just found something about the CCM 8.6 is supported but i didn't see any guide installation. Please help.
-
Handle the Network Connection Error ...
The main purpose is to handle the Network Connection Error, when there is a Network Connection Error or pc loss the connection (remove the ETH cable), and it work in IE but not with firefox. When there isn't connection during play of sound1, Flash ca
-
Kindly do not make these forums as only the game of points
Hi all, Please stop mentioning commitments on the points as thread heading or as the part of threads.It sometimes mis guide the new persons in utilizing this forums. Even though every body interested to gain points, it does not mean that points is th