How to output PDF files in a crystal Report
Hello,
I've some data stored in a database, they are PDFs files data.
How can I include them in a report
For example
I've a Table
MyTABLE with 2 Cols (Name STRING, data byte[]) (in fact it's a .NET/DataSet)
I would like to display the content of my table in a CR
I can include a static PDF in my report, but not a variable one.
Can anyone Help Me ?
Thanks
Marc
Something I don't understand here. PDF vs. .NET Dataset.
If the data is in a .NET Dataset; (in fact it's a .NET/DataSet)
Then all you should need to do is;
crReportDocument.Database.Tables(0).SetDataSource(dataSet.Tables("NAME_OF_TABLE"))
or
crReportDocument.SetDataSource(dataSet)
or
crReportDocument.SetDataSource(dataSet.Tables(0))
How the dataset is created or what is behind the dataset should not be of any consequence. To ensure you get the fresh data, either don't enable the "Saved Data" option, or use .Refresh in your code.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]
Similar Messages
-
Adobe reader problem on viewing PDF file created by crystal report
I have a VB6 application to export the PDF file by using crystal report 9. However, when I viewed the PDF file under Adobe reader 8, I have a following message when I hit the page down key.
"An error exists on this page. Acrobat may not display the page correctly.
Please contact the person who created the PDF document to correct the problem."
After hit okay, this message will be gone and I can see the PDF file without problem. However, I don't have this issue when using Adobe reader 5 or 6 version.
If I crystal report 11 version to export the PDF, everything works fine also but our production machine can only use crystal report version 9, not 11.
Anyone have idea?? Thx!Sounds as if there is a bug in the older version of Crystal reports.
If you are prevented from installing fixes for bugs, you may well be
stuck with the effect of the bug.
Aandi Inston -
How to output PDF file through XI from PDF form generated in SAP
Hi, All,
I need to generate and send out PDF file to other system through XI. The PDF file source come from SAP PDF form which type is XSTRING. I see there is a similar thread posted here /message/527877#527877 [original link is broken]
but it seems does not have good solution there. Can anybody give a hand?
Useful information will be surely awarded.
YangHi,
Please check the links below to know about conversion agent tool,it is a third party tool which helps to convert the PDF,word doc,HL7 doc......etc into xml format.
This s/w u have to buy from SAP and do the convertion in the convertion agent tool and deploy it in the xi server.
Check the links
http://help.sap.com/saphelp_nw04/helpdata/en/43/6d95e0ac846fcbe10000000a1553f6/CMGetStart.pdf
http://help.sap.com/saphelp_nw04/helpdata/en/43/4c38c4cf105f85e10000000a1553f6/content.htm
More on the SAP Conversion Agent by Itemfield
Integrate SAP Conversion Agent by Itemfield with SAP XI
Conversion Agent a Free Lunch?
How to get started using Conversion Agent from Itemfield
Conversion Agent - Handling EDI termination characters
https://websmp102.sap-ag.de/~sapdownload/011000358700001090982006E/ConvAgentDocSP16.zip
https://websmp102.sap-ag.de/~sapdownload/011000358700004921152005E/ConversionAgent.pdf
Regards,
Phani -
How to print pdf file in SQL Server Reporting services report using command prompt?
Is there a way to automatically print a SQL Server Reporting services report on command prompt? For eg: We can save a pdf file using rs.exe utility. I want to print a pdf using rs.exe utility. Is it possible? I don't want to install any 3rd party software.
Thanks Simon for replying to my question.
In oracle form, there is oracle command to print the report from command prompt with the help of rwrun.exe
e.g: rwrun.exe REPORT="D:\Test\REP_25\MLA.REP" DESNAME="testprinter" DESTYPE="PRINTER" P_FORMNAME="MLA.FMX" P_SPRACHE="E" P_SPRACHE_NR2="1" P_WHERE_BEDINGUNG="order by land_nr" USERID="test/test.world" PSV_NAME="PSV_DEMO" PSV_JOB_ID="PS$9583" RECURSIVE_LOAD="NO"
BATCH="YES" NONBLOCKSQL="NO" ARRAYSIZE="1" PARAMFORM="NO" ERRFILE="c:\temp\psv16.tmp"<
and to save the report we just need to change DESNAME="c:\temp\OC_100001349.pdf" DESTYPE="FILE" in above command instead of DESNAME="testprinter" DESTYPE="PRINTER".
DESNAME and DESTYPE are the input parameters of the respective report.
In SSRS, we can run the file from the command prompt and save it.
rs -i "C:\Users\pujarswa\Documents\reports\new\LoadReport.rss" -s ww2004760:80/ReportServer_MSSQL -v fileName="C:\Users\pujarswa\Desktop\TipsReportLoad.pdf"
-v reportPath="/TipsReport/LoadListTabular" -t -v format="PDF" -v LandNr=4 -u ap\swati -p test@# -e Exec2005
But we cannot use same command for printing as you said we need to create another script for printing files.
I have gone through the links but I dont want to use Adobe Acrobat Reader exe for printing because client it may not have Adobe Acrobat Reader on their machine.
Also I want to pass a input parameter as type="Printer" to my report which will print directly for me and same I can acheive in command prompt passing type="Printer" fileName="C:\Users\pujarswa\Desktop\TipsReportLoad.pdf" -
How to open .dbf Files (xBase) in Crystal Report V14?
Hey,
I try to open a .DBF File (XBASE) with SAP Crystal Report V14. As result an error message appears: "Datenbank-Connector-Fehler: " followed by a lot of chinese signs. What can I do? Opening the same File with Crystal Report V10 worked fine. --> File Attached
Thanks for your help,
HarryHey,
thanks for your fast response.
I don't know which driver it's using. I just try to open it the same type as in the V10.
If I open the .dbf file through the 'database expert' dialogue - "database file" this error appears:
to translate it for you to englisch, there's written: Error during opening the database information. Details: No database connector is specified.
Regards,
Harry -
How to remove the extra space in the output pdf file?
Hi All
In our RTF layout template we have both static content and dynamic content.
In RTF template we have used many if-else,choose,For each loops.
On the account of that,In the output pdf file, we are getting lot of empty space in the place of that coding(if-else,choose,For each loops).
Is there anyway to reduce the space in the output pdf file?
Please suggest some ideas.
Thanks in Advance.White space is NOT your friend!
Make sure you don't have any unwanted whitespace between commands and especially tagged on the end of lines. Chain your commands together with no whitespace and let them wrap, do not enter carriage returns.
Cheers,
Dave -
How to generate multiple output pdf's from one oracle reports
how to generate multiple output pdf's from one oracle reports.
I have a report where I have to generate more than one output files from the same report based on a parameter.
Each output file is for each parameter.
Is this possible in oracle reports, is so how ?You can better post your question in the reports forum instead of this pl/sql forum.
-
How to save pdf file in database
Dear All,
my application is forms 6i and database is 8i,requirement is that how to save pdf file in database and users can view through formsI'll apologize up front for the length of this post. I have a few database procedures I created that write a file to a BLOB column in a table as well as retrieve the BLOB from the column after it stored there. I have successfully stored many different types of binary file to the database using these procedures - including PDF files. I have not used these procedures in a Form so I can confirm that they will work, but theoretically they should work. I'm including the code for each procedure in this posting - hence the apology for the long post! :-)
Also, since these procedures reside on the database you will need to use Forms TEXT_IO built-in package to write your file to the server before you can use these procedures to store and retrieve the file from the database.
These procedures reads and writes a binary file to a table called "LOB_TABLE." You will need to modify the procedure to write to your table.
-- Author : Craig J. Butts (CJB)
-- Name : load_file_to_blob.sql
-- : This procedure uses an Oracle Directory called "IN_FILE_LOC". If you
-- already have a directory defined in the database or would prefer to use
-- a different Directory name, make sure you modify line 21 to reflect the
-- new Directory name.
-- ==================================================================================
-- History
-- DATE WHO DESCRIPTION
-- 12/11/07 CJB Created.
CREATE OR REPLACE PROCEDURE load_file_to_blob (p_filename IN VARCHAR2) IS
out_blob BLOB;
in_file BFILE;
blob_length INTEGER;
vErrMsg VARCHAR2(2000);
BEGIN
-- set the in_file
in_file := BFILENAME('IN_FILE_LOC',p_filename);
-- Get the size of the file
dbms_lob.fileopen(in_file, dbms_lob.file_readonly);
blob_length := dbms_lob.getlength(in_file);
dbms_lob.fileclose(in_file);
-- Insert a new Record into the tabel containing the
-- filename specified in P_FILENAME and a LOB_LOCATOR.
-- Return the LOB_LOCATOR and assign it to out_blob.
INSERT INTO lob_table (filename, blobdata)
VALUES (p_filename, EMPTY_BLOB())
RETURNING blobdata INTO out_blob;
-- Load the file into the database as a blob.
dbms_lob.open(in_file, dbms_lob.lob_readonly);
dbms_lob.open(out_blob, dbms_lob.lob_readwrite);
dbms_lob.loadfromfile(out_blob, in_file, blob_length);
-- Close handles to blob and file
dbms_lob.close(out_blob);
dbms_lob.close(in_file);
commit;
-- Confirm insert by querying the database
-- for Lob Length information and output results
blob_length := 0;
BEGIN
SELECT dbms_lob.getlength(blobdata) into blob_length
FROM lob_table
WHERE filename = p_filename;
EXCEPTION WHEN OTHERS THEN
vErrMsg := 'No data Found';
END;
vErrMsg := 'Successfully inserted BLOB '''||p_filename||''' of size '||blob_length||' bytes.';
dbms_output.put_line(vErrMsg);
END;
-- Author : Craig J. Butts (CJB)
-- Name : write_blob_to_file.sql
-- Descrip : This procedure takes a BLOB object from a database table and writes it
-- to the file system
-- ==================================================================================
-- History
-- DATE WHO DESCRIPTION
-- 12/11/07 CJB Created.
CREATE OR REPLACE PROCEDURE write_blob_to_file ( p_filename IN VARCHAR2 ) IS
v_blob BLOB;
blob_length INTEGER;
out_file UTL_FILE.FILE_TYPE;
v_buffer RAW(32767);
chunk_size BINARY_INTEGER := 32767;
blob_position INTEGER := 1;
vErrMsg VARCHAR2(2000);
BEGIN
-- Retrieve the BLOB for reading
BEGIN
SELECT blobdata
INTO v_blob
FROM lob_table
WHERE filename = p_filename;
EXCEPTION WHEN OTHERS THEN
vErrMsg := 'No data found';
END;
-- Retrieve the SIZE of the BLOB
blob_length := DBMS_LOB.GETLENGTH(v_blob);
-- Open a handle to the location where you are going to write the blob
-- Note: The 'WB' parameter means "Write in Byte Mode" and is only
-- available in the UTL_FILE pkg with Oracle 10g or later.
-- USE 'W' instead for pre Oracle 10q databases.
out_file := UTL_FILE.FOPEN('OUT_FILE_LOC',p_filename, 'wb', chunk_size);
-- Write the BLOB to the file in chunks
WHILE blob_position <= blob_length LOOP
IF ( ( blob_position + chunk_size - 1 ) > blob_length ) THEN
chunk_size := blob_length - blob_position + 1;
END IF;
dbms_lob.read(v_blob, chunk_size, blob_position, v_buffer );
UTL_FILE.put_raw ( out_file, v_buffer, TRUE);
blob_position := blob_position + chunk_size;
END LOOP;
END;Hope this helps.
Craig...
-- If my response or the response of another is helpful or answers your question please mark the response accordingly. Thanks! -
How to upload pdf file format in unix file directory?
how to upload pdf file format in unix file directory?
Hi Karthikeyan,
If you have PDF internal table with you, You can follow the below method to upload into Unix directory.
DATA:file_path TYPE char100 VALUE '/usr/sap/tmp/rep_out.PDF'.
OPEN DATASET file_path FOR OUTPUT IN BINARY MODE.
IF sy-subrc EQ 0.
LOOP AT it_pdf.
TRANSFER it_pdf TO file_path.
ENDLOOP.
ENDIF.
CLOSE DATASET file_path.
Thanks
Venkat.O -
How to move PDF file from Spool to Application Server?
How to move PDF file from Spool to Application Server?
Cannot use RSTXPDFT4 because that converts OTF to PDF and the file is already PDF.
RSTXPDFT5 doesn't work. It picks the file up and assigns it a 'text' type and outputs a 1 line txt (1kb in size) on the server with the spool number in it!
The program which outputs the file to the spool, in the first place, uses adobe forms and outputs to a printer of type PDF.Hi Gemini ,
Please refer the below links.
[http://sap.ittoolbox.com/groups/technical-functional/sap-hr/convert-a-spool-to-pdf-and-save-on-application-server-in-background-720959]
[http://www.sapfans.com/forums/viewtopic.php?f=13&t=325628&start=15]
Edited by: Prasath Arivazhagan on Apr 13, 2010 4:48 PM -
How to link pdf file in flash by xml ??
how to link pdf file in flash by xml ??
try to give <a href="your address">My Pdf</a>
and your textfield should be html enabled
mytextField.html=true
mytextField.htmlText=your xml text -
How to process pdf file in clower ETL
Hi,
I want process pdf document in clower ETL dataintegartor. I have created sample project and created ETL garph universal data reader, data i have imported pdf file, while openning the metta data information it's show encoding data format and invalid delimiter and while running error in the console
Please assist me how to process pdf file with unstructured data format.
I am getting below the error,
ERROR [WatchDog] - Graph execution finished with error
ERROR [WatchDog] - Node DATA_READER0 finished with status: ERROR caused by: Parsing error: Unexpected record delimiter, probably record has too few fields. in field # 1 of record # 2, value: '<Raw record data is not available, please turn on verbose mode.>'
ERROR [WatchDog] - Node DATA_READER0 error details:
org.jetel.exception.BadDataFormatException: Parsing error: Unexpected record delimiter, probably record has too few fields. in field # 1 of record # 2, value: '<Raw record data is not available, please turn on verbose mode.>'
at org.jetel.data.parser.DataParser.parsingErrorFound(DataParser.java:527)
at org.jetel.data.parser.DataParser.parseNext(DataParser.java:437)
at org.jetel.data.parser.DataParser.getNext(DataParser.java:168)
at org.jetel.util.MultiFileReader.getNext(MultiFileReader.java:415)
at org.jetel.component.DataReader.execute(DataReader.java:261)
at org.jetel.graph.Node.run(Node.java:425)
at java.lang.Thread.run(Thread.java:619)
please can any one help me.
Thanks
Rajini C
Edited by: 954486 on Sep 19, 2012 11:19 PMThere is a separate forum for the BI/Information Discovery application of Endeca software: Endeca Information Discovery You should post your message there.
Thanks.
Sean -
How to view pdf file in java/jsp?
Hello Everybody,
Any one help me how to view pdf file in jsp using java application.
I have pdf file c:\app.pdf.
How can i display the pdf file.
Please help me.................
ThanksHello,
You can use the below code, but i am not sure how far is this a startard way of doing it.
# <%
# ServletOutputStream servletOutputStream = response.getOutputStream();
# File reportFile = new File("C:\\Tomcat 5.0\\webapps\\TestApp\\myfile.pdf");
# FileInputStream fis = new FileInputStream(reportFile);
# byte[] bytes= new byte[128000];
# int count=fis.read(bytes);
# try
# response.setContentType("application/pdf");
# response.setContentLength(bytes.length);
# servletOutputStream.write(bytes, 0, bytes.length);
# servletOutputStream.flush();
# servletOutputStream.close();
# }catch(Exception e){} -
How to display Pdf file in iPad site
Hi
How to display Pdf file in web page which can able to view in iPad safari?
Thanks,
ArunYou can't really.
You need to use DHTML in the swf-wrapper HTML file, usually a
division wrapped iFrame, and load the PDF into the iFrame as an
overlay to the Flash. -
How to upload pdf file in iphone and how to view
how to upload and how to view pdf file in iphone 5s
Hey saif.antri,
You can view PDFs and more using iBooks on your iPhone:
iBooks: Viewing, syncing, saving, and printing PDFs on iPhone, iPad, and iPod touch
http://support.apple.com/kb/HT4227
Have a great day,
Delgadoh
Maybe you are looking for
-
Can configure the date and time
-
I'm running OSX mavericks. when I open reminders app, there is no window, nothing. if I uncheck reminders in the system preferences (icloud), it comes back, but blank. If I put in a reminder then (keeping reminders open) re-check the reminders box
-
EAP-TLS and getting a new user to log in on a wireless network
I have setup EAP-TLS using AP1232 + ACS + CA + Active Directory + some wireless client machines. Works fine. My issue is when I have a new user, who has never logged onto the client workstation. I know that if I attach the workstation to a wired netw
-
Skype trying to update.
Okay so Skype is trying to update on me. I've been clicking 'no' every time. I wanted to check and see if the version of the software that's being forced onto me is the hideous chat bubbles version? I absolutely hate that on my tablet, it's ugly (and
-
Is it possible to get font names of the used vector graphics?
Hi All, Is it possible to get the font names of the used vector graphics?