Unable to create CrystalReportViewer control programatically at run time

Hi
I'm not sure the best place to post this, so I'm placing it in Crystal Reports and BusinessObjects Enterprise.
I'm using Visual Studio 2010 to create a web application which will serve as a reporting portal for BOE XI 3.1.
I first installed Crystal Reports for Visual Studio 2010 and dropped a CrystalReportViewer onto a web form at design time.
However, when setting the ReportSource property, I was encountering memory corruption errors.
I've since read the release note and have realised that Crystal Reports for Visual Studio 2010 isn't compatible with BOE XI 3.1.
So, I've unistalled Crystal Reports for Visual Studio 2010.
Now I am trying to create the CrystalReportViewer at run time. I am able to successfully set the ReportSource property without getting memory corruption errors - which is good news, but I simply do not see the CrystalReportViewer control.
Here's my code:
WebForm1.aspx
<%@ Register assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>
WebForm1.aspx.cs
protected void Page_Load(object sender, EventArgs e)
    CrystalReportViewer myCrystalReportViewer;
    myCrystalReportViewer = new CrystalReportViewer();
    myCrystalReportViewer.ID = "CrystalReportViewer1";
    myCrystalReportViewer.AutoDataBind = true;
    myCrystalReportViewer.HasRefreshButton = true;
    myCrystalReportViewer.ReportSource = @"C:\temp\myreport.rpt";
    myCrystalReportViewer.DataBind();
    Panel1.Controls.Add(myCrystalReportViewer);
Web.config
<compilation debug="true" targetFramework="4.0">
    <assemblies>
        <add assembly="BusinessObjects.Enterprise.Providers, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, processorArchitecture=MSIL" />
        <add assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
        <add assembly="CrystalDecisions.Shared, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
        <add assembly="log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=B32731D11CE58905" />
        <add assembly="CrystalDecisions.ReportSource, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
        <add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
        <add assembly="CrystalDecisions.ReportAppServer.DataDefModel, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
        <add assembly="CrystalDecisions.CrystalReports.Engine, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
        <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
    </assemblies>
</compilation>
<httpHandlers>
    <add verb="GET" path="CrystalImageHandler.aspx"
    type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
</httpHandlers>
Everything compiles and runs fine - I just don't see anything on my page.
I've tried adding a TextBox in exactly the same way and it displays just fine.
What am I doing wrong or not doing?
Surely it must be possible to add a CrystalReportViewer at run time.

You left out the snippet of code that places the viewer in the HTML in the aspx file.
Is it there?  That should describe its placement and sizing. The tag should be named CR:CrystalReportViewer (since you've set the TagPrefix to "CR").
Sincerely,
Ted Ueda

Similar Messages

  • Unable to create a webi report and 3 times it prompting for logon credentai

    Hi,
    We have a issue,
    1.We are  unable to create a webi report and 3 times it is prompting for logon credentials.
    3.After giving the logon credentials 3 times then it is working fine.
    4.We are  using IIS Jakarta redirector .
    5.We are  able to view the webi documents successfully ,the issue occurs only when we  create a new webi report.
    Any one please help me on this issue.
    Thank you in advance.
    Environment u2013
    BOXI3.1,
    SSO,
    IIS Jakarta redirector.
    Thanks & Regards,
    Powell.

    bypass IIS and jakarta (go to tomcat directly with an enterprise account like administrator), does the issue still exist?
    Regards,
    Tim

  • SetCtrlVal on a "string control" is requesting run-time "int" data

    Hi,
    We at KPIT Cummins are using LabWindows for one of our automotive projects. We have a GUI with multiple tabs and one of our string text boxes is popping up the below error (also attached jpeg).
    FATAL RUN-TIME ERROR:   "Temp.c", line 2642, col 38, thread id 0x00000F4C:   Invalid argument type: found 'pointer to char', expected 'int'.
    We have tried to debug this project and we believe that the line giving us an issue is:
    ret_val=SetCtrlVal( h_Tab_Intgd[INTGD_CFG_DATA_TAB], INTGDTAB_ACCXSCAL​E, aa_uc_Temp_Array );
    where,
    h_Tab_Intgd[INTGD_CFG_DATA_TAB] is an array of handles for the form (stores all handles for the tabs)
    INTGDTAB_ACCXSCALE is the name of the string object (exact constant name as it appears in the LabWindows created .h file for GUI constants)
    and aa_uc_Temp_Array is an array of characters. (currently holding "0.000000\n")
    There is another form in our code that has a similar feature but with a different constant ID...and the SetCtrlVal seems to work for that form. We do not understand why it gives a runtime error for this particular form.
    This project code is a big chunk of code and we cannot currently share the project due to a confidentiality clause. Can you help us find the exact problem with what little information we have shared ?
    Solved!
    Go to Solution.
    Attachments:
    temp.jpg ‏19 KB

    This is an error that I happen to face sometimes, especially with tab controls; in my experience every time I have eventually found that the panel handle was wrong: may it be that your handle arrays ir rewritten somewere so that it holds incorrect values?
    If I were you I'd place a breakpoint where you retrieve the panel handle for the tab page and another on faulting SetCtrlVal line, comparing the panel handles in both places.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Can we create items dynamically or at run time?

    Hello expert,
    can we create some item dynamically at some button click?
    Thanks
    yash

    yash_08031983 wrote:
    Hello expert,
    can we create some item dynamically at some button click?Hello, yash
    You can not create items at run time. But you can manage them at run time by setting Visible property programatically.
    Hope this helps..
    Hamid

  • Create LinkToAction with Image by run time

    Hi,
    I want to create linkToAction UI's with different images by run time. But if I try the code below I get always the same image for every linkToAction UI. What is my mistake? And how can I solve this problem?
         for (int i = 0; i < wdContext.nodeGlob_Struc().size(); i++){
              IWDLinkToAction linkToAction = (IWDLinkToAction)
                   view.createElement(IWDLinkToAction.class, "linkToAction"+i);
              IPrivateDocPreAppView.ILinkToActionElement nodeLink =
                      wdContext.createLinkToActionElement();                    
              wdContext.nodeLinkToAction().bind(nodeLink);     
              wdContext.currentLinkToActionElement().setImageSource(
                      wdContext.nodeGlob_Struc().getGlob_StrucElementAt(i).
                           getUrl_Thumbnail() );
              linkToAction.bindImageSource( wdContext.nodeGlob_Struc().
                       getNodeInfo().getAttribute(IGlob_StrucElement.URL__THUMBNAIL) );     
                theGroupBox.addChild(linkToAction);
    regards,
    Sharam

    Hallo Sharam,
    The Web Dynro binding model does not support "index binding". This means binding multiple image UI elments to the same attribute in a multiple context node (cardinaltiy 1..n) means, that all images are bound to the node's lead selection. That's what you implement with
    linkToAction.bindImageSource( wdContext.nodeGlob_Struc(). getNodeInfo().getAttribute(IGlob_StrucElement.URL__THUMBNAIL) );
    Armin's solution is based on the fact, that he breaks the data binding principle by directly setting the imageSource property values.
    Sharam, when reviewing your code I find several "problems":
    1. Never ever store UI elements in the context. I assume you do this in order to access UI elements outside wdDoModifyView() as it is static. There is no need to do this.
    2. Then you break databinding by setting the imageSource property in the linkToAction object (stored in the context) directly, breaking databinding.
    3.)  Finally you "un-do" this hard property setting by binding it to the context again. This has the effect you described.
    Breaking the data binding principle for UI elements has an important drawback. It also breaks the generic Web Dynpro caching mechanisms. Read my article on
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/301d715e-0b01-0010-1a8b-f1f83d175972">Best Practices for Building Client-Independent Web Dynpro UIs</a>, section Coding Rules, rule <i>Implement Fine-Grain UI Manipulations on Context but Not on UI Element Level</i>:
    To maximize the rendering performance of your Web Dynpro application, implement all fine-grain UI manipulations on context instead of UI element level. This means do not call the setter-methods of UI element objects inside wdDoModifyView()directly but bind the related properties to the context and call the corresponding setter methods outside wdDoModifyView():
    <b>Not:</b> wdDoModifyView(){ … theField.setEnabled(true) … }
    <b>But:</b> wdDoInit(){ … wdContext.currentFieldNode.setEnabled(true) … }.
    Otherwise Web Dynpro’s caching mechanisms cannot speed up the rendering of view layouts.
    The view controller’s wdDoModifyView() method is designed for a special purpose: the creation of a UI tree or UI sub-tree at runtime in case it is not possible to declare the UI at design time. The method is neither intended for fine-grain UI manipulations nor for context manipulations. Fine-grain UI manipulations are achieved via means of data binding. Context manipulations are done in wdDoInit(), action event handlers or event handlers.
    Unfortunately, the name wdDoModifyView() is somewhat misleading since the purpose of it is to create (and not to modify) a UI tree dynamically. While the usage of wdDoModifyView() in order to create a UI tree initially (firstTime == true) is not performance critical, modifying an existing UI tree (firstTime == false) is: Changing only one single attribute of a single UI element within wdDoModifyView() flags the complete view containing the control as dirty and the complete view must be completely re-rendered again – depending on the size and complexity of the view this can result in significant performance hits.
    But in your case databinding cannot be applied, as index binding is not supported. The only databinding solution must use multiple/n nodes of cardinatliy 1..1 instead of 1 node of cardinality 1..n with no node elements. And this would require further coding for dynamic context node creation, copy logic based on value semantic.
    Best Regards, Bertram

  • Help!!! create & destroy CORBA object at run time

    I am develop an program using CORBA (Java IDL and JDK 1.3 on Win 98 OS) that involved login-logout mechanism. Someone can login into my program, by access HTML file from the server machine that contained an applet, via browser (NN 6).
    (the client and server run on same machine)
    If somebody login, says Mr.X, and make mistakes by type an invalid password, my program still (can) work by opening a wrong account/record belong to other people who (login and) logout last time before Mr.X login. It is a wrong result.
    I know the reason why this could be happen, its all because Java IDL support the CORBA transient object type. This transient object has the same lifetime as the execution of the server process that creates it. And it cause a problem for me.
    According to the explanation above, i have some questions :
    1. How to create, access, and destroy (delete) any CORBA object on demand (at run time) without have to shut down the server (process), in order to release any data/record hold by the CORBA object ?
    2. If Java IDL cannot create and destroy a CORBA object on demand (at run time), how do I solve my problem above ?
    If Java IDL cannot delete any CORBA object at run time, can it just delete any value (refresh data) that the object hold so any new data can be add again ?
    3. if i run my program on 2 different machine, it result an error : COMM_FAILURE minor code 1398079490. How do I fix it ? any solution for this error ?
    i really need any help, this program is my final project
    i will appreciate any help and answers
    thanks in advance
    Marsel Hober

    I'm using the POA implementation in java 1.4, but the api docs
    aren't very helpful in terms of what all the various policy
    values really do. I've got a servant that gets created by a
    request on a different object, and needs to stay around until
    the client tells it to go away. All the material that I've found
    on how to use CORBA in Java is either pre-POA, or doesn't
    cover any kind of management policies like servant retention.
    Can someone tell me how to do this, or am I stuck trying to
    wade through the CORBA 2.3 spec and hoping that I can
    figure out how the stuff really works in Java?

  • Is it possible to create user-roles associations at run-time?

    basically I need to be able to add a user to a role programmatically before the role-based content is displayed to the user.
    Example: I have a role called 'Manager' created in the portal. When a user logs on, I detect that the user has the attribute 'job title' = 'Manager' so I add the user to the 'Manager' role and the portal shows the content for the 'Manager' role.

    Hi Umesh,
    Yes, we can add users to the Role programatically.We did that.
    Just see the below code to get some idea...
    IUserFactory userFactory = UMFactory.getUserFactory();
    IRoleFactory roleFactory = UMFactory.getRoleFactory();
    IRole role = roleFactory.getRole(roleName);
    String userId = "";
    //Here userIDS is the list of user-id s to assign.
    for (Iterator i = userIDS.keySet().iterator(); i.hasNext();) {
       userId = (String) i.next();
       role.addUserMember(userId);
    Hope this helps you.
    Cheers....
    Satya
    [Pl reward points if this is helpful]

  • While I running macros created by Excel recorder getting run time error "5" Invalid procedure call or argument

    Hi,
    I',m very new of EXCEL VBA programs, one of the pivot table able to run with out error.
    but other getting error when i run it
    below codes are automatically created by excel macro recorder.
    if you help me out this situation, i really appriciated
    Sub Macro11()
    ' Macro11 Macro
        ActiveWorkbook.Worksheets("LCG-JKX").PivotTables("ThickCheckIn").PivotCache. _
            CreatePivotTable TableDestination:="LCG-JKX!R17C64", TableName:= _
            "PivotTable9", DefaultVersion:=xlPivotTableVersion15
        Sheets("LCG-JKX").Select
        CellS(17, 64).Select
        ActiveWorkbook.ShowPivotTableFieldList = True
        With ActiveSheet.PivotTables("PivotTable9")
            .PivotFields("Thick(mm)").Orientation = xlRowField
            .PivotFields("matTypeC").Orientation = xlPageField
        End With
        ActiveSheet.PivotTables("PivotTable9").ColumnGrand = False
        Range("BL17").Select
        ActiveSheet.PivotTables("PivotTable9").PivotSelect "", xlDataAndLabel, True
        Selection.ClearContents
        Range("BH18").Select
    End Sub

    You can't have two pivot table with same name in a sheet. As the macro names pivot table as "Pi...9" always if you run 2nd time, macro will try naming with "Pi..9" again but is not allowed. 
    try changing only the first block.
    ActiveWorkbook.Worksheets("LCG-JKX").PivotTables("ThickCheckIn").PivotCache. _
            CreatePivotTable TableDestination:="LCG-JKX!R17C64", TableName:= _
            "PivotTable" & [=round(Rand()*1000,0)], DefaultVersion:=xlPivotTableVersion15
    Just added RAND to make the pivot table name unique.
    Best Regards,
    Asadulla Javed, Kolkata
    Please do not forget to click “Vote as Helpful” if any post helps you and
    "Mark as Answer”if it solves the issue.

  • Unable to create a schdeule to exlude days/time intervals within days

    Please can someone help me with this issue:
    I'm trying to create a schedule to run job every 10 mins from Monday 8am -Until Saturday 10am. Which means not to run run it from (sat 8am-Mon 10am).
    I know you can can use "exclude" parameter but some how I can get to work:
    I'm trying to do this:
    EGIN
    DBMS_SCHEDULER.create_schedule (schedule_name => 'sat10am_onward'
    ,start_date => SYSTIMESTAMP
    ,repeat_interval => 'freq=hourly;byday=sat;byhour=10,11,12,13,14,15,16,17,18,19,20,21,22,23;'
    ,comments => 'sat10am_onward'
    END;
    BEGIN
    DBMS_SCHEDULER.create_schedule (schedule_name => 'all_sunday'
    ,start_date => SYSTIMESTAMP
    ,repeat_interval => 'freq=hourly;byday=sun;byhour=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23;'
    ,comments => 'all_sunday'
    END;
    BEGIN
    DBMS_SCHEDULER.create_schedule (schedule_name => 'monday_TO_8'
    ,start_date => SYSTIMESTAMP
    ,repeat_interval => 'freq=hourly;byday=mon;byhour=0,1,2,3,4,5,6,7;'
    ,comments => 'monday_to_8'
    END;
    BEGIN
    DBMS_SCHEDULER.create_schedule (schedule_name => 'Mon_fri_10_min_not_sat10_mon8'
    ,start_date => SYSTIMESTAMP
    ,repeat_interval => 'freq=minutely;interval=10; exclude=all_sunday;exclude=monday_TO_8;exclude=sat10am_onward;'
    ,comments => 'Mon_fri_10_min_not_sat10_mon8'
    END;
    I exlude three other schedulers but I get an error?
    Does any one know what would be the best way to create this type of schedules?
    Thanks
    Xhev-

    Hi,
    You can't exclude time-periods as schedules only entire days.
    Instead of excluding time periods you should break the schedule up into time periods to be combined together.
    Hope this helps,
    Ravi.

  • Using the instance manager to control subforms at run time

    Hi,everybody.
    I encountered a question when I put the code "subFormName.instanceManager.addInstance(1);"
    into the subForm's initialize event to dynamic create a new subForm(it's a XDP document).It create 3 new subForms below the original subForm,but when I put the same code into a button's click event or save the document as "Acrobat 7 (static) PDF Form" format,it's all right.what's wrong with it?
    I need your help.
    Best regards.

    There are some restrictions concerning what one can do in each event. I imagine that you can't add instances into a subforms initialize event. If you need three more instances to show, set the minimum on the Object Binding tab to four.

  • I am unable to create any PDF files at this time. My account is current...???? I created one earlier today!!!

    The convert box is not highlighted..????

    Hi JBLUESY,
    How very frustrating. I'm not aware of any system outages. Have you tried signing out, and then signing back in? I would also suggest that you clear your browser cache. Are you using the same web browser as you were when you able to convert without issue?
    Please let me know if the problem persists, and we can take it from there.
    Best,
    Sara

  • FPPNO: I am unable to create pre-notification in FICA

    Hi Gurus
    I am unable to created the prenotification when i run the FPPNO. I checked the config and Masterdata are right. If possible can anyone guide me or give me steps please. Thank you

    Do you have your calendar selected in the sidebar. It sounds like you have a subscribed calendar selected. When you create an event, it tries to use the selected calendar.
    You can set a default calendar in the preferences, but that doesn't override the selected calendar, I don't think.

  • How to create sub-directory by PL/SQL in run-time?

    Hello,
    I have directory defined in Oracle DB and I need to create a sub-directory by run-time PL/SQL code and move my file into the sub-directory.
    The DB version is 10.2.0.3.0.
    How can i do it without creating a new directory in DB each time i need to create a sub-directory?
    Thanks!

    Or, as directory objects are replacable you can just change them using dynamic SQL...
    e.g.
    execute immediate 'create or replace directory my_home as ''/home''';
    execute immediate 'create or replace directory my_home as ''/home/newfiles''';
    of course this isn't going to work if the directly object is going to be used by multiple users at the same time, but if it's for a dedicated process then it would.
    (it also relies on the operating system directories having appropriate read/write permissions, but that's outside the ability of Oracle to control)
    Personally though, I'd avoid having things moving about dynamically.
    The design of my process would specify where files are going to be located and the correct number of directory objects defined and created up-front.
    Any 'incoming' files would have to be located in one of those known locations, whether that's under the control of the 'users' supplying the files, or some other process (o/s script maybe?) that receives the files and moves them to the known location.

  • After Effects (v 12.2.0.52) warning: unable to create font

    Hi, I just installed After Effects 12.2.0.52 and get the error message: "After Effects warning: unable to create font." I'm running Windows 8 on a mac. I've looked in the forum but it seems like this issue should be resolved in the new update but for some reason it isn't.
    Thanks!

    Font issues can have a million causes and in your case there is probably something up with high-DPI support vs. the graphics driver, so updating the latter and checking your screen settings should be the first thing to do.
    Mylenium

  • Creating customized run-time menus

    I am trying to create a customized run-time menu when I right click on a tree control. I can disable the existing run-time/pop-up menu but would like the ability to use a different customized menu.
    I can simulate a run-time menu by using creating a VI that functions in a manner similar to the menu but would prefer the ability to create and process and customized run-time/pop-up/floating menu.
    The menu is always of a fixed size with all items enabled. I do not need the ability to modify this menu within the application.

    There is an LTR article by David Ritter called "Contextual Pop-Up Menu Programming" that shows a method similar to yours. It is well worth a look.
    -Jim

Maybe you are looking for