report Binding problem

9 posts, 0 answers
  1. lamees
    lamees avatar
    56 posts
    Member since:
    Jul 2006

    Posted 17 May 2007 Link to this post

    hey all,
        I have two questions
     1- Is there anyway to add a HyperLink or LinkButton in a telerik Report and set its NavigateURL to some values from a DataSource?

    2- I want to bind a telerik Report to a DataSource but i don't know exactly what are the column names or how many are they, so that i can't put regular TextBoxes and set the value of each one to a column name from the DataSource because the dataSource returns different number of columns each time with different names according to some parameters. How can i do so?

    Hope that i could explain my problem correctly.
    Thank you
  2. Chavdar
    Admin
    Chavdar avatar
    898 posts

    Posted 17 May 2007 Link to this post

    Hi lamees,

    Up to your questions:

    1. Navigation in reports through links is not supported currently. This feature is scheduled for one of the next versions.
    2. The report's programming model allows you to create reports programmatically or modify them with C# or VB.NET code. After acquiring of the actual data source, you can modify the report definition according to the specific data from your data source and adjust the report's appearance. I think that this functionality should help you to achieve your goal.



    All the best,

    Chavdar

    the Telerik team


    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft banner
  4. lamees
    lamees avatar
    56 posts
    Member since:
    Jul 2006

    Posted 17 May 2007 Link to this post

    Thanks Chavdar for your response,
    for my question #2 your answer is so helpful.
    But for question #1 i don't think i made my problem clear, here is what's the problem:
    I want to add a LinkButton or HyperLink in my report to link to an external website (i.e google.com), is there anyway to do so?

    NOTE: Another question:
    i saw in your Reporting help manual that you are using a function:
    reportViewr1.RefreshReport()
    after you set the report's DataSource
    But i can't find this function??!!! is this an external function that you implement?
    Sorry for the long question
  5. Chavdar
    Admin
    Chavdar avatar
    898 posts

    Posted 18 May 2007 Link to this post

    Hi lamees,

    In the current version of the Reporting (v1.0) there is no Link or Hyperlink Report item to allow you insert links. The only possible workaround I can think of is for reports that are viewed with the Web viewer. To add a hyperlink in this case, add an anchor html element for the .Value property of a TextBox. For example:  
    <a href='http://www.telerik.com'>telerik</a>
    The browser should render this as a link. However, in WinForms it will appear just as an ordinary text.

    The RefreshReport() method is used only for the WinForms Report Viewer. For the WebForms Report Viewer this method is not needed.
     

    Best wishes,
    Chavdar
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. lamees
    lamees avatar
    56 posts
    Member since:
    Jul 2006

    Posted 18 May 2007 Link to this post

    Hi Chavdar,
    Thanks for your response. the Link issue worked good :)
    But for the RefreshReport() method I think it is needed for theWebForms Report Viewer. i have a ReportViewer object in a webPage and I set its DataSource in the Page_Load Event. but when the page is first loaded I get this exception inside the ReportViewer object:

    Missing opertator before _ID operand.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Telerik.Reporting.Data.ParserException: Missing opertator before _ID operand.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ParserException: Missing opertator before _ID operand.]
    Telerik.Reporting.Data.ExpressionParser.Parse() +2102
    Telerik.Reporting.TextBox.get_ProcessingValue() +122
    Telerik.Reporting.Processing.TextBox.ProcessItem() +46
    Telerik.Reporting.Processing.ReportItemBase.ProcessItem() +144
    Telerik.Reporting.Processing.Report.ProcessDetail(DataRowView dataItem, Int32 level) +209
    Telerik.Reporting.Processing.Report.ProcessData(DataView dataView, Int32 level, ProcessDataHandler dataHandler) +90
    Telerik.Reporting.Processing.Report.ProcessData(DataView dataView, Int32 level) +121
    Telerik.Reporting.Processing.Report.ProcessReportContent() +34
    Telerik.Reporting.Processing.Report.ProcessItem() +168
    Telerik.Reporting.Processing.ReportProcessor.ProcessReport(Report reportDefinition) +57
    Telerik.Reporting.Processing.ReportProcessor.Render(String format, Report reportDefinition, Hashtable deviceInfo, CreateStream createStramCallback) +81
    Telerik.ReportViewer.WebForms.ServerReport.Render(HttpResponse response, String format, Int32 pageNumber, Boolean refresh) +834
    Telerik.ReportViewer.WebForms.ReportPageOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +72
    Telerik.ReportViewer.WebForms.HttpHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +118
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +317
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +65

    But after I press the Refresh button everything works fine. Here is the code inside the page:
    protected void Page_Load(object sender, EventArgs e) 
        { 
            if (!IsPostBack) 
            { 
                ReportViewer1.Report.DataSource = dal.GetEmployersPostingsJob(JobID); // This function Returns DataTable 
                ReportViewer1.DataBind(); 
            } 
        } 
    I tried also to remove the ReportViewer1.DataBind(); line but still getting the error. That's why i think the report needs the Refresh function.

    Also I have another question:

    When I set ShowNavigationGroup or ShowRefreshButton Properties to true I got them twice in the report viewer toolbar!! when i set these properties to false i don't get them at all in the tool bar.
    You can see what i mean in the following link:
    http://www.dashsoft.com/demos/Report.jpg
    How can i make them appear only once?
    Please don't be annoyed with my long and many questions, that's my first time to use your reporting suite :).

    Best regards,
        Lamees Ayman
  7. Chavdar
    Admin
    Chavdar avatar
    898 posts

    Posted 18 May 2007 Link to this post

    Hi lamees,

    The first problem comes from the field names. You can try enclosing them in square brackets: =[xxxxx_xxxxx] (same applies to the fields that contain spaces).

    The second issue is caused because the .css file for the Report Viewer is not loaded correctly. This may be happen due to many reasons so we need some more information. Can you send us the .aspx page with the Report Viewer, the web.config file of the application and the source of the rendered page in a support ticket?

    Thanks in advance.

    Greetings,
    Chavdar
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. lamees
    lamees avatar
    56 posts
    Member since:
    Jul 2006

    Posted 18 May 2007 Link to this post

    Hi Chavdar,
    There are no support tickets available for the Reporting product. I can only submit Support Tickets for RadControls for WebForms and WindowsForms.
    However you can download the files you requested from the following link:

    <admin>link removed </admin>

    Waiting for your reply.
    Thanks
  9. Chavdar
    Admin
    Chavdar avatar
    898 posts

    Posted 21 May 2007 Link to this post

    Hi lamees,

    Everything with the files seems to be OK, so check whether the head section in the master page has the runat="server" attribute:

        <head runat="server">
            <title>Untitled Page</title>
        </head>

    Concerning the issue with submitting a support ticket, there was a glitch in your account, which we just fixed. Now you should be see Telerik Reporting in the list of products on the New Support Ticket page.

    Best wishes,
    Chavdar
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  10. lamees
    lamees avatar
    56 posts
    Member since:
    Jul 2006

    Posted 21 May 2007 Link to this post

    Thanks Chavdar for your support. This is working so good now :)
Back to Top
DevCraft banner