Exporting report values with preceeding zeroes in excel
Hi,
i'm trying to export a report to excel but the report has values like '0000250000' and excel strips it down to '250000'.
How do i fix this?
Thanks
Deepak
Hi Jayvee,
Without using Mid() function you can do this.
Please follow the steps given below.
(1). Select the properties of Item Description text box.
(2). Change CanShrink to True and CanGrow to False.
(3). Adjust report width so that it will fit in A4 paper.
(4) . Save and Deploy the report.
After exporting to excel, now you can see the full item description.
Hope this will solve your issue.
Please click the 'Mark as Answer' button, if this post solves your issue.
Best Regards,
Dhanisha
Similar Messages
-
Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .
Hi Chhayank,
the problem is not the exported xls. If you have a look inside with Notepad or something like that, you will see that your leading zeros are exported correct.Excel-settings occurs this problem, it is all about how to open the document. If you use the import-assistant you will have no problems because there are options available how to handle the different columns.
Another solution might be to get familiar with ABAP2XLS-Project. I got in my mind, that there is a method implemented, that will help you solving this problem. But that is not a five minute job
~Florian -
If a class method exporting a value with the generic type 'data'.
Then how can I get the information?
For exmple.
cl_my_clss->get_value( exporting ev_data = .... ) .
ev_data is a type of data.
I can not use DATA : lv_mine type data. because generic data should be used in formal parameter, however , if I use a field symbol, how to assign value with out knowing the data type?
Best regards,Hi Blake,
As per my understanding,
You are getting the data type from the database table....
You want to use the same data type....
Lets say for example:
You have a db table x with field y having data type Z.
What you do is that, while declaring the data type for the attribute in the method use the reference as table_name-field_name(x-y).
Or....
use ANY. This will give you a chance to map any field type to this method....
Note: Using ANY will limit the syntax that you can use within the method......
Regards,
Kunjal -
ABAP-based web service returns numeric values with leading zeros
Hi SOA experts,
I have created a web service out of an ABAP function module. Beside other values, this service returns a list of document numbers. All of these numeric values are returned by the web service with leading zeros, but we do want these values w/o leading zeros.
Any ideas how I can tell the web service to not print any leading zeros?
Thanks in advance for your help!
Kind regards, Matthias
PS: The according function module does not print any leading zeros for the numeric valueshi,
just a guess: I'd try to use I instead of NUMC for the document numbers.
NUMC is no number but a character string with numeric characters only. only some display routines in SAP know that this string of numerals represents a number and omit leading zeroes.
my 2 cents,
anton -
Matrix report data with summary column in excel format
Hi ,
I want to display output of matrix report with summary column in excel format.
I have tried using spreadsheet but column header and actual data is displaying in proper order.
Please tell me the way how to do this ASAP.
Thanks in advance.Hi ,
I want to display output of matrix report with summary column in excel format.
I have tried using spreadsheet but column header and actual data is displaying in proper order.
Please tell me the way how to do this ASAP.
Thanks in advance. -
Exporting Numbers file with leading zeros as csv file
When I export a list of mobile phone numbers with leading zeros (086* etc.) from Numbers as a csv file, the leading zeros are stripped out, although the cells are previously formatted as text. What can I do about this?
"When I export a list of mobile phone numbers with leading zeros (086* etc.) from Numbers as a csv file, the leading zeros are stripped out, although the cells are previously formatted as text. What can I do about this?"
Well, the first thing you could do would be to post your question in one of the forums for Numbers.
Click Discussions to get to the Discussions index page, then the section for the version of iWork you're using, then the Numbers forum in that section.
In AppleWorks (which doesn't offer an opportunity to Save as or Export as csv) I'd force the application to see the phone numbers as text by inserting some non-numeric characters into the string of digits.
Examples: 000-123-4567, 000 123 4567
It may also be a function of the application you are using to open the csv file.
When I did a brief test of the suggestion above with Numbers '09, I got this result on opening the file in Text Edit:
,1234567890,num
,123-456-7890,tex
,0123456789,num
,012-345-6789,tex
,0001234567,num
,000-123-4567,tex
Note that both the examples entered as a string of digits only (num) and those entered with inserted hyphens (tex) kept the leading zeroes. Cell format for the column containing the phone numbers was set to Text.
Regards,
Barry -
Padding a value with leading zeros
Hi
I am trying to create a filename (String) using a sequence int. I need this int to be 6 digits, with leading zeros
i.e. if my seqence number is 23 my filename (String) should be:
FILE000023
Obviously I can do this by creating my own method that iterates through the number, but I was wondering if there was a simple method to change an int to a String and pad it out with leading zeros.
Thanks
Neil.import java.text.*;
public class DecimalFormatTesting {
public static void main( String[] args ) {
DecimalFormat format = new DecimalFormat("###.###");
format.setMinimumIntegerDigits( 6 );
String integ = format.format( 123 );
System.out.println("str: " + integ);
} // end of main()
}hope this helps
partha -
Preceeding zeroes while excel upload and download
Hi,
I am uploading some data from excel into an internal table,processing it and then downloading it again in excel.
For Excel Upload I am using CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
For Excel Download I am using GUI_DOWNLOAD.
But the problems is when the data is like 01 it is downloading it as 1 in the excel.The user don't want to do any changes after downloading it to the excel and want the data 01 to be dowloaded as 01 itself and not as 1.
We can format it in excel but the user is not willing for that.Any possibility that we can handle it in the program.
Thanks,
K.Kiran.You have to use OLE technique for the same....that will solve your case.
supposae i want to make the 5th , 6th and 7th coloumn , as character format.
The below scenario will help.
collect the contents of the excel in it[] ,
DESCRIBE TABLE it[] LINES wf_it_line.
wf_it_line = wf_it_line + 8.
CLEAR : wf_cellx, wf_celly, wf_cellr.
CALL METHOD OF wf_excel 'Cells' = wf_cellx
EXPORTING
#1 = 8
#2 = 5.
CALL METHOD OF wf_excel 'Cells' = wf_celly
EXPORTING
#1 = wf_it_line
#2 = 7.
CALL METHOD OF wf_excel 'Range' = wf_cellr
EXPORTING
#1 = wf_cellx
#2 = wf_celly.
SET PROPERTY OF wf_cellr 'NumberFormat' = '@' .
this will change the format of the excel.
then call the below method
CALL METHOD cl_gui_frontend_services=>clipboard_export
IMPORTING
data = it[]
CHANGING
rc = l_rc
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
not_supported_by_gui = 3
OTHERS = 4.
CALL METHOD OF wf_excel 'Cells' = wf_cell1
EXPORTING
#1 = 1
#2 = 1.
CALL METHOD OF wf_excel 'Cells' = wf_cell2
EXPORTING
#1 = 1
#2 = 1.
CALL METHOD OF wf_excel 'Range' = wf_range
EXPORTING
#1 = wf_cell1
#2 = wf_cell2.
CALL METHOD OF wf_range 'Select'.
CALL METHOD OF wf_worksheet 'Paste'.
then call the method 'SAVEAS' to save the excel.
Edited by: Rudra Prasanna Mohapatra on Jan 22, 2009 5:47 AM -
Preceeding Zeros in Number datatype
Hello all
Is there any way to store values with preceeding zeros in Oracle Number datatype (eg : person code: 00089034)
Thanks in advanceYes it is possible, by storing it as a varchar2. However I would advice you to store the number as a number, and use a format mask for display:
SQL> select to_char(89034,'00000009') from dual;
TO_CHAR(8
00089034
1 rij is geselecteerd.Regards,
Rob. -
Download records to EXCEL file with Leading Zero's for numbers
Hi All,
I am able to download the data to EXCEL file on the presentation server.
There are few fields (Plant,SalesOrder Number ..with Leading Zero's) in the record.
These values are downloaded with out Leading Zero's to excel( EX: 0000004122 as 4122).
Please help me to download the data to EXCEL file with leading zero's.
Thanks and Regards,
KC>
Krishna Chaitanya G wrote:
> The excel file which is to be downloaded..will be used by some other program..to upload the values to the sap.
> It matters there....
> KC
HI KC,
then no need to download the zeros,
after uploading, loop at that uploaded internal table and use CONVERSION_EXIT_APLHA_INPUT and pass the vbeln(without zeros) to this FM, it will return the value with added zeros.
hope this solves your query
a small example
Loop at itab into is.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = is-vbeln "( this is without zeros)
IMPORTING
OUTPUT = is-vbeln. "( this is with leading zeros)
modify itab from is.
endloop.
Edited by: Soumyaprakash Mishra on Oct 6, 2009 2:16 AM -
Export to Excel - data with leading zeros
Does anyone have any tips or tricks for running a query then exporting to Excel without dropping leading zeros from the data?
Examples: numeric Item codes with leading zeros, telephone numbers that have been entered with no spaces.
Regards,
Douglas McDove< Font Color="RED" Size = 3 Face=Verdana>
I liked the challenge and therefore.......I got this for you
</Font>
SELECT CHAR(28) + T0.CardCode [BP Code\] FROM [dbo\].[OCRD\] T0
SELECT CHAR(29) + T0.CardCode [BP Code\] FROM [dbo\].[OCRD\] T0
SELECT CHAR(30) + T0.CardCode [BP Code\] FROM [dbo\].[OCRD\] T0
SELECT CHAR(31) + T0.CardCode [BP Code\] FROM [dbo\].[OCRD\] T0
Any of the above 4 should work. T0.CardCode is the database field I tested, you can substitute this with any database field and it should work.
Regards
Suda -
Hidden report items with toggle are visible in Excel when a report is exported to Excel.
Hi
I have 4 Bar charts and 4 text boxes in one report in SSRS Report . These charts are hidden based on parameters. I have one visible chart and one text box when report is rendered .
When report is exported to excel 4 charts are visible. Each Bar chart has one textbox in toggle box. If I set toggle to None all hidden charts will be invisible in excel file.
I used iif(Globals!RenderFormat.Name=" EXCEL",False,True)
but it does not work when the chart is toggled by a text box.<v:shape alt="" id="Picture_x0020_1" o:spid="_x0000_i1025" style="width:6in;height:396pt;"
type="#_x0000_t75"></v:shape>Hi Katherine
Thank you for your quick response.
I am working with three versions .(SQL SERVER 2008, 2008 R2 and 2012)
I designed all reports in SQL Server 2008 and uploaded them in other versions.
For example, I have a chart that it is invisible when the report is initially run.
I want to hide this chart in excel when I export it to Excel format.
In SQL Server 2008: If the toggleitem of a chart sets to a text box the chart is visible in excel when it is a hidden item in the report .
I checked in PDF and word format it is fine and hidden items are not displayed.
There is this scenario for SQL Server 2008 R2 and SQL Server 2012. I tested Globals! RenderFormat in two versions but it does not
work. The main issue is toggleitem. If I remove toggleitem from hidden items they are invisible in three versions when they are exported to Excel. I am not sure if I design report in Sql Server 2008 R2 I can hide some
report items with toggle in Excel format or Not?
Thanks -
Preceeding zeros disapprearing in the excel download.
I have programmed ALV report using function module REUSE_ALV_GRID_DISPLAY.
I have declared my final output internal table's batch field as CHARG_D which is of 10 characters.
I have passed field_catelog-no_zero = 'X'. for batch field.
However when I download into excel sheet, preceeding zeros of batch disappearing in excel sheet.
Is there any way to retain the preceeding zeros for batch values and other similar fields values in the excel sheet after download ?
THANKS IN ADVANCE.There's a few variations on how to get the data from ALV into Excel and I don't have a system right now, so I can only give a general comment. If the direct export to Excel (OLE) doesn't work, I'd recommend to export the data as local file using format Spreadsheet and give it an extension like ".csv".
When saving the file this way, it really is just a tab separated file (text file, you can view it via Notepad and check for the leading zeros), which you can open in Excel. However, you have to be careful, because when you double-click on the file, Excel will usually open the file directly and format your batch (CHARG_D) field with type General. As a result anything that looks like a number, will be stripped off the leading zeros. Therefore instead you should open the data via the import wizard (e.g. in Excel 2007 it's on the Data ribbon under Get external data and then choosing From text) and reformat the field CHARG_D from General to Text. This will ensure that you'll keep the leading zeros.
There's lots of other ways to do it and my version is probably not the most efficient. However, it works in general, as long as you see the leading zeros in the ALV and is easy to remember (at least for me)...
Good luck, harald -
How export report into excel sheet automatically using SSRS 2010?
Hi,
I have created many reports using SQL Server Data Tool 2010 and at my work, we are using active batch to ran reports every month.
Now question is, my boss want me to set up reports such a way that when active batch is ran, reports should be exported into excel sheet automatically with the default values given for parameters at some specific folder location. How can I export report
into excel sheet automatically when active batch is executed?
Please help me on this. Thanks for the help in advance.
VickyCheck this:
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:/test.xls'
filetype = 'ASC'
write_field_separator = 'X'
TABLES
data_tab = t_output
Regards. -
Issue while exporting report in Excel Format
Hello,
I am facing problem while exporting the report in Excel Format. After analysis, I think that it could be due to two reasons, either we are using wrong versions of Jars, or we are using wrong API. Here is the code, approaches and problems we are facing. Please help.
First approach we are using is:
// using basic API
import com.crystaldecisions.reports.sdk.ReportClientDocument;
// get client document from crystal report API and open the report by specifying the report name, with path
ReportClientDocument reportClientDoc = new ReportClientDocument();
reportClientDoc.open( reportPath, 0 );
// give chance to extending classes to configure the report document by POJO or by sql parameter etc, just adding the parameters infromation using ParameterFieldController
configureReportDocument( reportClientDoc, reportMetadata, reportData, reportContext );
// get data source of crystal report
Object reportSource = reportClientDoc.getReportSource();
// export the data - we have also tried with MSExcel format
ReportExportFormat exportFormat = ReportExportFormat.recordToMSExcel;
LOGGER.debug( "exportFormat[" + exportFormat + "]" );
ByteArrayInputStream byteArray = (ByteArrayInputStream) reportClientDoc.getPrintOutputController().export(
exportFormat );
Problem Faced: Specified Excel format is not supported.
Second Approach: We come to know that excel format is supported with new releases and with occa package.
Then we tried with import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument; It ask to set the ReportServer. When we are trying to set the server as
reportClientDoc.setReportAppServer(ReportClientDocument.inprocConnectionString);
Application is unable to find 'ReportClientDocument.inprocConnectionString' property. It seems like we are using some old jars. However we have downloaded the latest released jars for eclipse 2.
Please help for it. Issue is to export the report in excel format, which is currently working fine for PDF. If this problem is related to Jars, please suggest the path to download the latest jars. We also looking for the latest jars like rasapp and rascore etc. But these are not available with Crystal Report for Eclipse 2 release.
Waiting for urgent help. Thanks you..
Regards,
MohitHi,
Send me Environment Details .
Here is the code snippet for exporting report to excel format:
<%@ page import="com.crystaldecisions.sdk.occa.report.application.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.report.definition.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.report.data.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
<%@ page import="com.crystaldecisions.sdk.framework.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.managedreports.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.infostore.*" %>
<%@ page import="com.crystaldecisions.sdk.occa.report.exportoptions.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%
String username ="Administrator";
String password ="";
String cmsname ="localhost:6400";
String Authen ="secEnterprise";
//connecting to Enterprise
IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon(username,password,cmsname,Authen);
//get the report App Factory form the Crystal Enterprise
IReportAppFactory appFactory = (IReportAppFactory) es.getService("","RASReportService");
//get the infostore service form the Crystal Enterprise
IInfoStore istore = (IInfoStore) es.getService("","InfoStore");
//get the report by name from crystal Enterprise
IInfoObjects iobjects = istore.query("Select * From CI_INFOOBJECTS Where SI_NAME = 'sampleramz2.rpt' and SI_INSTANCE = 0 ");
//open the report in the report doc object.
ReportClientDocument Doc = appFactory.openDocument((IInfoObject)iobjects.get(0), 0, Locale.ENGLISH);
// WORKING WITH THE PRINT OUTPUT CONTROLLER
//Use the report documents PrintOutputController to export the report to a ByteArrayInputStream
ByteArrayInputStream byteIS = (ByteArrayInputStream)Doc.getPrintOutputController().export(ReportExportFormat.recordToMSExcel);
// EXPORTING THE REPORT
//Create a byte[] (same size as the exported ByteArrayInputStream)
byte[] buf = new byte[2000 * 1024];
int nRead = 0;
//Set response headers to indicate pdf MIME type and inline file
response.reset();
response.setHeader("Content-disposition", "inline;filename=ramz");
response.setContentType("application/xls");
//Send the Byte Array to the Client
while ((nRead = byteIS.read(buf)) != -1)
response.getOutputStream().write(buf, 0, nRead);
//Flush the output stream
response.getOutputStream().flush();
//Close the output stream
response.getOutputStream().close();
%>
Let me know any information is needed,
Regards,
Rameez
Maybe you are looking for
-
How to automount a home directory?
Are there any docs that explain the steps necessary to configure iPlanet Directory Server 5.1 to automount a user's home directory? I'm using Solaris 8 & 9 clients.
-
ROS - where is questionnaire data saved in SRM?
Hi all, After the supplier completes the self registration (BSP ROS_SELF_REG), receives a questionnaire in his mail box. Then he fills out this questionnaire and sends back his response to SRM. In SRM the professional purchaser can view that answer
-
Prompts, with Hierarchy node (profit centre) key search issue
Hi, I have a report which has Profit centre Hierarchy as one of the Prompts. As in the BW it is configured with comtrolling area compounded, it appears as e.g 0006P12345 and at the Webi report level, the user needs to give not only the profit centre
-
Widescreen Format custom preset in Compressor 4?
I used to do HD (16X9) format only, but ever since I saw other views, especially really cool looking cinematic music videos carrying the widescreen format I've been wanting to apply that to my videos. Currently my only known solution to this is simpl
-
how can i buy wats app?