Telerik Forums
Reporting Forum
1 answer
396 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
117 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
136 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
501 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
241 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
823 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
170 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
241 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
13 answers
1.0K+ views
Hello,

I'm developing web app where each user have his own database, so I'm creating report datasource in code.

Example:
        Dim cnn As New OracleConnection(Session("cnnString").ToString)
        Dim sql As String = "SELECT * FROM sometable"
        Dim adapter As New OracleDataAdapter(sql, cnn)
        Dim table As New DataTable
        adapter.Fill(table)

        Dim report As New Reports.MyReport
        report.DataSource = table

That report have one subreport, but I don't know how to set subreport's datasource in code.

Thanks,

Marin Mašić
Mohamed
Top achievements
Rank 1
 answered on 29 Nov 2011
2 answers
124 views
We have a simple report, that lists people by group and gender. The report combines a table and a chart. The table appears accurately, but the chart seems to move the values around so that the values appear under different groups. You can see what I mean from the attached screen shot.

The chart is configured as follows; default type is stacked bar, xaxis.datalabelscolumn is groupname, datagroupcolumn  is gender.

The data source has three columns; groupname, gender, and a count.
ACFN    Male    1
FMFN    Female    1
FMFN468    Female    1
N-CAN    Male    1
OABO    Male    2
OCAN    Male    1
OLNA    Male    1

Both genders don't always show up in the result set for any specific group; could that be the issue?

Any and all suggestions are appreciated.
Derek
Top achievements
Rank 1
 answered on 28 Nov 2011
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?