Working with DIAdem REPORT in DIAdem SCRIPT

Hello,
I am working with DIAdem 9.1 Advanced. I would like to create a report with a 2D graph object containing one curve (X,Y1) or (X,Y2). The user has to choose between (X,Y1) and (X,Y2) via a dialog box. I want to generate this report with a VBS script without loading a predefined TDR report.
I tried the following sample code:
'1. Load "Example.CSV" from the DIAdem DEMO folder
'2. Load a new blank report
Call GraphObjNew("2D-Axis","MyGraph") 'Creates a new 2D-graph object called -MyGraph- in the report
Call GraphObjOpen("MyGraph")      
  D2AXISSYSTEM     ="one system"
' The user selects which channels he wants to plot via a dialog box
' If the channel "Sine" is selected, we need to create a new curve on the 2D-graph
' Do I need to create a new object for the curve? Which type of object ?
  Call GRAPHObjOpen("2DObj1_Curve1") ' ERROR -Object 2DObj1_Curve1 unknown or not open-
    D2CCHNX          ="[1]/Time"
    D2CCHNY          ="[1]/Sine"
  Call GRAPHObjClose("2DObj1_Curve1")
Call GraphObjClose("MyGraph") 
Call PicUpdate
Is it possible in DIAdem to create dynamically a 2D-graph when we do not know before which channels will be plot?
Thanks in advance for your answer.
Matthieu G.
Eurilogic, France

Hello Matthieu
Variable: ObjType
The terms 2D-curve and 3D-curve are valid keywords for new 2D-curves and 3D-curves and the enumeration terms of the ReportObjType variable for all other objects.
I attached some topic of the DIAdem 10 help that descibe some variables that correspond to this topic.
The following script create a 2d-Axis system an a new curve and defines the data for this curve
Call GraphObjNew("2D-Axis","MyGraph") 'Creates a new 2D-graph object called -MyGraph- in the report
Call GraphObjOpen("MyGraph")      
  D2AXISSYSTEM     ="one system"
  Call GraphObjNew("2D-curve","MyCurve") 'Creates a new 2D-Curve object called -MyCurve- in the report
  Call GraphObjOpen("MyCurve")
    D2CCHNXNAME      ="[1]/Time"
    D2CCHNYNAME      ="[1]/Sine"
  Call GraphObjClose("MyCurve")
Call GraphObjClose("MyGraph") 
Call Picupdate()
Hope this helps
Winfried
Message Edited by winner on 02-27-2006 11:54 AM
Attachments:
report.zip ‏18 KB

Similar Messages

  • Working with TimeZone variables in UCCx script

    Hi Team
    I'm wondering if you guys could help me to find out the best way to work with TZ variables in UCCx script.
    Because of different countries customer has a branches, I need to setup different TimeZones for each country handled by the same centralized UCCx.
    In this post they use Java to work with TZ, however, but I prefer another way to work with TZ variables:
    https://supportforums.cisco.com/discussion/11851751/how-make-uccx-holiday-script-timezone-aware
    My idea is to work with Time Zone variables in the script, so what I did was to create different TZ variables and each one of the them assigned the proper timezone based on the country, so depending of the Trigger involved (DNIS), I can find witch country this call came from and give the right timezone.
    The problem I have is that at the time I want to add or subtract two variables of TZ, I got an error because of the syntax. I've been trying different options, but until now, no luck.
    Would you mind you guys who had been working on this let me know what is the right syntax to add or subtract TimeZone variables un UCCx?
    Thanking you in advance
    Martin

    Hi
    I've been working on TZ's recently... see this post:
    https://supportforums.cisco.com/discussion/12474756/how-check-daylight-saving-within-uccx-script
    My approach in the scripts was that basically I allow the department to set their opening hours in the timezone of their choice.
    They have a management web page served from CCX that accepts start/end times each day, and a timezone. That all gets stored in XML.
    In the script, based on that information I get the current time in whatever timezone is set, and compare that to the XML open/close times.
    Similarly for holidays, I get the current date/time in the holiday TZ and compare the holidays to that.
    Aaron

  • How to work with crystal reports and boe3.1

    Hello!!! Forums,
             Please suggest me some tutorials and sample code to work with crystal reports that can be viewed in boe3.1. What software to use to deveelop reports? How to view it in boe3.1?
    Regards,
    grace

    At the top of the forums you will see posts that say read this first, read those first.
    [BOE Enterprise|Read Before Posting - Where to find Business Objects .NET SDK Resources;
    [Crystal Reports .NET|Read Before Posting - Where to find Crystal Reports .NET SDK resources;
    Jason

  • Can JDeveloper work with Crystal Report?

    I try to open Crystal Report with Jdeveloper, but I could not. Do anyone know if JDeveloper worked with Crystal Report. If anyone knows how, please show me. Thank you in advance.

    For example, I have a report name "report1.rpt" which was saved under "C:\oracle\Jdev9052\jdev\mywork\HR\HR\public_html". Beside that I also have all the required jar files and folder crystalreportviewer added to my project. But everytime I run it, I received "The page cannot be displayed". Please help me to point out the problem. Thanks.
    <%@ page import= "com.crystaldecisions.report.web.viewer.*,
    com.crystaldecisions.sdk.occa.report.data.*" %>
    <%@ page import="com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory,
    com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2,
    com.crystaldecisions.sdk.occa.report.reportsource.IReportSource" %>
    <%
    // This is the database logon section of this report
    IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
    String report = "report1.rpt";
    IReportSource reportSource = (IReportSource) rptSrcFactory.createReportSource(report, request.getLocale());
    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setName("Test Report");
    viewer.setReportSource(reportSource);
    // now provide the viewer with the connection information
    response.getOutputStream().flush();
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
    viewer.dispose();
    %>
    -- A part of the config.xml file
    <?xml version="1.0" encoding="utf-8"?><CrystalReportEngine-configuration>
    <!--<reportlocation>../..</reportlocation>-->
    <timeout>10</timeout>
    <ExternalFunctionLibraryClassNames>
              <classname></classname>
              <classname></classname>
    </ExternalFunctionLibraryClassNames>

  • What is the right sdk api to work with webi reports in BOXI Release 4?

    Hello,
    I just read in the omg model for rebean (sdk for working with webi report documents) that all functions to access the report structur and layout are no longer availabe beginning with Release 4.
    Can anyone confirm, that this is the case?
    Are those functions moved to a different SDK component?
    Thanks in advance,
    Bernd
    Dokumentation about rebean _omd
    u2022 The object model shows many funtions , classes in red which means:
    Note: The Classes, Interfaces, and Methods marked in red are no longer functional from the SAP
    BusinessObjects Business Intelligence Platform 4.0 release onwards.
    u2022 Among those functions are all !! We need to analyze the report layout
    u2022 No longer supported: DocumentInstance.getDictionary() , DocumentInstance.getOpenDocumentInfo(), DocumentInstance.getResourceManager(), DocumentInstance.getStructure()
    u2022 Classes no longer supported: ReportElement, ReportDictionary, Query, QuerySorts, DataSourceObject(s), SQLDataProvider,QueryNode, DPExpression, QueryContainer, Link,
    u2022 Classes no longet supported: ReportBody, ReportContainer, ReportStructure, ReportBlock, Graph, *Table
    u2022 Classes no longer supported: Cell, PageHeaderFooter

    Thank you for the information srrachna !
    Well, the point with the report engine sdk is a surprise. What is the sense of new functionality when you cannot use it (spoken for the api processing), and in addition when the new functionality eliminate functionality which was available before in the sdk.
    In my view this cut is to hard. The .pdf speaks from deprecated, but the blog and the information in the report engine api speaks a different language. The functionality is not just deprecated but no longer available.
    Hope SAP will address that before relase 4 becomes GA in May 2011.

  • Does CR 2008 work with Crystal Reports Server 11.5

    I currently have CRS 11.5 and am using CRXI. I would like to upgrade CRXI to CR2008 (visual advantage), but not upgrade CRS at this time. Does CR2008 work with CRS11.5? Any known issues to be aware of?
    Thanks,
    Jsr

    Unfortunately, CR 2008 is compatible with CR Server 2008 only You could refer to the [CR Server 2008 Supported Platforms|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/90e0d1a4-ae34-2b10-198c-f309bfa21e91]
    Kindly refer to the [Crystal Reports Server XI Release 2 Info|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20d9fe63-396c-2b10-e7a8-efddd1a910f6]
    Hope it helps !!

  • Working with Printable Reports

    We have been running production with Crystal Reports for almost 6 months now, today we just found out, after being told numerous times from Crystal that it is not the case that "The Crystal Reports for Java Reporting Component (JRC) bundled with IBM® Rational® Application Developer for WebSphere® Software, Borland® JBuilder®, and BEA Weblogic WorkShop(tm) has been designed for dev & test environments as well as for non mission-critical workgroup application that do not have extensive demands for user concurrency" We are interested in other types of reporting or possibly licensing Crystal/Oracle App Server. I was interested in seeing some examples people may have of reports using the FOP built in to htmldb. Some of our reports are fairly complex, and many are emailed to people. If anyone can show me examples on htmldb.oracle.com of ones they have created, I'd appreciate it.
    Thanks,
    Scott

    We have been running production with Crystal Reports for almost 6 months now, today we just found out, after being told numerous times from Crystal that it is not the case that "The Crystal Reports for Java Reporting Component (JRC) bundled with IBM® Rational® Application Developer for WebSphere® Software, Borland® JBuilder®, and BEA Weblogic WorkShop(tm) has been designed for dev & test environments as well as for non mission-critical workgroup application that do not have extensive demands for user concurrency" We are interested in other types of reporting or possibly licensing Crystal/Oracle App Server. I was interested in seeing some examples people may have of reports using the FOP built in to htmldb. Some of our reports are fairly complex, and many are emailed to people. If anyone can show me examples on htmldb.oracle.com of ones they have created, I'd appreciate it.
    Thanks,
    Scott

  • Certified LabVIEW Assosiate Developer worked with DIAdem in Aerospace domain using technologies FBG, SHM. Also knows vision concepts & IMAQ vision.

    Hello,
    I'm in aerospace domain from past 1.3 years. I have 2 years of LabVIEW experience & 1 year of DIAdem experience.
    Measurement of strain, load & other flight parameters are being done in my Structural Health Monitoring Lab using Fiber Bragg Grating (FBG) sensor.
    Working in IMAQ vision & Image processing fields from 3 months.
    Looking for a challenging technical opening.!
    Attachments:
    amith_vasista.doc ‏55 KB

  • Certified LabVIEW Assosiate Developer worked with DIAdem in Aerospace domain using technologies FBG, SHM.

    Hello,
    I'm in aerospace domain from past 1.3 years. I have 2 years of LabVIEW experience & 1 year of DIAdem experience.
    Measurement of strain, load & other flight parameters are being done in my Structural Health Monitoring Lab using Fiber Bragg Grating (FBG) sensor. Looking for a challenging technical opening.!
    Attachments:
    amith_vasista.doc ‏49 KB

    May be you can post here in the right board.
    The best solution is the one you find it by yourself

  • Working with 3 Reports -- How to Display Summary/Formula field in Each Repo

    I have 3 Report that represent three Company.
    Each Company/Report has their report Details and field totals at the bottom.
    Now what I am trying to accomplish is that I need to add all three companies grand total and sum it up and display at the bottom of each reports.
    FYI, I have created matrix report and i pass user parameter where user can choose which company's report him/her would like to run so for example: if user run Company_1 then at the bottom i want to display all the companies Grand Total.Each reports have 6 columns and all the columns are same in each report except the data change by company. and with the same thing with Company_2, and Company_3
    Now, I tried to use create a separate query and tried to use DATA LINK but it didn't work due to very awkward report design.
    Is there a way where i can create a formula field and write PL/SQL and display at the bottom of my report.
    Please let me know if its possible I will very appreciated.
    Thank You

    Thanks for your reply,
    Actually, I would done that before taking Company's parameter off but i have to send out this report to all three companies thats resoan why I put companies paramters.
    Also, I have solved that problem by creating new query that will give me total off each company so in my Data Model. I have Q_1 (main query), Q_2 (Company 1 query which give me total for each field), Q_3 (Company 2 query....), Q_4
    and call those all fields and RESET AT REPORT level.
    so, no mather which company i choose in my parameter field it will give me final total at the bottom of my report for all the departments.
    Thank You,

  • Working with Oracle Reports

    I got oracle reports APEX integration working like the how to, and even got the SSO to work, but here are some issues I'm having.
    1) Using ODM is a nightmare, not fun at all. I would like to use databse usernames/passwords, not separate LDAP.
    2) when you specify the SSO connection, you ahve to hard code it for everyone.
    I was wondering if anyone was able to use Oracle Reports without using SSO, and not specifying username/password in the URL. Maybe, configuring Reports to use the DAD?
    Anyone have any luck with this?
    Thanks,
    Scott

    Wow, searching for stuff about integrating oracle reports is a nightmare, I think I found the approach I am going to use, editing the cgicmd.dat file for now. Until, we convert our entire application to a SSO with enterprise level accounts, it's probably going to be using this.
    MY question is this, I was hoping to mask the URLs, thought embedding the report as a URL region in ApEx, but that didn't seem to work at all. Is it possible to use a PDF as a URL region? When I used the report I got something like teh following:
    %PDF-1.4 1 0 obj << /Creator (Oracle9iAS Reports Services) /CreationDate (D:20070313125453) /ModDate (D:20070313125453) /Producer (Oracle PDF driver) /Title () /Author (Oracle Reports) >> endobj 5 0 obj <> stream Gat=->Ar7S'RgRSs$0s/huU7'4/KS9Ngb96CtDRJok?)m\+Sl1XfZF,^E9Wl-'>Lb!i]Stn2lEg I]1HLoRtV&KIJ$c`%WUB:/B0l6GQ)&K&YhTal$b)o]PN0n)$D#fBGjRl+b=l#cfP/_\#TCQhq([ eW/H(4FlVDPKUff6L&!0&P+BZ8;;p/T`>@j1C=o,22h2/Jktt+>'$Gf;k!nc'fWsoS6^"6WV8`p RN(t1"i9k$SEc(BLGphdT@UgEDT\$q9:m-8I-`(!18MlWqF$&UOUA&No$qos#P6d#H3Z\e1K4MW asZsir?pJHU2VO3MI9\f#=42H97A\u9/L]`M0bP5%02M=X]kc.km/Y2!,N^2J?k1<&tj06EIV9. UJ6,.Km*SL7`#J1XG=%bj=(rQ?7E84qfI9GafXtce.>!C=B)ke9j3Vpo4;OC5XUTJA,/#W_0A/7 cR'H,:h7c2`Adtj+3Fu\Ful6K)\C@"fAPWDUr^>\H81iLi!f[m%rr3AO?._%*IC.f3%o*rMCW+o \cX[0&m1d]QYp'r[bqs[M%d%oLu$G`q8I45@&Vc^lU*uL-8/_LCC:3OV1tKj)g!BIE(%6-7&m<\ fCI]0;QN6'W,0TYGgHI<4ib3_h>Zd^;c-/6"m*WA#m[G47Ne&`:Gnlj?BSuXB\44>MoE!Ae7oCr A%-p@Pip?3;WlaA0mBi('D%5;&k&jhE7!oPX4$+'+Z(t)Mg;keQ*"'Q,T2Q5+1I7dVL#ePF&C&I 865uJr76^]FbZ6[njB'6rn,XBg10`nZ=9t/639\58j`fT-&uiBaA?0(I(3Y!qm*[pA-eHUY`Qhj o=JHe]=+XnYbZXYeGSq#/%FKX<.GZX3>"PW8)4F%jm\>J@)=Qm3PNEB$P>_cLSS?TUt2qI0oK8a4@*t ;m_=Wr"r7d,4#lJJWFr^nl@B@(ZV"+/tH%Fm::@)&lLAnM5N7^OpFNu-$IT.jU]N^D:iii0?ee" HCoU=f?a?=bB$t8OjjN6CF:*Ag*hBLZlth]YUk1M\Qp?L%Y?4WI0_YQ/g3+a\-DAf+[r.O/qZIR Qbae4AABT6OTR@HR=$E"a?Vcl]eW[m?O"rd"YkEp7$CHj5cZ5OE8.chM@UoXVWK=-C\_mF3;4rLTsq3DG=F=rK:DcR[qVM5I.r])X?fb1.8$2p\dPG0L3> NFGWB[7pc^\(aKV,;2;&"kOJrmP'[]O-D6R?;(bf;CSc-5F,53l7M\+(H00mb\5^]N!.9DTn -KBY^$42l$oqgi+M&mnP1m+jj?\&+"j9R+T>K+t?Sr1Jceq45c,_S*Rlu/LaM+u22,tJZoe?0F) dm"'6gT,=(Z6^iCX*I$+)eN:>%%A;X^8K&jX )bB)of@dWTji51:#pH^S9mm8HXcPE!-gro%_S[P.MT?`\]BKI)&tt\F'Q2UO>"? =r58O2P?AYh3g6IGFQF-Y`7U?[+*oOF?A%Z4cU-3ia,gUF)]HLZ1`)(i6-8Rg2+T7[s;5jUdK8L KQmr'A29!J:$sD)ADU-8JsEfTc2eNr4'?fp=]RL^FDg#Kf`V"'?f$;lp@8Ze`325Z<0)Y06A^>k ^a!mqVhc'(1\hBV*AE*.BLFg$MtPZi;-S8*[RTJLOK]kAUPZqdE#9@'W$:g,i1!Vf 5WauS!rmH:4g#j$>-"6$ogdPRK_k':HI`$Ol4M5r/kRs@5lL%^c-+0?g2TLmpg3X*VMXnS=t@nu 8)L:)@dSH*7>A(Jc2J;+ebuI_<*D4;jt"6NAhhhMhlEKXFU@J;gXg1e@bR/>'p7%8A%u3FXQQnb
    -Scott
    Message was edited by:
    Scott H.

  • Issue working with Interactive Reporting and Metaread option on Essbase 11

    Issue:
    I can´t see members/Generations of Essbase using the OLAP Query Object in Interactive Reporting, when Essbase Filters ( Metaread ) were applied on Dimensions
    Versions:
    Interactive Reporting 11 / Essbase 11
    Comments:
    -     If I’m connected, with an Admin user who don't have Metaread Filter Security it works fine.
    Tests:
    -     I do a test when I connect my query to Essbase 9.2, it works fine and I can see the members and generations without problems.
    It seems that could be a bug, did you have any ideas about what would happened with the Essbase 11.1.2 that IR could not interpret the same way as Essbase 9.2 do
    Regards
    Alberto

    <p>Are you creating the computed item on the Request line or theResults columns?</p>

  • Anyone suggests a barcode font paid/free that really works with Crystal Report?

    Hi fellow B1 Users,
    I am having difficulty producing a print of crystal label report that produces barcodes which can be scanned.
    It seems like I have not been lucky getting barcode fonts and its dimensions (size with height and width) right so it can be scanned by simple
    barcode scanners.
    Anyone got their crystal label to be scan-able?
    Please suggest.
    Thank you,
    Syed

    Hi Gordon,
    Good to see you still active in SAP B1 forums.
    I tried fonts such as CCode39.
    However, I got lucky this time, the font IDAutomationHC39M worked for me, size 18.
    Did not have to do much setting on barcode scanner though I have done it before
    Thank you.

  • Working with slide notes as audio script

    In Captivate v4 if you had more than a few lines of notes that you were to use as your script, you could "detach" the notes and expand the screen prior to starting your audio recording in order to see on one page all notes from which you based your audio.
    I have yet to start any major recording in Captivate v5.5, but from what I see so far - the above option does not exist. It looks as if you get a scroll bar which you must use to see your script once you get to the bottom of the initial available notes screen.
    Are there any workarounds ?
    I would much prefer to see the full script from the start and not have to scroll down during my recording - with the added risk of my mike picking up the mouse clicks.
    Noel

    If you want to use the Slide Notes panel detached, you can just grab it by the tab and drag it off as a floating panel.  However, when you open the Slide Audio dialog, you'll find that the Slide Notes panel cannot be made to sit on top of it.
    My preference is to dock the Slide Notes on the right side of the screen, and just sit the Slide Audio to the left of it so that I can read my voiceover script as well as control the Slide recording.

  • Has any body work with Crystal Report XI and JDeveloper 10.1.3 ?

    Hi All,
    We want to use Crystal Report XI as our reporting tools and integrate it with our jsp/jspx application developed with JDeveloper 10.1.3.
    Has any body succesfully done this kind of integration ?
    Could you please share it with me ?
    Thank you for your info,
    xtanto

    Hi friends,
    I use Crystal Reoprt XI (release 1) with JDev 10.1.3, never try Crystal 10 with JDev.
    Here is what I do :
    1. Install CR XI on the same machine with JDev 10.1.3.
    2. Modify CRConfig.XML on folder : C:\Program Files\Common Files\Business Objects\3.0\java on three places :
    <JavaDir>D:\JDev1013\jdk\bin</JavaDir>
    <Classpath>D:\JDev1013\jdbc\lib\ocrs12.jar;D:\JDev1013\jdbc\lib\ojdbc14.jar;D:\JDev1013\jdbc\lib\ojdbc14dms.jar;D:\JDev1013\jdbc\lib\orai18n.jar; .... [original classpath]
    <JDBCURL>jdbc:oracle:thin:@oracle.sas.co.id:1521:ORCL</JDBCURL>
    <JDBCClassName>oracle.jdbc.driver.OracleDriver</JDBCClassName>
    <JDBCUserName>myuserid</JDBCUserName>     <JNDIURL></JNDIURL>
    3. Create the report using Crystal XI, USE JDBC CONNECTION, and it takes about 12-20 minutes to connect, don'y know why :)
    ( now the integration part )
    4. Create a project for the report in our apps workspace (e.d : ViewController)
    5. Copy these jar files below to D:\..\ViewController\public_html\WEB-INF\lib
    (I got the files from Crystal Installation)
    04/03/2006 09:27 AM 666,774 CrystalCharting.jar
    03/26/2006 12:23 AM 2,163 CrystalCommon.jar
    04/03/2006 09:27 AM 94,137 CrystalContentModels.jar
    04/03/2006 09:30 AM 519,003 CrystalExporters.jar
    04/03/2006 09:27 AM 60,468 CrystalExportingBase.jar
    04/03/2006 09:26 AM 561,021 CrystalFormulas.jar
    04/03/2006 09:26 AM 390,049 CrystalQueryEngine.jar
    04/03/2006 09:28 AM 1,934,849 CrystalReportEngine.jar
    04/03/2006 09:25 AM 413,455 CrystalReportingCommon.jar
    09/08/2003 02:42 PM 3,915,966 icu4j.jar
    04/03/2006 09:29 AM 135,232 jrcerom.jar
    02/10/2006 10:39 AM 698,542 jsf-impl.jar
    03/26/2006 12:23 AM 8,680 keycodeDecoder.jar
    05/11/2004 07:22 PM 352,668 log4j.jar
    03/26/2006 08:33 AM 474,429 MetafileRenderer.jar
    04/03/2006 08:47 AM 369,503 rasapp.jar
    04/03/2006 08:46 AM 784,065 rascore.jar
    03/16/2006 09:35 AM 699,443 ReportViewer.jar
    04/03/2006 09:25 AM 95,381 rpoifs.jar
    04/03/2006 08:46 AM 21,128 serialization.jar
    06/17/2006 01:41 PM 393,259 standard.jar
    10/02/2003 06:29 PM 3,777 URIUtil.jar
    02/28/2006 10:01 AM 48,279 webreporting-jsf.jar
    03/07/2006 08:50 AM 778,348 webreporting.jar
    02/20/2004 02:01 PM 1,010,806 xercesImpl.jar
    02/20/2004 02:01 PM 124,724 xml-apis.jar
    6. Right click the project, project properties, Libraries, Add Jar / Directories,
    Add all the jar files from previous step.
    7. Copy CRConfig.XML to folder D:\..\ViewController (project folder)
    ( this CRConfig.XML is the one that I have not modified, the original one. )
    Please check, you must have this on the file :
    <reportlocation>.</reportlocation>
    8. Then create a Folder e.g : reports under WEB-INF :
    D:\..\ViewController\public_html\WEB-INF\reports, then copy all reports created on step 3 on to this folder.
    9. create a jsp to call the report, here is sample of my JSP :
    <%@ page
    contentType="text/html;charset=windows-1252"
    isELIgnored="true" %>
    <%@page import="com.crystaldecisions.reports.sdk.*"%>
    <%@page import="com.crystaldecisions.sdk.occa.report.lib.*"%>
    <%@page import="com.crystaldecisions.sdk.occa.report.exportoptions.*"%>
    <%@page import="com.crystaldecisions.report.web.viewer.*"%>
    <%@page import="com.crystaldecisions.sdk.occa.report.reportsource.*" %>
    <%@page import="com.crystaldecisions.sdk.occa.report.data.*" %>
    <%@page import = "java.util.*" %>
    <%@page import = "view.util.JSFUtils" %>
    <%@page import = "oracle.jbo.domain.Number" %>
    <%
    //Use the relative path to the report; the physical or full qualified URL cannot be used.
    //String reportName = "D:/DemoCrystal/Project/public_html/WEB-INF/Report/OrderID2.rpt";
    //String reportName = "D:/DemoCrystal/Project/public_html/WEB-INF/Report/test2.rpt";
    //String reportName = "D:/DemoCrystal/Project/public_html/WEB-INF/Report/invoice.rpt";
    String reportName = "../reports/invoice.rpt";
    String userName = "myuserid";
    String password = "mypassword";
    String compId = (String)JSFUtils.getFromSession("compId");
    String docId = (String)JSFUtils.getFromSession("docId");
    Number noDokumen = (Number)JSFUtils.getFromSession("noDokumen");
    String status = (String)JSFUtils.getFromSession("status");
    System.out.println("from rptInvoice.jsp " compIddocId + " " + noDokumen.toString()+status);
    try
    //Open report.
    ReportClientDocument reportClientDoc = new ReportClientDocument();
    reportClientDoc.open(reportName, 0);
         session.setAttribute("reportSource", reportClientDoc.getReportSource());
    // Conn info
    ConnectionInfos oConnectionInfos = new ConnectionInfos();
    ConnectionInfo oConnectionInfo = new ConnectionInfo();
    oConnectionInfo.setUserName(userName); //Set username and password for the report's database
    oConnectionInfo.setPassword(password);
    oConnectionInfos.add(oConnectionInfo); //Add object to collection
    //Create a Fields collection object to store the parameter fields in.
    Fields oFields = new Fields();
    // THE PARAMETERs.
    //Integer numberValue = new Integer(2166);
    //String stringValue = "IV";
    //Set all of the parameter values using the utility function.
    setDiscreteParameterValue(oFields, "Nomor_Invoice", "", new Integer(noDokumen.intValue()));
    setDiscreteParameterValue(oFields, "Kode_Invoice", "", docId);
    setDiscreteParameterValue(oFields, "Compid", "", compId);
    setDiscreteParameterValue(oFields, "Status", "", status);
    //System.out.println("from view-controller report jsp v2.2");
    //Set the export options to export to the format of choice.
    ExportOptions oExportOptions = new ExportOptions();
    oExportOptions.setExportFormatType(ReportExportFormat.PDF);
    ReportExportControl oReportExportControl = new ReportExportControl();
    oReportExportControl.setExportOptions(oExportOptions);
    oReportExportControl.setExportAsAttachment(false);
    Object reportSource = session.getAttribute("reportSource");
    oReportExportControl.setReportSource(reportSource);
    oReportExportControl.setDatabaseLogonInfos(oConnectionInfos);
         oReportExportControl.setParameterFields(oFields);
    //Export the report
    oReportExportControl.processHttpRequest(
    request, response, getServletConfig().getServletContext(), null);
    catch(ReportSDKException e)
    out.print(e);
    %>
    <%!
    * Utility function to set values for the discrete parameters in the report. The report parameter value is set
    * and added to the Fields collection, which can then be passed to the viewer so that the user is not prompted
    * for parameter values.
    private void setDiscreteParameterValue(Fields oFields, String paramName, String reportName, Object value) {     
    //Create a ParameterField object for each field that you wish to set.
    ParameterField oParameterField = new ParameterField();
    //You must set the report name.
    //Set the report name to an empty string if your report does not contain a
    //subreport; otherwise, the report name will be the name of the subreport
    oParameterField.setReportName(reportName);
    //Create a Values object and a ParameterFieldDiscreteValue object for each
    //object for each parameter field you wish to set.
    //If a ranged value is being set, a ParameterFieldRangeValue object should
    //be used instead of the discrete value object.
    Values oValues = new Values();
    ParameterFieldDiscreteValue oParameterFieldDiscreteValue = new ParameterFieldDiscreteValue();
    //Set the name of the parameter. This must match the name of the parameter as defined in the
    //report.
    oParameterField.setName(paramName);
    oParameterFieldDiscreteValue.setValue(value);
    //Add the parameter field values to the Values collection object.
    oValues.add(oParameterFieldDiscreteValue);
    //Set the current Values collection for each parameter field.
    oParameterField.setCurrentValues(oValues);
    //Add parameter field to the Fields collection. This object is then passed to the
    //viewer as the collection of parameter fields values set.
    oFields.add(oParameterField);
    %>
    10. have a try and HTH :)
    xtanto.

Maybe you are looking for

  • Trying to send multiple types in a byte array -- questions?

    Hi, I have a question which I would really appreciate any help on. I am trying to send a byte array, that contains multiple types using a UDP app. and then receive it on the other end. So far I have been able to do this using the following code. Plea

  • How to get object key before load data into form?

    I need to get object key (e.g. ItemCode in Item Master Data From ,docEntry in A/R Invoice From) to calculate and do something  before data is loaded into this form . I try to use SAPbouiCOM.BusinessObjectInfo.objectKey as in this code. Private Sub oA

  • How to change location of files (folder structure to storing in iPhoto lib)

    I need help. I thought I was smart, but as is always the case, I find out that I am not I did not trust iPhoto at first. So I retained my images in my 8 years of folder structure (by year and then subfolders of months). My lib is getting large, 7000

  • CS3 + ID CS4 - Color management Iussues in Bridge CS4

    I have CS3 WEB PREMIUM edition and recently added InDesign CS4. While trying to get the color management right for all Suite applications I get an error in Bridge CS4. "Suite Color Management is not enabled. Suite Color Management requires that a qua

  • Xbox 360 to macbook?

    i was wondering if theres a way to use my macbook as a screen to plug my xbox 360 to it will it work? thanks