Telerik Forums
Reporting Forum
5 answers
185 views
I want that the next details right after previous group footer.
How can I remove that?

Milen | Product Manager @DX
Telerik team
 answered on 24 Mar 2008
7 answers
154 views
I am trying to generate a report, and the wizard is giving me an error.

Can anyone suggest how to overcome this issue while still using DAL's or do I have to use the builtin DB connection stuff?

Screenshot
Svetoslav
Telerik team
 answered on 21 Mar 2008
1 answer
256 views
Hi,

Programming in VB.

I am using Telerik reporting in our website development along with all your other asp.net controls and I need to programmatically produce a pdf file and the save it to a subdomain on the server.
I have used your code snippet (July 18, 2007) to produce the pdf and this works fine, but I would like to extend the code to save the pdf to a folder on a subdomain.

I notice a commented out line in the code

'WriteToFile(Server.MapPath("~\temp\" & fileName), reportBytes)


Perhaps this is what I am looking for, but I don't understand how to implement it.

Regards,

Andy.

Chavdar
Telerik team
 answered on 20 Mar 2008
1 answer
95 views
I have users logging in using simple HTTP Auth (NTLM on IIS). I need this info, the user id / pw to be passed to the report i am creating. How can i do that ?
Ivan
Telerik team
 answered on 20 Mar 2008
1 answer
89 views
I have a report, that is databound from code behind.  In order to set up the report quickly, i used the report wizard

During the Wizard setup, I provide it with the SQL query from my stored procedure, minus the parameters.

Once the report is designed, i then sever the link to the DataTableAdapter that was created by the wizard

In the need datasource method of the report, i provide it with a data table that is filled from my sqlcommand

In the report, i remove the link to the datasource that was referenced from the wizard

when i run the report, no data is shown in the viewer, however when i export to PDF or Excel, the data is shown.

am i missing a configuration?  Do i have to do it completely from code behind?...i hope not

obviously when i go into the value of the textbox, and look at the fields, there is no field data...

please help me shed some light as to what i am doing wrong

Thanks
Jay
Top achievements
Rank 1
 answered on 19 Mar 2008
1 answer
829 views
I am creating a report that will render directly to PDF.   There are several pages or elements that will have background images...which we are currently rendering as PNG files.   We exported them at 300 dpi in order to accomodate the highest pdf export resolution possible (intended for print)...but when included in the page they get rendered with about 15% of the image off the right + bottom of the page.

Is there a recommended "pixel" or "dimensions" for a full page background...meaning something that will fill edge to edge without actually going off the edge of the page?  Please advise!

Side note:   I don't know if it will make much difference...but we are placing some elements close to the edge of the page..so have set page margins to 0 all the way around.

Thank you!
-David
dcdigital72
Top achievements
Rank 1
 answered on 19 Mar 2008
1 answer
122 views
In the print detail section, I have customer name print in the first row, and address print in second row.
So my question: Is there any way I can skip second row if address is empty.

Right now, my report print this if Customer B address field is empty:

Header
----------------------------------
Customer A
Customer A's address
Customer B

Customer C
Customer C's address
-----------------------------------
Footer

Instead, I want it to print like this if Customer B address field is empty:

Header
----------------------------------
Customer A
Customer A's address
Customer B
Customer C
Customer C's address
-----------------------------------
Footer

Thanks for any suggestions.
Paul Hutson
Top achievements
Rank 1
 answered on 19 Mar 2008
7 answers
1.1K+ views
I searched the Reporting forums for any example I could find about combining multiple reports together in to one report, sadly I found none what so ever. Yes there were mentions of using sub reports, but what if you had more than one report you wanted to add in there. There was no examples at all that I could find. So I sat down and started hacking away at this problem. Luckily I did find a solution that works. I hope this helps out anyone that read this, enjoy. There may be some errors here and there, as there always are in examples. But the general idea should be straight forward. Also that only the detail section of each report will be placed in the sub report at the current moment. Thank you for your time.

PageBatch.cs
public PageBatch(List<int> ItemIds) { 
            //Create new sections 
            PageHeaderSection header = new PageHeaderSection(); 
            PageFooterSection footer = new PageFooterSection(); 
            DetailSection ds = new DetailSection(); 
 
            //"Remove" the header and footer 
            header.Height = new Unit(0.1, UnitType.Pixel); 
            footer.Height = new Unit(0.1, UnitType.Pixel); 
 
            //add header 
            this.Report.Items.Add((ReportItemBase)header); 
 
            double previousLocation = 0; //this will store the offset of the Y direction 
 
            UnitType pageMeasurementType = this.PageSettings.PaperSize.Width.Type; 
 
            for(int i = 0; i < ItemIds.Count; i++){ 
                 
                //since subReport inherits from baseitem it can be fed in programmaticly 
                SubReport sb = new SubReport(); 
                sb.ReportSource = new TestPage(ItemIds[i]); 
 
                //move subreport 1.25 inches in Y direction 
                sb.Location = new PointU(new Unit(0, pageMeasurementType), new Unit(previousLocation, pageMeasurementType)); 
                sb.Width = this.PageSettings.PaperSize.Width - (this.PageSettings.Margins.Right + this.PageSettings.Margins.Left ); 
                previousLocation += this.PageSettings.PaperSize.Height.Value; 
                ds.Items.Add(sb); 
            } 
 
            this.Report.Items.Add((ReportItemBase)ds); 
            this.Report.Items.Add((ReportItemBase)footer); 
 
            this.Report.PageSettings.Margins.Top = new Unit(0.15, UnitType.Inch); 
            this.Report.PageSettings.Margins.Bottom = new Unit(0.25, UnitType.Inch); 
            this.Report.PageSettings.Margins.Left = new Unit(0.25, UnitType.Inch); 
            this.Report.PageSettings.Margins.Right = new Unit(0.25, UnitType.Inch); 
        } 

TestPage.cs
        public TestPage(int _ItemId) { 
                //do some logic here 
        } 


Svetoslav
Telerik team
 answered on 18 Mar 2008
1 answer
175 views
Hi I am using Q2 2007.  I have a report that uses a single integer parameter, and that parameter is referenced in a simple filter "field=parameter".

I have a text box on teh page header that shows the parameter value, so I know it is set.  But none of my header or detail sections shows up when I pass in a value.

Dim clientBatchID As Integer
clientBatchID = CInt(Request.QueryString("clientBatchID"))
Me.ReportViewer1.Report.ReportParameters("clientBatchID").Value = clientBatchID

If I run the report like this, I get the constants values (header text, page numbers etc) and the parameter text box, but no data.

If I do this

Dim clientBatchID As Integer
clientBatchID = 175
Me.ReportViewer1.Report.ReportParameters("clientBatchID").Value = clientBatchID

I get data for batch 175, report looks fine.

Could this be a transaction problem?  In the first example, I have left out some steps in teh pasted code above, where the records I want to report on are assigned the batch ID.  I imagine they might not be committed and the report doesn't see them.  But I follow this same pattern in other reports and do not have this problem...

any ideas?


Hrisi
Telerik team
 answered on 17 Mar 2008
4 answers
196 views
Hi

I'm having a problem using the ReportViewer with radAjaxManager (Prometheus)

I have a button click event which updates the report datasource
HOWEVER with radAjaxManager enabled,
the report doesn't update correctly and shows zero records

When the radAjaxManager AjaxEnabled is set to false
The report refreshes successfully...

I've tried hooking the radAjaxManager to both the Reportviewer and a panel containing the Reportviewer

Hope someone can help...


Here's the ASPX
===============
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="ButtonRefresh">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="ReportViewer1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<asp:Button ID="ButtonRefresh" runat="server" Text="Refresh" />
<br />

<asp:Panel ID="PanelReport" runat="server">
    <telerik:ReportViewer id="ReportViewer1" runat="server">
    </telerik:ReportViewer>
</asp:Panel>


This is the code behind
=======================
    Protected Sub ButtonRefresh_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ButtonRefresh.Click
        Me.ReportBindIt(" FullName LIKE '%hoey%' ")
    End Sub

    Public Sub ReportBindIt(ByVal Criteria As String)

        Dim TelerikReport As New CaseReports.A4_CaseReport1
        Dim sqlSelectCommand1 As New SqlCommand()
        Dim sqlDataAdapter1 As New SqlDataAdapter()
        Dim sqlConnection1 As New SqlConnection()

        sqlConnection1.ConnectionString = GetConnectionString()
        sqlSelectCommand1.CommandText = "dbo.procGetReportCaseList1"
        sqlSelectCommand1.CommandType = Data.CommandType.StoredProcedure

        sqlSelectCommand1.Parameters.AddWithValue("Criteria", Criteria)
        sqlSelectCommand1.Parameters.AddWithValue("SortExpression", "fileref DESC")

        sqlSelectCommand1.Connection = sqlConnection1
        sqlDataAdapter1.SelectCommand = sqlSelectCommand1

        TelerikReport.DataSource = sqlDataAdapter1
        ReportViewer1.Report = TelerikReport


    End Sub
Martin
Top achievements
Rank 1
 answered on 14 Mar 2008
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?