Telerik Forums
Reporting Forum
8 answers
2.3K+ views
Hello All,

the report columns I want are not specific so that I am generating them dynamically.
I have a query how to bind image column dynamically, i am trying to bind similar to text-box object. but images not shown.

Please provide way to add image column dynamically.

Thank you in advance.

Michael
Top achievements
Rank 1
 answered on 30 Nov 2011
2 answers
112 views
I have a few issues with using charts (a stacked bar chart in this case) and telerik reporting.  Note that we have the Q3 2011 version of the telerik reporting tools.


The first issue is getting the chart to use the correct "labels" for the x-axis.
I have some data which is similar to the following:

Store    Department    Category   PercentA    PercentB
APN        A                    Start            2                    3
APN        A                    End             5                    6
APN        B                    Start            3                    5
APN        B                    End             6                    9
HWT       B                    Start            4                    8
HWT       B                    End             4                    7
HWT       C                    Start            2                    3
HWT       C                    End             8                    8

I then use this data to generate a stacked bar chart.  I use the Category department as the series, so each bar would be split into two (my actual chart has more than 2 categories, but that works fine).  It would then plot PercentA and PercentB on the Y-axes - again no problems.

What I want to do is to use the Store + Department as the x-axis groups.  I am able to use the Store + Department as a group for the tabular display of data, but not on the chart.  The chart currently only creates 1 bar for each Store.  Is there a way for me to tell the chart to use Store + Department for each bar? 


For the second thing, the labels on the x-axis (store) is intersecting the x-axis itself - please see attached screenshot for what I meant.  Is there a way to tell the chart to keep all x-axis labels under the x-axis line?
Elian
Telerik team
 answered on 30 Nov 2011
1 answer
343 views
I have a XAML drawing brush.  I want it to show in the PictureBox on a report.  But the report only takes an image from System.Drawing and not System.Windows.Media.  Any ideas anyone?

// Grab the XAML DrawingBrush
DrawingBrush db = (DrawingBrush)App.Current.Resources["BugIcon"];
// Create an image (wrong kind of Image though)
Image i = new Image()
{
   Source = new DrawingImage(db.Drawing),
   Height = 300,
   Width = 300
};
// Need to convert Image to System.Drawing.Image.
RenderTargetBitmap renderBmp = new RenderTargetBitmap(300, 300, 96, 96, PixelFormats.Pbgra32);
renderBmp.Render(i);

PngBitmapEncoder encoder = new PngBitmapEncoder();
encoder.Frames.Add(BitmapFrame.Create(renderBmp));

using (MemoryStream stream = new MemoryStream())
{
   encoder.Save(stream);
   System.Drawing.Image i2 = System.Drawing.Image.FromStream(stream);
// This is the Telerik report, and the pb1/pb2 are PictureBox controls
   ((Telerik.Reporting.PictureBox)sr.Items["header"].Items["pb1"]).Value = i2;
   ((Telerik.Reporting.PictureBox)sr.Items["header"].Items["pb2"]).Value = i2;
}
Paul
Top achievements
Rank 1
 answered on 29 Nov 2011
1 answer
96 views
Hey All,


I`ve got a report with predefined groupings, however, I now have to add a new group programmatically. I've figured out how to do it, except that I want to add it at the beginning of the Grouping collection, and when i try Report.Groups.Add(newGroup), it adds it at the end...


Right now i have two levels of grouping.

I want to add a third, but i need this new one to be the topmost grouping level.

How can I do this, if at all possible?

Thanks!
Elian
Telerik team
 answered on 29 Nov 2011
3 answers
106 views
Hi Telerik team,

After update to Q3 2011, the NavigationGroup is not rendering very well.

Here is my Html content:
<asp:Content ID="ReportContent" ContentPlaceHolderID="cphReport" runat="server">
    <div>
        <div>
            <telerik:ReportViewer ID="rvReportTravels" runat="server" Width="1150px" Height="800px"
                Report="ComUT.Reporting.Library.Stops, ComUT.Reporting.Library, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
            </telerik:ReportViewer>
        </div>
    </div>
</asp:Content>

Do you have any idea how to solve this problem?

Thanks
Giuliano Caetano
Steve
Telerik team
 answered on 29 Nov 2011
3 answers
452 views

Hi

 

I am trying to export report programmatically, after user changes the page settings for dynamically created report. Report has one column that displays images located on web server. When pdf is generated programmatically file shows error for every image in image column.
Error message:
An error has occured while processing PictureBox 'Imgquestion':Could not find a part of the path 'D:\BaseData\forms\forms\Image\00PlainImage.jpg'.

 

I.e. Its taking absolute path of image. It is necessary to me that export report programmatically according to users inputted settings.

If report get exported (ex. PDF format) using inbuilt export utility of report viewer object, then exported report file (i.e. pdf) would contains images as those displays in report viewer.

 

Please let me know how to fixed this issue.
Michael
Top achievements
Rank 1
 answered on 29 Nov 2011
6 answers
204 views
hi guys,

Im using a objectdatasource and after selecting my data method, and giving values to the data parameters im having problems,  an error apears while processing the report its because some of my parameters are nullable, but im not sure now what value i have to send
i tried nothing null -1  and nothing seems to work, any guesses?
Tomas
Top achievements
Rank 1
 answered on 29 Nov 2011
7 answers
718 views
I have a DateTime field in my database that allows nulls.  When I bring the records up to the UI, they come up as DateTime? properties on an object.  I have put "=Fields.<DateField>.Value" in the Textbox.Value, but when displaying the report, the textbox shows an error that '.Value' is not valid.

I would like to put =Iif(Fields.DateField.HasValue,Fields.DateField.Value,""), but cannot get anything to work...

Is something like that allowed?
Steve
Telerik team
 answered on 29 Nov 2011
3 answers
141 views
Dear Team,

In the telerik Reporting we have an option,  convert to Pdf 

When i convert my the report containing Chart it not fitting in one page,  

While convert to PDF i need to change any setting to fit to one page.


Thanks in advance

Best Regards
Purna.
Elian
Telerik team
 answered on 29 Nov 2011
1 answer
210 views
I'm trying to build a telerik report programmatically, but I can't find ShapeType = SquareShape (in Telerik.Reporting.Drawing.Shapes). Square is a shapetype in report designer. Anybody who knows how to create squares programmatically?
Elian
Telerik team
 answered on 29 Nov 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?