Telerik Forums
Reporting Forum
5 answers
346 views
Okay I've watched this video about parameterized queries.

I created my sqldataadapter with the following select:
SELECT     ApplicationDisplay, RoleDisplay, FirstName, LastName, EffectiveStartDate, EffectiveEndDate, EnvironmentDisplay, ApplicationId
FROM         AppUsersByRoleView
where     applicationid in (@appId)

I want to use the built-in report parameters in telerik reporting.  I created a report parameter named "Application" with a type of Integer.  (I've also tried a type of string).  It is a MultiValue parameter with the available values valuemembers being integers.  I also setup the filter to be =Fields.ApplicationId In =Parameters.Application.

Within my codebehind for NeedDataSource I have the following code.

'Transfer the ReportParameter value to the parameter of the select command    
Me.SqlDataAdapter1.SelectCommand.Parameters("@appID").Value = Me.ReportParameters("Application").Value

'Take the Telerik.Reporting.Processing.Report instance and set the adapter as   
'it's DataSource    
Dim report As Telerik.Reporting.Processing.Report = CType(sender, Telerik.Reporting.Processing.Report)
report.DataSource = Me.SqlDataAdapter1

When I run the report, NeedDataSource runs fine, but then I get an error within my reportviewer.

An error has occured while processing Report '':
Failed to convert parameter value from a ArrayList to a Int32.

Any help would be appreciated.
Thanks.
Steve
Telerik team
 answered on 16 Sep 2009
1 answer
84 views
I'm trying to deploy my site to a server setup for "precomiled" web server.  I got the Telerik reporting DLLs up there and working but where do I put my config file?  The reports can't seem to find the settings for the database connection.
Steve
Telerik team
 answered on 16 Sep 2009
1 answer
472 views
Hi ,

i have a report which shows the dates as below based on the user inputs

     Batch Date:  September 15,2009   --- This should be displayed when the user selects only one day
                           0r
     September 1,2009  to September 15,2009  --- This should be displayed when the user selects date range

BtachDate:  textbox1
Fromdate:   textbox2
Todate:       textbox3
to:               textbox4

In the report i want to compare Fromdate and ToDate and if they are equal, then hide textbox3, textbox4
                                                                                                           Notequal, then hide textbox1

I have seen some examples in the forum( attaching a databounditem event to a textbox),
but i dont see a situation where we can make a textbox visible/invisible based on ther textbox values?

How can this be accomplished??


Thanks,
PK
Steve
Telerik team
 answered on 16 Sep 2009
1 answer
185 views
Good day everyone.

I trying out your report and am very pleased with it. Except for one thing.
In report designer when elements overlap or are out of page a yellow exclamation mark appears in the corner of overlapping element (something like this image) . It's a handy feature but I'm designing report with a lot overlapping elements. I tried to somehow avoid overlapping but it is very hard.

Is there a way to hide or disable those warnings (yellow exclamation mark)?

Thank you in advance.
Steve
Telerik team
 answered on 16 Sep 2009
0 answers
49 views

Hello Friends,

In Windows Telerik Report, I want to provide a such functionality so that by clicking on specific field in report , some other screen will opens and also want to open other telerik report.

If anyone know this kind of functionality in Windows Telerik Report than please give me reply as soon as possible.

Thanks in advance.


Projects Computerra
Top achievements
Rank 1
 asked on 16 Sep 2009
11 answers
669 views
Hi,
    I am trying to find out if my solution is correct, and if so, if there is anything else I should be aware of. Or, If there is a better way, what might that be ?    If this is wrong (even though it builds) what is the correct way of doing this ?

This is the fill error i was getting after i added a parameter to one of the tables in the report. 

 

In my report.xsd, I found the Fill method in the xsd's Designer.cs. 

 

this is what I did. I found the method holding the two parameters. It included the datatable as a parm and the MemberParm which is the name I gave the new parameter in this report.

I copied this method .......

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]  
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]  
        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]  
        public virtual int Fill(iqBodyWorksV02DataSetEquipmentSummary.iqBodyWorksV02DataSetEquipmentSummaryTableDataTable dataTable, int MemberParm) {  
            thisthis.Adapter.SelectCommand = this.CommandCollection[0];  
            this.Adapter.SelectCommand.Parameters[0].Value = ((int)(MemberParm));  
            if ((this.ClearBeforeFill == true)) {  
                dataTable.Clear();  
            }  
            int returnValue = this.Adapter.Fill(dataTable);  
            return returnValue;  
        }  
 

To here. Then, I just commented out the signiture line and replaced it with a line that only included the datatable parm, now. Of course I had to comment out the two lines pertaining to the MemberParm as well,   now I had a fill method with one parm .......

 (the lines I commented out start with // iqworks) 

 

// iqworks   
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]  
        [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]  
        [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]  
       //iqworks public virtual int Fill(iqBodyWorksV02DataSetEquipmentSummary.iqBodyWorksV02DataSetEquipmentSummaryTableDataTable dataTable, int MemberParm)  
        public virtual int Fill(iqBodyWorksV02DataSetEquipmentSummary.iqBodyWorksV02DataSetEquipmentSummaryTableDataTable dataTable)  
       {  
       //iqworks     thisthis.Adapter.SelectCommand = this.CommandCollection[0];  
       // iqworks     this.Adapter.SelectCommand.Parameters[0].Value = ((int)(MemberParm));  
            if ((this.ClearBeforeFill == true))  
            {  
                dataTable.Clear();  
            }  
            int returnValue = this.Adapter.Fill(dataTable);  
            return returnValue;  
        }  
         // end of iqworks  
 

I placed the cursor over the class lib name, right clicked and hit Build, the build was successful this time.
I saw posts that lead me to documentation that told me "I needed to add a method" but it never told me "where to go to add the method" ?
Anyway, is there anything else I need to do ?
Seems like this should automatically be done just like it automatically adds or changes the original one method with the new parameter ? Not sure ? 
thanks

IQworks
Top achievements
Rank 1
 answered on 16 Sep 2009
2 answers
102 views
Greetings,  I have set up a report using a subreport which I will ultimately send to a PDF file from a web link.

I have set up the subreport and its parameters as instructed in various places on the site, and although the title of the subreport shows, no data is produced.  The subreport is getting the correct value for the parameter being passed which I can tell by having the {Parameter.rOrdNo} printed in the title line.

However, again, no data is being selected.

The code behind for the subreport is shown below.  What am I missing?

Thanks

public

partial class OrdProfMulti : Telerik.Reporting.Report

 

{

 

public OrdProfMulti( )

 

{

 

 

InitializeComponent();

 

 

try

 

{

 

this.arloeDataSet1TableAdapter1.GetData(Convert.ToInt32(this.Report.ReportParameters["rOrdNo"].Value.ToString()));

 

 

this.arloeDataSet1TableAdapter1.Fill(this.aRLOEDataSet1.ARLOEDataSet1Table, Convert.ToInt32(this.Report.ReportParameters["rOrdNo"].Value.ToString()));

 

}

 

catch (System.Exception ex)

 

{

 

System.Diagnostics.Debug.WriteLine(ex.Message);

 

}

}

 

private void OrdProfMulti_NeedDataSource( object sender, EventArgs e )

 

{

 

Telerik.Reporting.Processing.

Report report = (Telerik.Reporting.Processing.Report)sender;

 

 

this.arloeDataSet1TableAdapter1.GetData(Convert.ToDecimal(this.Report.ReportParameters["rOrdNo"].Value.ToString()));

 

 

this.arloeDataSet1TableAdapter1.Fill(this.aRLOEDataSet1.ARLOEDataSet1Table, Convert.ToDecimal(this.Report.ReportParameters["rOrdNo"].ToString()));

 

report.DataSource = aRLOEDataSet1;

 

 

}

 

}

RONNY JOHNSTON
Top achievements
Rank 1
 answered on 15 Sep 2009
1 answer
156 views
I'm dynamically creating a public ReportViewer and then adding it to the masterpage via a reports base class.  The base class adds the report viewer to the form okay, but the ReportViewer will not render the report (I never even get a "generating" notification).  If I just drop a report viewer control directly on the page and then *only* change the reference, it works as expected(example below). Nothing else is changed; which since the viewer control is actually displaying on the page in both instances, it makes me believe the Telerik engine is having a problem connecting the report to the viewer or perhaps having problems rendering it to the screen. I have also noticed I do not get the report parameter inputs for the dynamically created reportviewer if that helps give any clues to the issue.

ReportViewer1.Report = thisReport; 
(RV dynamically created in the base class - RV renders fine on page, but displays no report)
#####  Just change the reference to the dedicated RV and it then works. #####
ReportViewer2.Report = thisReport;  (RV directly put in the page - Everything works as it should)

Is there something out of the ordinary I'm missing for dyanamcily creating a ReportViewer to see the report and then getting it to render? Again, everything works fine for the non dynamically created ReportViewer.

(note: the dynamic created reportviewer is persisted though postbacks as it should)
Steve
Telerik team
 answered on 15 Sep 2009
1 answer
100 views

Hi,

i need to run the following query in order to be able to create a dataset and bind it to my parameter which
is supposed to be a drop down.

what i am trying to do is creating a temp table to create a dataset for Month and Year drop downs

my problem is that , the query builder does not support 'Declare' so i am basically not able to use my query.

What can i do to create a drop down param and bind it to a dataset which is not actually running on an existin table in my database.

Thanks very much
Zahra

 

declare

 

@months table(

 

 

 

 

monthName

varchar (50),

 

 

 

 

monthValue

int)

 

 

 

 

insert

 

into @months(monthName,monthValue)

 

 

 

 

select

 

'January',1 union

 

select

 

'Feburay',2 union

 

select

 

'March',3 union

 

select

 

'April',4 union

 

select

 

'May',5 union

 

select

 

'June',6 union

 

select

 

'July',7 union

 

select

 

'August',8 union

 

select

 

'September',9 union

 

select

 

'October',10 union

 

select

 

'November',11 union

 

select

 

'December',12

 

 

 

 

select

 

monthName, monthValue from @months order by monthvalue asc

 

Steve
Telerik team
 answered on 15 Sep 2009
1 answer
80 views
hi,

is it safe to use my sql query command when i am using the telerik reporting wizard?
as far as i know, using stored procedures is much safer but then i won't be able to use the telerik reporting wizard.
what do you recommend?

Thanks,
Zahra
Steve
Telerik team
 answered on 15 Sep 2009
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?