Telerik Forums
Reporting Forum
1 answer
209 views
Can you define an expression for Count Distinct on a field of a report?
Svetoslav
Telerik team
 answered on 31 Jan 2008
1 answer
159 views
I am trying to design a report for a custom DotNetNuke module that I am developing.  How would one go about designing a report that connects to a Business Object.  Do I have to create a Dataset in order to design the report?
Chavdar
Telerik team
 answered on 30 Jan 2008
1 answer
121 views

I have been evaluating Telerik reports for a few days now. I like what i want seen so far.bt i m facing a lil bit problem that some time when SQL query returns nothing then reporting process jst goes in to wait state.bt often it desplay the contents that no page to display bt some time it jst goes to wait state.normaly this prob. raise when Master report have a field be there is no field in subreport.the approach i m using is the following

Private Sub SubReport1_NeedDataSource(ByVal sender As Object, ByVal e As System.EventArgs) Handles ItemQtyByContainerSubReport1.NeedDataSource

 

Dim subreport As Telerik.Reporting.Processing.Report = DirectCast(sender, Telerik.Reporting.Processing.Report)

 

cmd.CommandText = "SELECT ITM.ITM_NUMBER, ITM.ITM_NAME, SUM(PCQ.PCQ_QTY_IN_HAND * MFK.ITU_QUANTITY) AS Qty " & _

"FROM AFS_PCQ_PUR_CON_LINE_QTY_IN_HAND AS PCQ INNER JOIN " & _

"AFS_PUC_PURCHASE_CONTAINER AS PUC ON PCQ.PCQ_PUC_FK = PUC.PUC_ID INNER JOIN " & _

"AFS_ITM_ITEM AS ITM ON PCQ.PCQ_ITEM_NUMBER = ITM.ITM_NUMBER INNER JOIN " & _

"AFS_UOM_UNIT_OF_MEASURE AS UOM ON PCQ.PCQ_UOM_FK = UOM.UOM_ID INNER JOIN " & _

"AFS_ITU_ITEM_UNIT_OF_MEASURE AS MFK ON UOM.UOM_ID = MFK.ITU_UOM_FK AND ITM.ITM_ID = MFK.ITU_ITM_FK " & _

"WHERE (PCQ.PCQ_QTY_IN_HAND > 0) " & _

"GROUP BY PUC.PUC_CONTAINER_NUMBER, ITM.ITM_NUMBER, ITM.ITM_NAME " & HavingClause

adapter = New SqlDataAdapter(cmd.CommandText, sConnectionString)

adapter.Fill(ds)

subreport.DataSource = ds.Tables(0).DefaultView

End Sub

Rossen Hristov
Telerik team
 answered on 29 Jan 2008
3 answers
1.0K+ views

Hello,

This is the first time I've been using Telerik Reporting in a major project and I've been having some major problems.

At first, the development experience with TR was really nice up until the point where the VS designer quit working.  After the designer quit working, everything has been downhill since....

ISSUE 1:
When I first start Visual Studio, and double click on a relatively detailed report, I get the following:

One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.


The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: PropertyListing --- The base class 'Telerik.Reporting.Report' cannot be designed.

Hide    


at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)





After 3 or 4 attempts closing and opening the report, the report will finally load.  Very annoying.  I'm not sure why this happens.

ISSUE 2: Support for domain objects in an IList<T> tend to be flaky.  For example, if I set the DataSource property in the designer, and load sample data (similar to how Car/Cars List<Car> example, when trying to setup the Filters property, I get a Null Reference Exception from the designer.

ISSUE 3: Debugging/Troubleshooting the Reporting Framework is hard because of the signed reporting assemblies.  I was able to build the Telerik Reporting from the source code and attempted to replace the "Release" version with my own "Debug" version to further troubleshoot the issue, but it seems that any pictures I've added to reports while using the "Release" versions get serialized and signed with the "Release" serialized object signatures in the report RESX resource file, so replacing the run time assemblies with "Debug" versions doesn't exactly work.

I've tried to setup a small demo project to demonstrate the problem but I'm not able to reproduce the issues.  Anyone else getting designer problems?  Any suggestions on debugging this?  I've spent about 2 days already wasted trying to solve these issues looking for a final "work flow" to work with these telerik reports.

Thanks,

Brian Chavez
Top achievements
Rank 2
 answered on 28 Jan 2008
1 answer
250 views
1) I am trying telerik reporting as I need to create a 4 level sub report. I think it's possible in Telerik.
2) I am trying to create a report with just one sub report in it as of now. I have 2 reports- Master report and a sub report. But I need to feed the data programatically to both the reports(using Business Objects and not a SQL server query.) I don't see anything when I try to do that. If I create the sub report, using SQL query it runs fine. Can anyone please tell me how to set the data dynamically in a sub report.

Following is the snippet

Report1

report1 = new Report1();//Main Report

Report2Sub1 rep2Sub1 = new Report2Sub1();//Sub report

//Bind Collection 1 to Main report

report1.DataSource = list;


//Bind Collection 2 to Sub report 

rep2Sub1.DataSource = lpmd;

Telerik.Reporting.

SubReport subr = new Telerik.Reporting.SubReport();

subr.ReportSource = rep2Sub1;

subr.Visible =

true;

//I made this subreport1 property to public instead of private.
report1.subreport1 = subr;

Thanks in Advance,
-Jeff
Milen | Product Manager @DX
Telerik team
 answered on 28 Jan 2008
1 answer
101 views
Hello,

Is it possible to apply the Height as an Style?
I want to style all TextBoxes to an fixed height, so I would use the TypeSelector.
But in The Style Section there is no Height Attribute.

If it is possible to add the Height Attribute via the CodeBehind, then how to export it?

Regards,
Mansur
Svetoslav
Telerik team
 answered on 25 Jan 2008
3 answers
276 views

I have used SP1 successfully to render a CCITT G4 compression report through the web viewer.  But now when I automate it through code to churn out many reports in an automated fashion is goes back to LZW compression which is not what I want.  Here is what i have in my code....please help!  Am I formatting my extension wrong or feeding variables to the Render method incorrectly.  The DPI changes but the compression stays as LZW.  Thanks in advance for your help.
Doug

            string mimType = string.Empty;  
            string extension = string.Empty;  
            Encoding encoding = null;  
            Report1 report1 = new Report1();  
 
                Hashtable deviceInfo = new Hashtable();  
                deviceInfo["OutputFormat"] = "TIFF";  
                deviceInfo["TiffCompression"] = "ccitt4";  
                deviceInfo["DpiX"] = 300;  
                deviceInfo["DpiY"] = 300;  
                byte[] buffer = Telerik.Reporting.Processing.ReportProcessor.Render(  
                    "TIFF300", report1, deviceInfo, out mimType, out extension, out encoding);  
                using (MemoryStream stream = new MemoryStream(buffer))  
                {  
                    using (System.Drawing.Image img = System.Drawing.Image.FromStream(stream))  
                    {  
                        img.Save(@"c:\temp\" + report1.GetType().Name + "." + extension,  
                          System.Drawing.Imaging.ImageFormat.Tiff);  
                    }  
                } 

My extension in the web.config look like this....

                <Extension name="TIFF_CCITT4_300" 
            type="Telerik.Reporting.ImageRendering.ImageReport, Telerik.Reporting.Processing, Version=2.0.1.0, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" 
            description="TIFF file (CCITT Group 4 300dpi)">  
                    <Parameters> 
                        <Parameter name="TiffCompression" value="ccitt4" /> 
                        <Parameter name="DpiX" value="300" /> 
                        <Parameter name="DpiY" value="300" /> 
                    </Parameters> 
                </Extension> 
 
                <Extension name="TIFF300" 
            type="Telerik.Reporting.ImageRendering.ImageReport, Telerik.Reporting.Processing, Version=2.0.1.0, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" 
            description="TIFF file (CCITT Group 4 300dpi)">  
                    <Parameters> 
                        <Parameter name="TiffCompression" value="ccitt4" /> 
                        <Parameter name="DpiX" value="300" /> 
                        <Parameter name="DpiY" value="300" /> 
                    </Parameters> 
                </Extension> 

Milen | Product Manager @DX
Telerik team
 answered on 24 Jan 2008
6 answers
235 views
Hey, there. I'm working on a report which incorporates charts, and binding the data to the charts with the following method:

private void ByDateChart_NeedDataSource(object sender, System.EventArgs e)
        {
            Telerik.Reporting.Processing.Chart chart = sender as Telerik.Reporting.Processing.Chart;
           
            DataRowView dataItem = (DataRowView)chart.DataItem;
            sqlDataAdapter1.Fill(dataSet);
            DataView view = dataSet.Tables[0].DefaultView;
            chart.DataSource = view;           
           
            ByDateChart.PlotArea.XAxis.MaxItemsCount = view.Count;
            ByDateChart.PlotArea.XAxis.MaxValue = view.Count;
            ByDateChart.PlotArea.XAxis.MinValue = 0;
            ByDateChart.PlotArea.XAxis.AutoScale = false;
            ByDateChart.PlotArea.XAxis.AutoShrink = false;
            ByDateChart.PlotArea.XAxis.Clear();   
       
            bool stepLabels = view.Count > 20;
            int stepSize = view.Count /20;
            int index = 0;
            foreach (DataRowView rowView in view)
            {
                if (stepLabels && (index % stepSize != 0))
                {
                    ByDateChart.PlotArea.XAxis.AddItem(" ");
                }
                else
                {
                    ByDateChart.PlotArea.XAxis.AddItem(((DateTime)(rowView["DateStamp"])).ToShortDateString());
                }

                index++;
            }
        }

My problem is that I want to get rid of the numeric label shown at the top of each bar item (it's a bar chart), but I can't seem to. Is there something obvious I'm just missing here?
Maria Gracela
Top achievements
Rank 1
 answered on 24 Jan 2008
2 answers
99 views
I have created a report that when viewed in the designer in Visual Studio looks perfectly fine, but when I look at it in the actual ASP.NET site none of the column headers and data columns line up, and it looks like a total mess.  Is there something I am doing wrong?  I have made several other reports and the positioning was always exactly the same from designer to web.  I am not doing anything programatically, it's all just a very simple report bound to a dataset.

Thanks for any help!
Ryan Skarin
Top achievements
Rank 1
 answered on 23 Jan 2008
1 answer
189 views
hi,
thank a lot for you previous reply for my problem. i need to know how to user aggregate functions inside the report. i have a report with three grouping levels.
like Category, sub category, and items. i need to get item counts for parent category grouping levels.

regards,
madu
Milen | Product Manager @DX
Telerik team
 answered on 23 Jan 2008
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?