Telerik Forums
Reporting Forum
1 answer
205 views
Hi,
I have just upgraded to a production license of Telerik reporting and i am recieving the following error in VS2010 when openning a report - Value cannot be null. Parameter name: instance.
If i try and open a new report i recieve the following -
Error: this template attempted to load component assembly ' Telerik.Reporting.Design, Version5.1.11.713

I have openned a support ticket for this but as I have an urgent production need to get this resolved Im trying all avenues.

Thanks Chris
Chris
Top achievements
Rank 1
 answered on 31 Aug 2011
0 answers
175 views
Hi,

I am Kuldeep, trying to create dynamic report thru this code but show

blank.
Please help or suggest me, what I am making mistake in it. Is it right

code? And where I can find its solution or help.


private void table1_ItemDataBinding(object sender, EventArgs e)
        {
            dbCon = new SqlConnection

(ConfigurationManager.ConnectionStrings["abc"].ConnectionString);
            dbCon.Open();
            dbCon.Close();
            SqlDataAdapter adapter = new SqlDataAdapter("spOrder",

dbCon);
            Telerik.Reporting.Processing.Table processingTable = (sender

as Telerik.Reporting.Processing.Table);
            Telerik.Reporting.Table table1 = new

Telerik.Reporting.Table();
            DataTable dt = new DataTable();
            adapter.Fill(dt);
            processingTable.DataSource = dt;
            Telerik.Reporting.HtmlTextBox textboxGroup;
            Telerik.Reporting.HtmlTextBox textBoxTable;
            table1.ColumnGroups.Clear();
            table1.Body.Columns.Clear();
            table1.Body.Rows.Clear();
            int i = 0;
            foreach (DataColumn dc in dt.Columns)
            {
                Telerik.Reporting.TableGroup tableGroupColumn = new

Telerik.Reporting.TableGroup();
                table1.ColumnGroups.Add(tableGroupColumn);
                table1.Body.Columns.Add(new

Telerik.Reporting.TableBodyColumn(Unit.Inch(1)));

                textboxGroup = new Telerik.Reporting.HtmlTextBox();
                textboxGroup.Style.BorderColor.Default = Color.Black;
                textboxGroup.Style.BorderStyle.Default =

BorderType.Solid;
                textboxGroup.Value = dc.ColumnName.ToString();
                textboxGroup.Size = new SizeU(Unit.Inch(1.1), Unit.Inch

(0.3));
                tableGroupColumn.ReportItem = textboxGroup;

                textBoxTable = new Telerik.Reporting.HtmlTextBox();
                textBoxTable.Style.BorderColor.Default = Color.Black;
                textBoxTable.Style.BorderStyle.Default =

BorderType.Solid;
                textBoxTable.Value = "=Fields." + dc.ColumnName;
                textBoxTable.Size = new SizeU(Unit.Inch(1.1), Unit.Inch

(0.3));
                table1.Body.SetCellContent(0, i++, textBoxTable);
                table1.Items.AddRange(new ReportItemBase[] {

textBoxTable, textboxGroup });


            }

        }


Thanks and Regards!
Kuldeep Dwivedi
Kuldeep
Top achievements
Rank 1
 asked on 30 Aug 2011
1 answer
56 views
I'm trying to dynamically create a report through a view layout, which is a custom XML definition.

I want to give the report an object as it's data source and all my data is stored through a dictionary on the class that is accessible through an indexer that returns an object.  Something like below.  Can I set up my the report binding with something like textbox1.Value = "=Fields["PersonID"]"?  It doesn't seem to work this way and I'm confused how I would set up the binding here in this case.
public class Instance
{
     private Dictionary<string, object> dictionary = new Dictionary<string,object>();
      
     public object this[string s]
     {
         get { return dictionary[s]; }
         set { dictionary[s] = value; }
     }
}
Peter
Telerik team
 answered on 30 Aug 2011
1 answer
115 views
Greetings 


Is there any way to change the location of the toggled button? 


My toggle button is working as desired, The only downside is that I need to look for the middle of the Group so I can click on it and hide the desired elements. :-(


Could you let me know if this could be done?


Thanks
Peter
Telerik team
 answered on 30 Aug 2011
1 answer
205 views
Hello,
after upgrade the version of Telerik reporting Q2 2010 to Q1 2011 the report does not work

the report:

public partial class MasterReport : Telerik.Reporting.Report
    {
        public MasterReport()
        {
            InitializeComponent();
        }


        private void MasterReport_NeedDataSource(object sender, EventArgs e)
        {
            Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender;
            // recupere la liste ID facture
            string[] idArray;
            idFactureArray = report.Parameters["List"].Value.ToString().Split(',');


            Telerik.Reporting.Drawing.Unit unitX = Telerik.Reporting.Drawing.Unit.Inch(0);
            Telerik.Reporting.Drawing.Unit unitY = Telerik.Reporting.Drawing.Unit.Inch(0);
            SizeU size = new SizeU(Telerik.Reporting.Drawing.Unit.Inch(1), Telerik.Reporting.Drawing.Unit.Inch(0.5));
            List<LettreRappel> detailReports = new List<LettreRappel>();
            LettreRappel detailReport1;
            // 
            for (int i = 0; i < idArray.Length; i++)
            {
                detailReport1 = new LettreRappel();
                detailReport1.ReportParameters["Id"].Value = idArray[i];
                detailReports.Add(detailReport1);
            }
         
            foreach (LettreRappel detailReport in detailReports)
            {
                SubReport subReport;
                subReport = new SubReport();
                subReport.Location = new PointU(unitX, unitY);
                subReport.Size = size;
                unitY = unitY.Add(Telerik.Reporting.Drawing.Unit.Inch(0.5));
                subReport.ReportSource = detailReport;
                detail.Items.Add(subReport);
                
            }


        }
    }
Peter
Telerik team
 answered on 30 Aug 2011
1 answer
332 views
Is it possible to have the first page of my report in portrait mode, but then have each subsequent page in landscape mode?  I have a report that has a cover sheet that needs to be in portrait mode.  Then it lists details that need to be in landscape mode (due to customer requests to show an increasing amount of information).  Can the orientation be set conditional (based on the page number).  Also, is there a way to add a simple page break?  right now i have the information on my first page stretched to force the List to begin on the second page.  Thanks!
Peter
Telerik team
 answered on 30 Aug 2011
0 answers
131 views
Hello all,

Can someone please tell me how the Telerik Reporting engine infers what is static text versus what is not static text?

For example, I have a textbox included in my Report Header Section whose value is to set to some fields from the datasource the report is bound to.  That being said, during the export to CSV, this is treated as static text.  I am NOT displaying static text in the CSV export, thus this field is not showing up on the export (but I need it aka I don't want it as static text). 

So can someone please tell me the conventions this reporting engine is using to infer what is static text against what is not static text.

I am trying to avoid writing a second report just for CSV exports as well overriding any report rendering methods unless I absolutely have to.

Thanks in advance,     

Forest
 

Forest
Top achievements
Rank 1
 asked on 29 Aug 2011
1 answer
93 views
hi,

when i convert a radgrid into pdf the image button disappear in the pdf file, 
help me 


here my code


<ExportSettings IgnorePaging="false" OpenInNewWindow="true">
                        <Pdf PageHeight="270mm" PageWidth="297mm" PageTitle="Master Billing Report" PageBottomMargin="20mm"
                            PageTopMargin="20mm" PageLeftMargin="20mm" PageRightMargin="20mm" />
  </ExportSettings>   





 <telerik:GridTemplateColumn HeaderText="Image" UniqueName="imgbyte">
                                <ItemTemplate>
                                 
                                <asp:ImageButton ID="asdf" Width="90px" Height="68px" Style="border: 1px solid #000000;"
                                        runat="server" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>


cs code

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
        {
            if (e.CommandName == RadGrid.ExportToPdfCommandName)
            isPdfExport = true;
        }
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
        {
            if (isPdfExport)
                FormatGridItem(e.Item);
        }

protected void FormatGridItem(GridItem item)
        {
            item.Style["color"] = "#eeeeee";


            if (item is GridDataItem)
            {
                item.Style["vertical-align"] = "middle";
                item.Style["text-align"] = "center";
            }


            switch (item.ItemType) //Mimic RadGrid appearance for the exported PDF file
            {
                case GridItemType.Item: item.Style["background-color"] = "#4F4F4F"; break;
                case GridItemType.AlternatingItem: item.Style["background-color"] = "#494949"; break;
                case GridItemType.Header: item.Style["background-color"] = "#2B2B2B"; break;
                case GridItemType.CommandItem: item.Style["background-color"] = "#000000"; break;
            }


            if (item is GridCommandItem)
            {
                item.PrepareItemStyle(); //needed to span the image over the CommandItem cells
            }


        }



Daniel
Telerik team
 answered on 29 Aug 2011
1 answer
87 views
Hello,

I have a problem using the Web ReportViewer, the issue is that the URL that is configured on the IIS where the site is running is not the same that the users employ to access the site. In other words, lets say my site address is http://www.site.com/ but the site can also be reach using http://www.clientsso.com/example/.

Now, lets say that on the homepage you can find a report using the ReportViewer, if you access the site using the http://www.clientsso.com/example/ address you are going to get a 404 when trying to export the report because the viewer is going to redirect the user to a URL starting with / which is not actually the root of the site when using that domain.

So, my question, is there any way in which I can instruct the viewer to use a given URL as the base for all redirects or requests?

Thanks in advance,

Javier
IvanDT
Telerik team
 answered on 29 Aug 2011
0 answers
76 views
Hello
I added pictures to the reportdo not appear in runtimebut the picture appears in pdfoutputdoes not faultDo you help please
Burak
Top achievements
Rank 1
 asked on 26 Aug 2011
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?