Dynamically change Text on CRytal reports in asp .net 2.0

Posted on 2007-10-17
Last Modified: 2013-11-07
I have server 2003 a
aap .net 2.0
Crytal reports developer XI
mysql backend

I need to know how to do is dynamically change a text box on the report from the Aspx.vb code and also do I have to recreate my report everytime I change the data connection?  Both of these questions seem simple enough but I can't find a resource to answer them.

Question by:janmishkin
    LVL 100

    Accepted Solution

    LVL 14

    Expert Comment

    you dont need to recreate the report !!!
    you can set the connection string as a parameter to your crystal report viewer and the CR will take this server name and db name as the data source along with your query....

    and you can have an expression (a formula) which will display a paramter value(@something) can have this value being passed from your front end (usual way of setting formalas fron

    Author Comment

    jaiganeshsrinivasan: I don't mean reconnecting to the same data set. I mean - say a I want to have a new report based on a different view with some different fields but I don't want to recreate the full report i.e I want to keep the entire formatt of the report but just reasign and add a few new fields. It seems like it forces me to clear all my field boxs.

    mimcc: I will make time to view those pages and then accept solution('s)
    LVL 100

    Assisted Solution

    Unfortunately that is the way Crystal works.  It uses a positional rather than field name to track the fields on the report.

    You can try setting the data source inside the report but to do what you want from code probably isnt't possible.


    Author Comment

    In terms of recreating the full report everytime I change the structure to the underlying table - I think this is nuts  and I'm assuming that I'm doing something wrong because I can't believe that the CR would be set up like this. Am I right?

    Author Comment

    OK - I don't think I clearly stated the 2cnd problem

    When using xsd as a source when the xsd structure changes how do I update the CR report

    her3e is the answer

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
    Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project ( automates most of the tasks discussed in this article. You can even fin…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
    THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now