Telerik Forums
Reporting Forum
0 answers
141 views
I have several reports that I have designed where I have optional fields that appear at the left margin of the report. Based on parameters provided the fields on the left side will be hidden but I also need to resize the report so that the dead space is not seen. I have tried making the fields invisible and setting the width of the fields to 0 and then setting the report widths as follows:
                this.Width = new Telerik.Reporting.Drawing.Unit(19.0D, Telerik.Reporting.Drawing.UnitType.Inch);
                this.Report_Detail.Report.Report.Width = new Telerik.Reporting.Drawing.Unit(19.0D, Telerik.Reporting.Drawing.UnitType.Inch);
                this.reportHeader.Report.Report.Width = new Telerik.Reporting.Drawing.Unit(19.0D, Telerik.Reporting.Drawing.UnitType.Inch);
                txReportHeader.Width = new Telerik.Reporting.Drawing.Unit(19.0D, Telerik.Reporting.Drawing.UnitType.Inch);
                this.pageFooter.Report.Report.Width = new Telerik.Reporting.Drawing.Unit(19.0D, Telerik.Reporting.Drawing.UnitType.Inch);

I assumed that in ding this that everything would shift left eliminating the dead space but this is not the case. Does anyone have any ideas for how this can be accomplished simply without having to go through the hassles of repositioning all other fields.

Any help would be appreciated.
Jim Harris
Top achievements
Rank 1
 asked on 31 Aug 2011
3 answers
106 views
Hi,

This is my first pass in trying to generate reports in Silverlight. I am using MVVM pattern in my silverlight project. I have object class as Model which further contains collection of other object(s). I do not have any database to store the data. This project is a data entry form and then generates a report at the end using the data entered.

I have generated a class library project to generate the report. How do I get access to the data in my silverlight project? Will referencing the project retain the state of the data? How do I approach? Any help will be highly appreciated.

Thanking you in advance.
Massimiliano Bassili
Top achievements
Rank 1
 answered on 31 Aug 2011
1 answer
221 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
197 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
78 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
132 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
219 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
369 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
164 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
104 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
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?