Problem in Batch Export Report
Hi all,
I have developed a report in PP module for Batch exports.
Here iam providing the input as plant, material no & batch and the output will be Orderwise material no, batch, mat desc, density and Quantity.
While executing the report the output is coming exactly for the first order while for the second order the values are not fetching correctly.
Pls suggest me.
*& Report ZPP_EXPORTBATCH
REPORT ZPP_EXPORTBATCH.
TABLES: MSEG,MKPF,AUFK,AFPO. "
TYPE-POOLS SLIS.
DATA: IT_EVENTS TYPE SLIS_T_EVENT,
WA_EVENTS TYPE SLIS_ALV_EVENT,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
X_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
LIST_LAYOUT TYPE SLIS_LAYOUT_ALV, "#EC *
GS_KEYINFO TYPE SLIS_KEYINFO_ALV, "#EC *
W_PROG TYPE SY-REPID,
P_RS_LINEINFO TYPE SLIS_LINEINFO.
Internal Tables**********************************
TYPES: TY_SCLASS TYPE STANDARD TABLE OF SCLASS.
TYPES: TY_OBJECTDATA TYPE STANDARD TABLE OF CLOBJDAT.
TYPES: BEGIN OF T_MSEG,
BWART LIKE MSEG-BWART,
MATNR LIKE MSEG-MATNR,
MAKTX LIKE MAKT-MAKTX,
CHARG LIKE MSEG-CHARG,
MENGE LIKE MSEG-MENGE,
ERFME LIKE MSEG-ERFME,
AUFNR LIKE MSEG-AUFNR,
AUSP1 LIKE CLOBJDAT-AUSP1,
ERROR(30),
END OF T_MSEG.
TYPES: INT_MSEG_FINAL TYPE STANDARD TABLE OF T_MSEG .
TYPES: BEGIN OF TY_MENGE1,
MATNR TYPE MSEG-MATNR,
CHARG TYPE MSEG-CHARG,
MENGE TYPE MSEG-MENGE,
ERFME TYPE MSEG-ERFME,
MBLNR TYPE MSEG-MBLNR,
ZEILE TYPE MSEG-ZEILE,
END OF TY_MENGE1.
TYPES: TY_MENGE TYPE STANDARD TABLE OF TY_MENGE1.
DATA : LENGTH TYPE I,
DIFFERENCE TYPE I,
IT_CLASS TYPE TY_SCLASS,
IT_OBJECTDATA TYPE TY_OBJECTDATA,
WA_CLASS TYPE SCLASS,
WA_OBJECTDATA TYPE CLOBJDAT,
L_MATNR TYPE MATNR,
INT_MSEG_FINAL TYPE INT_MSEG_FINAL,
WA_MSEG_FINAL TYPE T_MSEG,
WA_MSEG TYPE MSEG,
WA_WEMNG TYPE AFPO-WEMNG,
WA_PSMNG TYPE AFPO-PSMNG,
WA_AMEIN TYPE AFPO-AMEIN,
BAL_QTY TYPE AFPO-WEMNG,
INT_MSEG_TEMP1 TYPE INT_MSEG_FINAL,
WA_CALCULATED1 TYPE AFPO-WEMNG,
IT_MENGE TYPE TY_MENGE,
WA_MENGE1 TYPE TY_MENGE1,
WA_MAKTX TYPE MAKT-MAKTX,
WA_HSDAT TYPE MCH1-HSDAT,
WA_MAKTX_MAIN TYPE MAKT-MAKTX,
MAIN_DEN TYPE STRING,
DENSITY TYPE STRING,
MDENSITY TYPE STRING,
IDENSITY TYPE STRING.
data : tqty like mseg-menge.
data:INT_MSEG_TEMP2 LIKE MSEG OCCURS 0 WITH HEADER LINE.
data:INT_MSEG_TEMP3 LIKE MSEG OCCURS 0 WITH HEADER LINE.
**************Initialization********************************************
INITIALIZATION.
**************Input Parameters List*************************************
SELECTION-SCREEN SKIP 3.
SELECTION-SCREEN BEGIN OF BLOCK BLOCK1 WITH FRAME TITLE TEXT-T01 . "#EC
SELECT-OPTIONS : S_WERKS FOR MSEG-WERKS OBLIGATORY, "PLANT
S_MATNR FOR MSEG-MATNR OBLIGATORY, "MATERIAL NUMBER
S_CHARG FOR MSEG-CHARG, "BATCH
S_BUDAT FOR MKPF-BUDAT. "POSTING DATE
SELECTION-SCREEN END OF BLOCK BLOCK1.
START-OF-SELECTION.
PERFORM READ_DATA.
PERFORM SUB_PREPARE_FIELDCATALOG.
PERFORM FILL_EVENTS_TABLE.
END-OF-SELECTION.
PERFORM DISPLAY_DATA_USING_GRID.
*& Form READ_DATA
text
--> p1 text
<-- p2 text
FORM READ_DATA .
DATA :INT_AFPO LIKE AFPO OCCURS 0 WITH HEADER LINE.
DATA :INT_MSEG LIKE MSEG OCCURS 0 WITH HEADER LINE,
INT_MSEG_TEMP LIKE MSEG OCCURS 0 WITH HEADER LINE.
SELECT SINGLE MAKTX
INTO WA_MAKTX_MAIN
FROM MAKT
WHERE MATNR IN S_MATNR.
DATA : WA_MENGE LIKE MSEG-MENGE.
SELECT SINGLE *
FROM AFPO
INTO INT_AFPO
WHERE MATNR IN S_MATNR
AND CHARG IN S_CHARG
AND DWERK IN S_WERKS.
MOVE INT_AFPO-WEMNG TO WA_WEMNG.
MOVE INT_AFPO-PSMNG TO WA_PSMNG.
MOVE INT_AFPO-AMEIN TO WA_AMEIN.
SELECT *
INTO TABLE INT_MSEG
FROM MSEG
WHERE AUFNR = INT_AFPO-AUFNR
AND BWART IN ('261' , '262' )
AND WERKS IN S_WERKS.
REFRESH INT_AFPO.
int_mseg_temp3[] = int_mseg[].
LOOP AT INT_MSEG.
clear tqty.
loop at int_mseg_temp3 WHERE MATNR = INT_MSEG-MATNR
and charg = int_mseg-charg
AND AUFNR = INT_MSEG-AUFNR
if int_mseg_temp3-bwart = '261' .
tqty = tqty + int_mseg_temp3-menge.
elseif int_mseg_temp3-bwart = '262'.
tqty = tqty - int_mseg_temp3-menge.
endif.
endloop.
int_mseg-menge = tqty.
SELECT SINGLE *
FROM AFPO
INTO INT_AFPO
WHERE MATNR = INT_MSEG-MATNR
AND CHARG = INT_MSEG-CHARG
AND DWERK IN S_WERKS.
IF SY-SUBRC EQ 0 AND INT_AFPO-AUFNR <> ' '.
SELECT * FROM MSEG
INTO TABLE INT_MSEG_TEMP
WHERE AUFNR = INT_AFPO-AUFNR
AND BWART IN ('261' , '262' )
AND WERKS IN S_WERKS.
LOOP AT INT_MSEG_TEMP.
WA_CALCULATED1 = ( INT_MSEG_TEMP-MENGE / INT_AFPO-WEMNG ) * INT_MSEG-MENGE.
WA_MENGE1-MENGE = WA_CALCULATED1.
WA_MENGE1-MATNR = INT_MSEG_TEMP-MATNR.
WA_MENGE1-CHARG = INT_MSEG_TEMP-CHARG.
WA_MENGE1-ERFME = INT_MSEG_TEMP-ERFME.
WA_MENGE1-MBLNR = INT_MSEG_TEMP-MBLNR.
WA_MENGE1-ZEILE = INT_MSEG_TEMP-ZEILE.
APPEND WA_MENGE1 TO IT_MENGE.
CLEAR: WA_CALCULATED1, WA_MENGE1.
ENDLOOP.
SORT IT_MENGE BY MBLNR ZEILE MATNR CHARG.
ENDLOOP.
CLEAR INT_MSEG.
MODIFY TABLE INT_MSEG FROM INT_MSEG_TEMP.
LOOP AT INT_MSEG_TEMP.
MOVE-CORRESPONDING INT_MSEG_TEMP TO INT_MSEG.
READ TABLE IT_MENGE INTO WA_MENGE1
WITH KEY MATNR = INT_MSEG_TEMP-MATNR
CHARG = INT_MSEG_TEMP-CHARG
MBLNR = INT_MSEG_TEMP-MBLNR
ZEILE = INT_MSEG_TEMP-ZEILE.
INT_MSEG-MENGE = WA_MENGE1-MENGE.
APPEND INT_MSEG.
CLEAR INT_MSEG.
*Added for Changes given by anup ART:09MAR08
CLEAR WA_MENGE1-MENGE.
*End of for Changes given by anup ART:09MAR08
ENDLOOP.
REFRESH INT_MSEG_TEMP.
CLEAR INT_AFPO.
ELSE.
MOVE: INT_MSEG-MATNR TO WA_MSEG_FINAL-MATNR,
INT_MSEG-CHARG TO WA_MSEG_FINAL-CHARG,
INT_MSEG-MENGE TO WA_MSEG_FINAL-MENGE,
INT_MSEG-ERFME TO WA_MSEG_FINAL-ERFME,
INT_MSEG-BWART TO WA_MSEG_FINAL-BWART .
APPEND WA_MSEG_FINAL TO INT_MSEG_FINAL.
CLEAR WA_MSEG_FINAL.
CLEAR INT_AFPO.
ENDIF.
ENDLOOP.
INT_MSEG_TEMP1[] = INT_MSEG_FINAL[].
REFRESH INT_MSEG_FINAL.
SORT INT_MSEG_TEMP1 BY MATNR CHARG.
LOOP AT INT_MSEG_TEMP1 INTO WA_MSEG_FINAL.
ON CHANGE OF WA_MSEG_FINAL-MATNR
OR WA_MSEG_FINAL-CHARG.
IF WA_MSEG_FINAL-BWART = '261'.
WA_MENGE = WA_MENGE + WA_MSEG_FINAL-MENGE.
ELSEIF WA_MSEG_FINAL-BWART = '262'.
WA_MENGE = WA_MENGE - WA_MSEG_FINAL-MENGE.
ENDIF.
WA_MSEG_FINAL-MENGE = WA_MENGE.
CLEAR WA_MENGE.
APPEND WA_MSEG_FINAL TO INT_MSEG_FINAL.
CLEAR WA_MSEG_FINAL.
ENDON.
ENDLOOP.
LOOP AT INT_MSEG_FINAL INTO WA_MSEG_FINAL.
SELECT SINGLE MAKTX
INTO WA_MAKTX
FROM MAKT
WHERE MATNR = WA_MSEG_FINAL-MATNR.
WA_MSEG_FINAL-MAKTX = WA_MAKTX.
MODIFY INT_MSEG_FINAL FROM WA_MSEG_FINAL TRANSPORTING MAKTX.
CLEAR WA_MAKTX.
****************CHGS BY MURALI.C FOR
DATA: WA_OBJECT(50) TYPE C.
LENGTH = STRLEN( WA_MSEG_FINAL-MATNR ).
IF LENGTH LT 18.
DIFFERENCE = 18 - LENGTH.
DO DIFFERENCE TIMES.
CONCATENATE WA_MSEG_FINAL-MATNR SPACE INTO L_MATNR.
ENDDO.
ENDIF.
CONCATENATE L_MATNR WA_MSEG_FINAL-CHARG INTO WA_OBJECT RESPECTING
BLANKS.
CALL FUNCTION 'CLAF_CLASSIFICATION_OF_OBJECTS'
EXPORTING
CLASS = ' '
CLASSTEXT = 'X'
CLASSTYPE = '023'
CLINT = 0
FEATURES = 'X'
LANGUAGE = SY-LANGU
OBJECT = WA_OBJECT
OBJECTTABLE = 'MCH1'
KEY_DATE = SY-DATUM
INITIAL_CHARACT = 'X'
NO_VALUE_DESCRIPT = NO_VALUE_DESCRIPT
CHANGE_SERVICE_CLF = 'X'
INHERITED_CHAR = ' '
CHANGE_NUMBER = ' '
TABLES
T_CLASS = IT_CLASS
T_OBJECTDATA = IT_OBJECTDATA
I_SEL_CHARACTERISTIC = I_SEL_CHARACTERISTIC
T_NO_AUTH_CHARACT = T_NO_AUTH_CHARACT
EXCEPTIONS
NO_CLASSIFICATION = 1
NO_CLASSTYPES = 2
INVALID_CLASS_TYPE = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
read TABLE IT_OBJECTDATA INTO wa_objectdata
with KEY SMBEZ = 'Density'.
if wa_objectdata-ausp1 <> '?'.
perform density_calc using wa_objectdata-ausp1 changing idensity.
WA_MSEG_FINAL-AUSP1 = idensity.
else.
WA_MSEG_FINAL-ERROR = 'classification value missing'.
endif.
MODIFY INT_MSEG_FINAL FROM WA_MSEG_FINAL TRANSPORTING AUSP1 ERROR.
CLEAR :WA_MSEG_FINAL-MATNR,WA_MSEG_FINAL-CHARG,WA_MSEG_FINAL-AUSP1,WA_OBJECT,WA_OBJECTDATA-AUSP1.
ENDLOOP.
ENDFORM. " READ_DATA
*& Form SUB_PREPARE_FIELDCATALOG
text
--> p1 text
<-- p2 text
FORM SUB_PREPARE_FIELDCATALOG .
X_FIELDCAT-FIELDNAME = 'MATNR'.
X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
X_FIELDCAT-SELTEXT_M = 'MATERIAL NUMBER'. "#EC NOTEXT
X_FIELDCAT-JUST = 'C'.
X_FIELDCAT-OUTPUTLEN = 10.
X_FIELDCAT-KEY = 'X'.
X_FIELDCAT-KEY_SEL = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'MAKTX'.
X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
X_FIELDCAT-SELTEXT_M = 'MATERIAL DESCRIPTION'. "#EC NOTEXT
X_FIELDCAT-JUST = 'C'.
X_FIELDCAT-OUTPUTLEN = 17.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'CHARG'.
X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
X_FIELDCAT-SELTEXT_M = 'BATCH'. "#EC NOTEXT
X_FIELDCAT-JUST = 'C'.
X_FIELDCAT-OUTPUTLEN = 10.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'AUSP1'.
X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
X_FIELDCAT-SELTEXT_M = 'DENSITY'. "#EC NOTEXT
X_FIELDCAT-JUST = 'C'.
X_FIELDCAT-OUTPUTLEN = 6.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'MENGE'.
X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
X_FIELDCAT-SELTEXT_M = 'QUANTITY'. "#EC NOTEXT
X_FIELDCAT-JUST = 'C'.
X_FIELDCAT-OUTPUTLEN = 9.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'ERFME'.
X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
X_FIELDCAT-SELTEXT_M = 'UOM'. "#EC NOTEXT
X_FIELDCAT-JUST = 'C'.
X_FIELDCAT-OUTPUTLEN = 9.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
*X_FIELDCAT-FIELDNAME = 'EDATU1'.
X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
X_FIELDCAT-SELTEXT_M = 'CONFIRMED QUANTITY DATED'. "#EC NOTEXT
X_FIELDCAT-JUST = 'C'.
X_FIELDCAT-OUTPUTLEN = 9.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'ETENR1'.
X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
X_FIELDCAT-SELTEXT_M = 'CONFIRM SL NO'. "#EC NOTEXT
X_FIELDCAT-JUST = 'C'.
X_FIELDCAT-OUTPUTLEN = 9.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'LFIMG'.
X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
X_FIELDCAT-SELTEXT_M = 'DELIVERED QUANTITY'. "#EC NOTEXT
X_FIELDCAT-JUST = 'C'.
X_FIELDCAT-OUTPUTLEN = 18.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'ERDAT'.
X_FIELDCAT-TABNAME = 'INT_MSEG_FINAL'.
X_FIELDCAT-SELTEXT_M = 'DELIVERED DATE'. "#EC NOTEXT
X_FIELDCAT-JUST = 'C'.
X_FIELDCAT-OUTPUTLEN = 18.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
ENDFORM. " SUB_PREPARE_FIELDCATALOG
*& Form FILL_EVENTS_TABLE
text
--> p1 text
<-- p2 text
FORM FILL_EVENTS_TABLE .
WA_EVENTS-NAME = 'TOP_OF_PAGE'.
WA_EVENTS-FORM = 'PRINT_HEADING'.
APPEND WA_EVENTS TO IT_EVENTS.
ENDFORM. " FILL_EVENTS_TABLE
FORM PRINT_HEADING. "#EC CALLED
DATA IT_HEADINGS TYPE SLIS_T_LISTHEADER.
DATA WA_HEADINGS LIKE LINE OF IT_HEADINGS.
CLEAR WA_HEADINGS.
WA_HEADINGS-TYP = 'H'.
WA_HEADINGS-INFO = ' '.
WA_HEADINGS-TYP = 'H'.
WA_HEADINGS-INFO = ' BATCH EXPORT DETAILS REPORT '.
APPEND WA_HEADINGS TO IT_HEADINGS.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_HEADINGS
I_LOGO = 'APARLOGO' .
ENDFORM. "PRINT_HEADING
*& Form DISPLAY_DATA_USING_GRID
text
--> p1 text
<-- p2 text
FORM DISPLAY_DATA_USING_GRID .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_BYPASSING_BUFFER = 'X'
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-CPROG
IT_FIELDCAT = IT_FIELDCAT
I_SAVE = 'A'
IT_EVENTS = IT_EVENTS
TABLES
T_OUTTAB = INT_MSEG_FINAL
IF SY-SUBRC <> 0. "#EC *
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DISPLAY_DATA_USING_GRID
*& Form density_calc
text
-->P_WA_OBJECTDATA_AUSP1 text
<--P_IDENSITY text
FORM density_calc USING WA_OBJECTDATA_AUSP1
CHANGING DENSITY.
data: den type float,density1(8).
density1(8) = wa_objectdata-ausp1.
call function 'CHAR_FLTP_CONVERSION'
exporting
DYFLD = ' '
MASKN = ' '
MAXDEC = '16'
MAXEXP = '59+'
MINEXP = '60-'
string = density1
MSGTYP_DECIM = 'W'
importing
DECIM =
EXPON =
flstr = den
IVALU =
EXCEPTIONS
EXPONENT_TOO_BIG = 1
EXPONENT_TOO_SMALL = 2
STRING_NOT_FLTP = 3
TOO_MANY_DECIM = 4
OTHERS = 5
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
if den gt 0.
density = 1 / den.
density = density(5).
density = density / 10.
den = strlen( density ).
if den ge 6.
density = density(6).
clear: den.
den = strlen( density ).
elseif den lt 6.
density = density.
clear: den.
den = strlen( density ).
endif.
else.
density = '0.000'.
endif.
den = strlen( density ).
data: den3(5) type c.
if den gt 3.
case den.
when '6'.
clear: den3.
compute den3 = 10000 * ( density(6) - density(5) ).
if den3 between 6 and 9.
clear: den3.
compute den3(2) = 10000 * ( density(5) - density(4) ).
compute den3 = den3(1) + 1.
compute den3 = den3 / 1000.
compute density = density(4) + den3.
endif.
when '5'.
clear: den3.
compute den3 = 1000 * ( density(5) - density(4) ).
if den3 between 6 and 9.
clear: den3.
compute den3(2) = 1000 * ( density(4) - density(3) ).
compute den3 = den3(1) + 1.
compute den3 = den3 / 100.
compute density = density(3) + den3.
endif.
endcase.
endif.
density = density(5).
ENDFORM. " density_calc
Hello,
I haven't checked the code but from the symptom you describe it could be possible that some fields used to calculate valeus are not getting cleared between calculations. This could result in some values from order the first order one being used in the calculation for values in the second order.
Regards,
Steve.
Similar Messages
-
Problem batch exporting odd sized mp4's in After Effects?
Just been given the great task of converting hours and hours of supplied image sequences into mp4/ h.264 files for playing through silverlight. I envisaged assembling these sequences with their supplied sound tracks in after effects and outputing to mp4 with h.264 encoding
I'm working at a non broadcast size (1000 x 576)and cannot get the after effects h.264 exporter in the render queue (adobe media encoder) to swallow this size without throwing up an error. It wants me to stretch the footage to different sizes based on what few presets are available, when I want to maintain the current size.
I know I can export exactly what I want via the file menu (file> export>MPEG4) or via quicktime if I export a lossless file first, but I can't batch that in a render queue & I will have quite a lot of files to set off.
Is there any way to get the mpeg 4 render options as seen under file> export , working in the render queue as the standard options in the render queue seem limited?
Alternatively can any anyone recommend a good batch mp4 encoder app in the event I cant get everything I want out of after effects?ok , i can see the problem.
try this if you need to finish your work within the next couple of hours:
use Ae render queue >> export quicktime >> Foto or Motion Jpeg >> download mpeg streamclip >> batch export to H264 mpeg4 >> done.
do a few seconds of render tests b4 you send the whole bunch to the batch. also 4 mpeg streamclip.
and if you are happy with the result, blame adobe... -
Illustrator CS 2 batch export to PDF problem
I am trying to get Illustrator to batch export a number of EPS files to PDF files but I am having a problem. The first file will save-as fine and come out as a PDF but each successive file saves as a .ai file and not as a PDF.
The action is saved as follows:
Open
Save as (I selected High Quality Print as the PDF preset)
Close.
When I Batch run the action, the first one comes out as expected but thereafter they are .ai files. Is there something I am missing?
ATAction window
Save As window -
Problem after exporting report to MS Excel
Hello everyone,
I'm exporting a report (SSRS report) to MS Excel, the problem is though the report gets exported fine but the area outside the report i.e. everything outside the columns and rows of the report remains blank there are no gridlines. But my requirement is to
show the gridlines when the exported file is opened so that the user will not have to do anything extra for having the gridlines visible again.
Please help me with this issue, I am using C# for developing the application.....
Thanks in advance...Hi Aakash Kelkar,
According to your description, the report works fine when you export it to excel, but the gridlines outside the report are missing. You want to keep the gridlines visible when the exported file is opened.
According to my test, we can’t achieve your goal directly use report designer. As a workaround, when open the exported file in excel, click View in toolbar, then check gridlines check box, the gridlines will be displayed. If the workaround doesn’t
meet your requirements, i recommend you that submit the requirement at
https://connect.microsoft.com/SQLServer/ . If the requirement mentioned by customers for many times, the product team may consider to add this feature in the next SQL Server version. Your feedback is valuable for us to improve our products and increase
the level of service provided.
If you have any questions, please feel free to let me know.
Best Regards,
Wendy Fu -
Help me, I have a problem with font when export report to PDF?
Hi everyone! Help me
I have a problem with font when export report to PDF
My report uses template .rtf with font Times New Roman (Unicode), language is VietNamese.
when desige template no problem, error only happen when view report by PDF.
Edited by: user10236405 on Oct 15, 2008 11:23 PMgive it time to boot. the time depends on yr memory size n data. soon a process bar will appear indicating the boot process. if still this doesnt work. try formating the phone. but this ways u lose all data on the phone (unless u backed it). relax! the data on the memory card is safe.
-
How can I fix my Batch Export problem?
"the batch export failed for some items" is what I get when I try batch exporting footage.
It worked fine for the first month of using FCP 7.
All I want to do is convert my quicktime clips to Apple Pro Res.
I have no Idea what the problem is!
Help?Please ask your question on the Final Cut Studio forum.
-
How can I fix my Batch Exporting problem?
"the batch export failed for some items" is what I get when I try batch exporting footage.
It worked fine for the first month of using FCP 7.
All I want to do is convert my quicktime clips to Apple Pro Res.
I have no Idea what the problem is!
Help?After I resist the temptation to ask why you're transcoding to ProRes in mid-stream, all I can come up with is:
Need more info on the error circumstances
OR
You could batch the source clips in Compressor and start over
OR
Try smaller batches
OR
Trash your prefs, repair permissions, and try again -
Problem in Exporting report content to spreadsheet.
Hi,
When exporting report output to spreadsheet, the currency and quantity values are not getting exported properly.
For example : in report MB51 after getting the output, from menu-> list->export->spreadsheet->all available formats->Microsoft excel (in existing XXL Format)->table.
This is happening in Office 2007 only. And when i try to export the data to local file->spreadsheet, this problem is not there.
Do i need to do any settings in MS office excel or SAP GUI.
Plz suggest.
Thanks
PradeepHi Vinod,
I have gone thru the notes mentioned by you, but did not work for me.
: symbol is being displayed, for ex: 1090:96
As i have already mentioned that i am not getting the error when i export the data to local file->spreadsheet.
Thanks
pradeep -
Problem facing for Exporting a Group above report to excel
Hello all any one can tell me How to set columns and rows of a Group above to report to export to excel.
I have a group above report but when i export it to excel the Columns and rows are out of order.Tell me what type of sequence should apply on columns and rows?????????Adeel Aslam wrote:
No Dear I mean I have called the Procedure of Exporting report to Excel On Each Field On Format Trigger.But whan i run it and Export it Then columns and Rows are out of Order on Excel sheet.I only want to know standard sequence that i should apply in smart trigger that the fields are shown in excel same like on report.
RegardsI'm guessing you're not referring to SQL and PL/SQL then.
Oracle doesn't have a built in procedure for exporting to Excel, so how the data is being ordered is going to depend on the code in that procedure and whoever wrote it. If you need more assistance you need to give us more details of what it's doing. -
Problem while exporting report
Hi
I have created report with 7 subreport with crosstab in some subreports.When i run report its giving me more than 2000 records within minute But when i am going to export report into XLS or PDF or MS Word ,
its giving me timeout in crystal report but if we pass some optional parameters then its getting exported properly(with 50 to 60 records).
Please suggest on above.Thanks In Advance
Regards
VishalVishal if you ask my honest opinion I hate the idea of using sub reports. I use maximum of 2 sub reports, and not more. Infact when it comes to use sub reports, I try to arrange things in database instead of arranging them onto the reporting side.
For example, I will check all the sub report codes and see if I can use those tables in my main report. The ones which can be used I will use them and ones which can't be used I will create temp commands (tables) under the Crystal Database.
If that solution doesn't work then I would ask my db admin to arrange something so that I can arrange the report.
Think this way, the main people who uses these reports are managers,directors. Do you think they have enough time to sit and wait for the report to come? Max they can wait is 5mins from my experience, over that and they start doubting your abilities.
Unless or otherwise, these reports needs to run overnight, try avoiding subreports and use alternative methods.
Regards
Jehanzeb -
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 -
Data getting truncated while exporting report to a text file in crystal 10?
Hi All,
I am using crystal 10.When exporting report to a text file ,a dialog prompts asking for Character perinch with a default value 9.If I change the value from 9 to 16 i am getting the correct data(that means character per inch value is 16) and it update "CharPerInch" value in registry under following location to 16.
HKEY_CURRENT_USER\Software\Crystal Decisions\10.0\Crystal Reports\Export\Text
The dialog asked for character per inch also has option to select not to prompt again and i also selected that in first go.
When i export the report again in text format it didn't prompt for number of character per inch but the data gets truncated.
What i believe is even though it updates entry in registry and reads, it is not using the same value for export. It never consider the value that is in registry, if the check box is not selected then it is using the value entered in the dialog and if the check box is selected then in the next run it uses the default value as 9.
Can anyone suggest me how to override this problem ? Is there any other setting place in registry where i can enter the number of character per inch.I don't want to crystal to prompt always for character per inch.Hi Venkateswaran,
The other option to avoid truncation of the data could be
Right click the text filed
Click on Format Text to open the Format Editor
On Common tab check the text box for Can Grow.
This will prevent the data from truncating in preview as well as while exporting to text.
Otherwise you will have to set the characters per inch to 16 each time. I donu2019t see changing the registry value causing any difference here.
Regards,
Aditya Joshi -
Many problems with the 'Export to Text' (.txt) in CR Xi
Hi,
I have listed many problems with the 'Export to Text' (.txt) function of CR Xi.
These problems are related to this export format only (meaning everything works fine in the Viewer or in the 'Export to PDF')...
- Multi-columns layout do not export as Multi-column (export only a one column);
- Numeric values with parenthesis for negative values or with a fix currency sign at the leftmost position are not exported correctly;
- Fields having a Suppress formula which is "WhilePrintingRecords" do not appears when exported;
- Fields with 'Suppress double value' checked are not always suppressed when exported to Text.
- 'Keep Group Together' flag is not working.
- 'Reset Page Number After' simply does not works when exported to text;
- 'Keep object together' on TextBox/Section is not working.
- Whenever a group is ending on the last line of a page, the the following page as the same Group header as the previous group with no records until the page is filled, then the PageBreak and PageHeader is missing but the records of the following group appears.
I would like to know what is the status of the 'Export to Text' function (is it a deprecated function not supported anymore???).
If still supported, when will these bugs be fixed???
ThanksHi Rene
Export to Text is supported till date. Crystal Reports 2008 also supports this with Keep together working however when I tried with format with multiple columns, it didnot show up in the exported text file.
Regards
Sourashree -
IllegalArgumentException error while exporting report in PDF format
Hi all,
we are using Crystal Report 2008, Java 1.5.22 and JRC 11.8.4.1094 to export reports in pdf format within java.
It is working fine for all reports except for a specific report where it gives IllegalArgumentException while exporting the PDF.
Below the error occurred:
12:39:16,875 ERROR [c] Disk Exporter: no output file was created by an exporter
12:39:16,875 ERROR <b> PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob (from destination?); aborting export
java.lang.IllegalArgumentException
at com.crystaldecisions.reports.exporters.destination.disk.c.a(Unknown Source)
at com.crystaldecisions.reports.exporters.format.page.pdf.b.a(Unknown Source)
at com.crystaldecisions.reports.a.e.if(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.export(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.export(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.NonDCPAdvancedReportSource.export(Unknown Source)
at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.export(Unknown Source)
at com.crystaldecisions.report.web.event.br.a(Unknown Source)
at com.crystaldecisions.report.web.event.w.a(Unknown Source)
at com.crystaldecisions.report.web.event.b7.broadcast(Unknown Source)
at com.crystaldecisions.report.web.event.av.a(Unknown Source)
at com.crystaldecisions.report.web.WorkflowController.do(Unknown Source)
at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source)
at com.crystaldecisions.report.web.ServerControl.a(Unknown Source)
at com.crystaldecisions.report.web.viewer.ReportExportControl.a(Unknown Source)
at com.crystaldecisions.report.web.ServerControl.getHtmlContent(Unknown Source)
12:39:16,875 INFO [c] Disk Exporter: finalizing export to destination
12:39:16,875 ERROR [JRCCommunicationAdapter] Failed to export report
com.crystaldecisions.reports.exporters.format.page.pdf.a.a: Unknown exception is thrown
at com.crystaldecisions.reports.exporters.format.page.pdf.b.a(Unknown Source)
at com.crystaldecisions.reports.a.e.if(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.export(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.export(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.NonDCPAdvancedReportSource.export(Unknown Source)
at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.export(Unknown Source)
at com.crystaldecisions.report.web.event.br.a(Unknown Source)
at com.crystaldecisions.report.web.event.w.a(Unknown Source)
at com.crystaldecisions.report.web.event.b7.broadcast(Unknown Source)
at com.crystaldecisions.report.web.event.av.a(Unknown Source)
at com.crystaldecisions.report.web.WorkflowController.do(Unknown Source)
at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source)
at com.crystaldecisions.report.web.ServerControl.a(Unknown Source)
at com.crystaldecisions.report.web.viewer.ReportExportControl.a(Unknown Source)
at com.crystaldecisions.report.web.ServerControl.getHtmlContent(Unknown Source)
Caused by: java.lang.IllegalArgumentException
at com.crystaldecisions.reports.exporters.destination.disk.c.a(Unknown Source)
... 56 more
Have an idea?
ThanksHello Andrea.
I searched through the SAP Notes for the error that you are encountering. There is an SAP Note that exists titled the following:
1332907 - Report being exported to PDF format using the Crystal Reports for Eclipse 1.x runtime, errors with the exception: PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob
Since you may not have access to the SAP Notes, I will extract the details that are mentioned in the note here:
=============================================
Symptom
Attempting to export a report to Adobe PDF format using the Crystal Reports for Eclipse 1.x runtime results in an exception.
The exception indicates "PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob"
Environment
Windows 2003
Apache Tomcat 5.0
Crystal Reports for Eclipse version 1.x
Reproducing the Issue
Using the Crystal Reports for Eclipse runtime version 1.x attempt to export a report to PDF format that has the "Repeat Group Header on Each Page" option enabled.
Note: This does not occur if this option is enabled in a subreport.
Cause
When the "Repeat Group Header on Each Page" is enabled for a group in a main report the Crystal Reports for Eclipse 1.x runtime is unable to correclty format the PDF document which results in an exception.
Resolution
Updating the application to use Crystal Reports for Eclipse version 2.x runtime will resolve the issue.
The most recent updates to the Crystal Reports for Eclipse runtime can be freely downloaded from the SAP SDN Website.
http://www.sdn.sap.com/irj/boc/crystalreports-java
=============================================
Since you are on JRC 11.8.4.1094 which is Crystal Reports for Eclipse 1.x, this may be the cause of your problem.
I hope that this helps.
Regards.
- Robert -
Export Report times out - how do I export all my customers?
We have about 35,000 customers in our BC database.
I'm trying to export them for use in a direct mailing campaign (and other reports for other reasons) but the export always times out.
The reports are very simple; ie.
Custom Report -> Add customer report
Select Customers (Contacts & Companies)
Select CRM ID, Customer Name, Default Address Type
Next
Generate report (no filters)
About 33,000 results are in the report.
I then select Export Report as CSV or Excel and it will sit there for up to an hour or more and do nothing.
Notes:
I keep the session live by having a login in another tab.
Have tried differenty browsers and internet connections.
I even filtered the results (based on create date) and same problem occurred with just 15,000.
How can I export this report and other simple reports I need?
Regards,
Troy.After Sanjit took a look at this it turns out all I needed to do was to save the report before exporting the results. The export was much quicker and, now we have more cutomers in our database, it actually exports!
Thanks again Sanjit.
Troy.
Maybe you are looking for
-
Need to display last login details to the user after they login into portal
Hi All, As per our requirement ,we need to display to the user,the following things: 1.Last login date and time will be maintained and displayed to the user after login. 2.Last unsuccessful login date and time will be maintained and displayed to the
-
HT4528 Why does my phone say invalid SIM?
My phone says invaild SIM. I cannot text, call, or connect to the internet!!! What is the problem??
-
hello all: I am using Final Cut HD and I am having problems with jpgs and PSD files blurring on playback. they look fine as still... but when I press the space bar to playback they blur horribly. I didn't used to have this problem. A recent change to
-
Why can't I download Adobe Flasher?
Why can't I download Adobe Flasher?
-
Problem with camera. lumia 920
Camera is not working after the new update 8.1 Denim. I tried Both soft reset and Hard reset.... Even Nokia Care is also fail to solve this problem..... plzzzz help me..