How can I set prameters on a report source

HI,
I'm writing a JSF application that uses Crystal Reports. I am able to show the report with this tag.
<bocrv:reportPageViewer viewerName="CrystalViewer" reportSource="#{crystalReportManager.getReportSource('CrystalReport1.rpt')}" allowParameterPrompting="on"/>
The code for the crystalReportManager.getReportSource looks like this
public Object getReportSource(String reportPath)
        try
            IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
            Object rptSrc = rptSrcFactory.createReportSource(reportPath, Locale.instance());
            return rptSrc;
        catch (Exception e)
            e.printStackTrace();
        return null;
I would like to set the properties so they will promt but I can't find any documentation on how to add a ParameterFieldDiscreteValue on a ReportSource object.
Thank you.
Matthew

You're using the JSF report viewer tag to display reports, and you're using the JRC to retrieve the report.
The JPEReportSourceFactory is a fairly old method, commonly used back in JRC 10 when there wasn't a ReportClientDocument.
If you're using a newer version, then you can access the report via the ReportClientDocument, then set the parameters before passing it to the viewer, via ReportClientDocument.getDataDefController().getParameterFieldController().setCurrentValues(...).
Sincerely,
Ted Ueda

Similar Messages

  • How can I set printing margins of report?

    Hello,
    I am trying to print programmatically a portrait of a JPEG image that has been created by a Front Panel.
    I print it by creating a Standard Report.
    While the JPEG image is fine, the printed image is compressed at the long edges. So, the printed image is a little bit distorted.
    I change the Printing:Margins Property of the vi at the First Call of the vi, but the result is the same.
    On the other hand, if I open the JPEG image with a program like Picasa and print it, the printing image is not compressed/distorted.
    I attach an image of the code that is used to print the JPEG and an image that shows the Printing:Margins Property.
    How can I print it correctly via LabVIEW?
    Solved!
    Go to Solution.
    Attachments:
    Print_code.JPG ‏31 KB
    PrintingMargins_code.JPG ‏22 KB

    Hello,
    I tried the solutions that you proposed and I have the following results:
    1. The solution to print the Front Panel through the invoke node of the vi's reference is not ideal, because the desirable printer cannot be chosen.
    2. I cannot use the Word Report because I have not the Report Generation Toolkit for Microsoft Office.
    3. I used the HTML Report and I change the print settigns by modifying the registry keys in the following folder:
    "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup"
    I can change the margin_bottom, margin_left, margin_right, margin_top, Shrink_To_Fit and assign the values 0,0,0,0,no to them.
    The result in the printing image is obvious. It is no longer compressed and it is positioned almost according to the margins. Although all margins are set to 0, it has to be positioned 2cm more at left and about 2cm higher to be proper.
    But the footer and header registry keys even if they are deleted (I cannot assign empty string from command line), they are appeared in the printed page.
    I attach the new vi files that modify the registry keys of the above folder before printing and restore them after printing.
    Also, the Front Panel size of the Report.vi has been changed and set equal to the A4 paper size 21x29cm and a little bit bigger in order not to print the decoration border.
    So, the problem of proper printing of HTML report remains having only to remove the footer & header and understand why the printing image is not positioned at full left and full top even if the registry keys margin_left and margin_top are 0 and 0.
    On the other hand, if the vi's Front Panel JPEG image is printed from a Photo-program, it is printed correctly given that the margins are set to 0 and the "Scale" option has been disabled.
    Thank you very much for your help.
    I am looking forward to hearing from you if it is possible.
    Attachments:
    PrintReport.vi ‏336 KB
    Report.vi ‏6 KB

  • HOW CAN I SET MY FAX SENDING REPORT AS PRINT HP LASER JET COLOURE 2840

    sory i want to set my hp laser jet coloure 2840 as fex sending report as a print 

    Hi
    I found a link which may help you
    http://h10032.www1.hp.com/ctg/Manual/c00292207.pdf
    Go through the Fax part of it.
    Hope this helps.
    ***** Click the KUDOS Thumbs UP (Like) on the left to say 'Thanks'*****
    ****Make it easier for other people to find solutions, by marking my answer “Accept as Solution”&"Kudos"if it solves your problem.****
    -VJ
    Although I am an HP Employee, I am speaking for myself and not for HP.

  • How can i set MLS Reports settings in Report builder

    Hi ,
    How can i set MLS Reports settings in Report builder?
    Regards
    Swamy.

    How can i set MLS Reports settings in Report builder?What do you by setting MLS?
    You can set NLS_LANG in the registry and open the reports builder. If this is not what you are looking for, please elaborate more.
    Thanks,
    Hussein

  • How can I set my WebI filters to Null and not Null

    Folks,
    I have created a report in WebI and now I am to set up some filters as Null and some Not Null.
    How can I set my WebI filters to Null and not Null?
    Regards,
    Bashir Awan

    Hi,
    As you said you could do it at the report level and also at the universe level.
    One more way is to create the filters in the universe levele and add them in thequery filter.
    Ex: in the filter you need to write :
    Column1 is null and and column 2 is not null etc.
    Hope this will help.
    If this did't  solve your problem then please explain it in detail.
    Cheers,
    Ravichandra K

  • How can I set BPEL server enviorment and create BPEL domain?

    Without use the http console, how can I set BPEL server enviorment and create BPEL domain?
    When I try to use API like below
    import com.oracle.bpel.client.Server;
    Server s = new Server(ServerAuthFactory.authenticate("oracle","localhost"));
    But I always got four exceptions and one warning like below:
    java.io.FileNotFoundException: C:\Workspace\WOSEDISystem\BPEL_Domain_Creation\config\security.properties (The system cannot find the path specified)
    java.io.FileNotFoundException: C:\Workspace\WOSEDISystem\BPEL_Domain_Creation\config\ejb.properties (The system cannot find the path specified)
    Warning: unable to read transaction.interoperability config property
    java.io.FileNotFoundException: C:\Workspace\WOSEDISystem\BPEL_Domain_Creation\config\security.properties (The system cannot find the path specified)
    java.lang.Exception: Failed to create "ejb/collaxa/system/ServerBean" bean; exception reported is: "javax.naming.CommunicationException: Can't find SerialContextProvider
    Is it right to use com.oracle.bpel.client.Server like this, please help me.
    Best regards,
    Vita

    Anyone can help me? Because I need deploy BPEL process on production server, so I need the Java funtion to create domain. Thank you very much if you can tell me the correct method of using com.oracle.bpel.client.Server API.

  • With 10.2 I can only use system speaker output for audio, NOT my RME FF400 I used previously. The FF400 works fine with other apps. How can I set this device in FCP 10.2? (it is set in both system preferences and midi)

    With 10.2 I can only use a system (e.g. speaker) output for audio, NOT my RME FF400 I used without any problems previously. The FF400 works fine with other apps (some like TwistedWave) setup in the program, and others (like Spotify) using system preferences & audio midi setup. How can I set the FF400 to be the sound output device in FCP 10.2? N.B. The FF400 is set as sound output device in both system preferences and audio midi setup.

    From the fcp.co forum. See if this does anything for you.
    simon_hutchings
    OFFLINE
    Junior Boarder
    Posts: 24
    Thank you received: 5
    Karma: 1
    I have the solution! Well it at least worked for me. This is the response I got from Apple, Can you please try the following steps towards fixing your audio issue, and report back with your results?
    1. Open the application Audio Midi Setup (located in Applications : Utilities)
    2. Select the Output Tab for the current output device
    3. Select the Configure Speakers option
    4. Select the Multichannel tab
    5. Change the setting to Stereo Now mine was set to stereo but the left channel wasn't showing left. re-clicking on stereo reloaded the settings and after clicking apply it worked. 

  • How can I set a BPS's formula to be a remote process

    Hi Masters
    Now i hava a copy formula in my BPS level.
    I want to know how can I set it to be a remote process and remote it in every day.
    Thanks & Regards.

    Create a process chain, add process type to call the report program UPC_PLANFUNCTION_EXECUTE with proper variants, assign the planning function and trigger this process chain daily.

  • How can I set the order of search engines on my Macbook?

    When I use "Manage Search Engines" to rearrange the order of my search engines, the order changes temporarily, only to revert to the order the search engine add-ons were installed, the next time Firefox is restarted. How can I set the hierarchy of search engines to suit my preference, and have it stay that way?

    It may be your preferences problem.
    Try to Reset your firefox and try it newly
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!
    Thank you.

  • How can I set the Corporate Logo instead of Oracle Discoverer logo in 10g

    Hi,
    How can I set the corporate logo/corporate welcom html file instead of oracle discoverer logo in oracle discoverer plus for olap reports version 10.1.2.48.18. while loading the d4o sessions.
    Exactly what are all the steps that I need to follow .
    Thanks,
    Natarajan.U

    Hi Lance,
    Thanks for the documents. Its really helpful to me.
    I am able to change the look and feel of my reports. But I am unable to change the corporate logo.
    The steps that I followed.
    1.Goto discoverer Plus configruation.
    2.Goto Logo change the option button from None to File and Choosed the .jpg file from C:\Logos.
    3.Restarted the application server.
    4.Open the BI plus reports in IE. But still I am seeing the same Oracle Logo only.
    5.But whatever the look and feel like plastic/system/oracle I changed I am able to see the changes.
    6.The logo change is not as simple as I thought??. I need to create Jar on this logo and I need to put the jar file in java /j2ee directory???.
    Thanks,
    Nats

  • HOW CAN I SET TIHE NETWORK TIME BECAUSE IT DOESNT ALLOW ME TO SING IN

    HOW CAN I SET TIHE NETWORK TIME in the apple tv BECAUSE IT DOESNT ALLOW ME TO SING IN

    Welcome to the Apple Community.
    Time and date should be set automatically by the network time server. There has been a number of posts reporting this problem. Solutions have involved:
    Restarting the Apple TV by removing ALL the cables for a few moments.
    Restoring the Apple TV.
    Opening port 123 on the router.
    Ensuring the DNS address on both the router and the Apple TV are those provided by your ISP.

  • How can I set jbo.sql92.LockTrailer system property in BC4J?

    We are using BC4J in 'SQL92' SQLBuilder mode and using MySQL database. row.lock() is not really locking the row. It seems, we need to set jbo.sql92.LockTrailer to correct value so that it will issue correct SQL statement for locking the row. How can I set this system property?

    Apparently this has something to do with the content of the TextObject. I added a new TextObject called "TestText" and put "this is test text" into it. I am able to set the value on that TextObject with no issues. But if the TextObject contains any formulas (Text4 in the sample below) the set throws an error, even if I try to set the Text to "" .
    foreach (ReportObject ro in letter.ReportDefinition.ReportObjects)
                        if (ro.Name == "TestText" || ro.Name == "Text4")
                            TextObject textObj = (ro as TextObject);
                            string oldText = textObj.Text;
                           // string oldText = "";
                            textObj.Text = oldText ;
    These reports are imported from CR9.2, does that have anything to do with it?

  • How can i set end user

    HI,
    I'm very new for this BI and dba.. I need one solution regarding view ... That's after development i want to give the reports to the end user.. So how to create end user.. For example if i want give reports to HR department then how can i give that to HR.. That is how can i set this end user.. Is there any web services related issues are there else any ideas behind that .. How to create this end user...
    Regards,
    R.Gobinath.

    Hi
    If you are using Discoverer in conjunction with E-Business Suite and your company has told Discoverer to operate in what is called Apps mode then the user accounts are picked up from E-Business Suite. So in this scenario you would need to get your EBS system administrator to create the account, assign a password and then assign one or more responsibilities that have been granted permissions in Discoverer.
    In all other cases, when you are not running in Apps mode, then the user account will be a database account. As such, you would get your DBA to create the account and assign one or more roles that have been granted permissions in Discoverer.
    SUMMARY:
    When running in Apps mode, the user accounts are managed by the EBS system administrator and Discoverer understands and can work with Apps responsibilities.
    When running in non-Apps mode, the user accounts are managed by the DBA and Discoverer understands and can work with database roles.
    Hope this helps
    Best wishes
    Michael
    http://ascbi.com

  • I forgot the administrator password for my mac and cant set a new one without it how can i set a new one

    i forgot the administrator password for my mac and cant set a new one without it how can i set a new one

    Reset Password 10.7, 10.8...
    http://reviews.cnet.com/8301-13727_7-20087723-263/how-to-run-the-password-reset- utility-in-os-x-10.7-lion/

  • How can I set an event to repeat on a week day rather than a numerical day of each month?

    How can I set an event to repeat on a week day rather than a numerical day of each month? I see an option at the bottom of the repeat window .... but I cannot use it. Actually, when I try it freezes up my Calendar.
    Lorrene Baum Davis

    These scrrenshots are from Snow Leopard - I would think that Lion wouldn't be too much different.

Maybe you are looking for